tracing::stdlib::ops

Trait Drop

1.0.0 · Source
pub trait Drop {
    // Required method
    fn drop(&mut self);
}
Expand description

Custom code within the destructor.

When a value is no longer needed, Rust will run a “destructor” on that value. The most common way that a value is no longer needed is when it goes out of scope. Destructors may still run in other circumstances, but we’re going to focus on scope for the examples here. To learn about some of those other cases, please see the reference section on destructors.

This destructor consists of two components:

  • A call to Drop::drop for that value, if this special Drop trait is implemented for its type.
  • The automatically generated “drop glue” which recursively calls the destructors of all the fields of this value.

As Rust automatically calls the destructors of all contained fields, you don’t have to implement Drop in most cases. But there are some cases where it is useful, for example for types which directly manage a resource. That resource may be memory, it may be a file descriptor, it may be a network socket. Once a value of that type is no longer going to be used, it should “clean up” its resource by freeing the memory or closing the file or socket. This is the job of a destructor, and therefore the job of Drop::drop.

§Examples

To see destructors in action, let’s take a look at the following program:

struct HasDrop;

impl Drop for HasDrop {
    fn drop(&mut self) {
        println!("Dropping HasDrop!");
    }
}

struct HasTwoDrops {
    one: HasDrop,
    two: HasDrop,
}

impl Drop for HasTwoDrops {
    fn drop(&mut self) {
        println!("Dropping HasTwoDrops!");
    }
}

fn main() {
    let _x = HasTwoDrops { one: HasDrop, two: HasDrop };
    println!("Running!");
}

Rust will first call Drop::drop for _x and then for both _x.one and _x.two, meaning that running this will print

Running!
Dropping HasTwoDrops!
Dropping HasDrop!
Dropping HasDrop!

Even if we remove the implementation of Drop for HasTwoDrop, the destructors of its fields are still called. This would result in

Running!
Dropping HasDrop!
Dropping HasDrop!

§You cannot call Drop::drop yourself

Because Drop::drop is used to clean up a value, it may be dangerous to use this value after the method has been called. As Drop::drop does not take ownership of its input, Rust prevents misuse by not allowing you to call Drop::drop directly.

In other words, if you tried to explicitly call Drop::drop in the above example, you’d get a compiler error.

If you’d like to explicitly call the destructor of a value, mem::drop can be used instead.

§Drop order

Which of our two HasDrop drops first, though? For structs, it’s the same order that they’re declared: first one, then two. If you’d like to try this yourself, you can modify HasDrop above to contain some data, like an integer, and then use it in the println! inside of Drop. This behavior is guaranteed by the language.

Unlike for structs, local variables are dropped in reverse order:

struct Foo;

impl Drop for Foo {
    fn drop(&mut self) {
        println!("Dropping Foo!")
    }
}

struct Bar;

impl Drop for Bar {
    fn drop(&mut self) {
        println!("Dropping Bar!")
    }
}

fn main() {
    let _foo = Foo;
    let _bar = Bar;
}

This will print

Dropping Bar!
Dropping Foo!

Please see the reference for the full rules.

§Copy and Drop are exclusive

You cannot implement both Copy and Drop on the same type. Types that are Copy get implicitly duplicated by the compiler, making it very hard to predict when, and how often destructors will be executed. As such, these types cannot have destructors.

§Drop check

Dropping interacts with the borrow checker in subtle ways: when a type T is being implicitly dropped as some variable of this type goes out of scope, the borrow checker needs to ensure that calling T’s destructor at this moment is safe. In particular, it also needs to be safe to recursively drop all the fields of T. For example, it is crucial that code like the following is being rejected:

use std::cell::Cell;

struct S<'a>(Cell<Option<&'a S<'a>>>, Box<i32>);
impl Drop for S<'_> {
    fn drop(&mut self) {
        if let Some(r) = self.0.get() {
            // Print the contents of the `Box` in `r`.
            println!("{}", r.1);
        }
    }
}

fn main() {
    // Set up two `S` that point to each other.
    let s1 = S(Cell::new(None), Box::new(42));
    let s2 = S(Cell::new(Some(&s1)), Box::new(42));
    s1.0.set(Some(&s2));
    // Now they both get dropped. But whichever is the 2nd one
    // to be dropped will access the `Box` in the first one,
    // which is a use-after-free!
}

The Nomicon discusses the need for drop check in more detail.

To reject such code, the “drop check” analysis determines which types and lifetimes need to still be live when T gets dropped. The exact details of this analysis are not yet stably guaranteed and subject to change. Currently, the analysis works as follows:

  • If T has no drop glue, then trivially nothing is required to be live. This is the case if neither T nor any of its (recursive) fields have a destructor (impl Drop). PhantomData, arrays of length 0 and ManuallyDrop are considered to never have a destructor, no matter their field type.
  • If T has drop glue, then, for all types U that are owned by any field of T, recursively add the types and lifetimes that need to be live when U gets dropped. The set of owned types is determined by recursively traversing T:
    • Recursively descend through PhantomData, Box, tuples, and arrays (excluding arrays of length 0).
    • Stop at reference and raw pointer types as well as function pointers and function items; they do not own anything.
    • Stop at non-composite types (type parameters that remain generic in the current context and base types such as integers and bool); these types are owned.
    • When hitting an ADT with impl Drop, stop there; this type is owned.
    • When hitting an ADT without impl Drop, recursively descend to its fields. (For an enum, consider all fields of all variants.)
  • Furthermore, if T implements Drop, then all generic (lifetime and type) parameters of T must be live.

In the above example, the last clause implies that 'a must be live when S<'a> is dropped, and hence the example is rejected. If we remove the impl Drop, the liveness requirement disappears and the example is accepted.

There exists an unstable way for a type to opt-out of the last clause; this is called “drop check eyepatch” or may_dangle. For more details on this nightly-only feature, see the discussion in the Nomicon.

Required Methods§

1.0.0 · Source

fn drop(&mut self)

Executes the destructor for this type.

This method is called implicitly when the value goes out of scope, and cannot be called explicitly (this is compiler error E0040). However, the mem::drop function in the prelude can be used to call the argument’s Drop implementation.

When this method has been called, self has not yet been deallocated. That only happens after the method is over. If this wasn’t the case, self would be a dangling reference.

§Panics

Implementations should generally avoid panic!ing, because drop() may itself be called during unwinding due to a panic, and if the drop() panics in that situation (a “double panic”), this will likely abort the program. It is possible to check panicking() first, which may be desirable for a Drop implementation that is reporting a bug of the kind “you didn’t finish using this before it was dropped”; but most types should simply clean up their owned allocations or other resources and return normally from drop(), regardless of what state they are in.

Note that even if this panics, the value is considered to be dropped; you must not cause drop to be called again. This is normally automatically handled by the compiler, but when using unsafe code, can sometimes occur unintentionally, particularly when using ptr::drop_in_place.

Implementors§

Source§

impl Drop for DefaultGuard

Source§

impl Drop for EnteredSpan

Source§

impl Drop for Span

1.13.0 · Source§

impl Drop for CString

1.63.0 · Source§

impl Drop for OwnedFd

1.6.0 · Source§

impl Drop for tracing::stdlib::string::Drain<'_>

Source§

impl Drop for LocalWaker

1.36.0 · Source§

impl Drop for Waker

Source§

impl<'a> Drop for Entered<'a>

Source§

impl<'a, T, A> Drop for DrainSorted<'a, T, A>
where T: Ord, A: Allocator,

Source§

impl<'f> Drop for VaListImpl<'f>

1.82.0 · Source§

impl<A> Drop for RepeatN<A>

1.21.0 · Source§

impl<I, A> Drop for Splice<'_, I, A>
where I: Iterator, A: Allocator,

1.7.0 · Source§

impl<K, V, A> Drop for tracing::stdlib::collections::btree_map::IntoIter<K, V, A>
where A: Allocator + Clone,

1.7.0 · Source§

impl<K, V, A> Drop for BTreeMap<K, V, A>
where A: Allocator + Clone,

Source§

impl<T> Drop for OnceBox<T>

Source§

impl<T> Drop for Instrumented<T>

Source§

impl<T> Drop for ThinBox<T>
where T: ?Sized,

Source§

impl<T> Drop for Receiver<T>

Source§

impl<T> Drop for Sender<T>

Source§

impl<T> Drop for MappedMutexGuard<'_, T>
where T: ?Sized,

Source§

impl<T> Drop for MappedRwLockReadGuard<'_, T>
where T: ?Sized,

Source§

impl<T> Drop for MappedRwLockWriteGuard<'_, T>
where T: ?Sized,

1.0.0 · Source§

impl<T> Drop for MutexGuard<'_, T>
where T: ?Sized,

1.70.0 · Source§

impl<T> Drop for OnceLock<T>

Source§

impl<T> Drop for ReentrantLockGuard<'_, T>
where T: ?Sized,

1.0.0 · Source§

impl<T> Drop for RwLockReadGuard<'_, T>
where T: ?Sized,

1.0.0 · Source§

impl<T> Drop for RwLockWriteGuard<'_, T>
where T: ?Sized,

1.0.0 · Source§

impl<T, A> Drop for Box<T, A>
where A: Allocator, T: ?Sized,

1.12.0 · Source§

impl<T, A> Drop for PeekMut<'_, T, A>
where T: Ord, A: Allocator,

1.0.0 · Source§

impl<T, A> Drop for LinkedList<T, A>
where A: Allocator,

1.0.0 · Source§

impl<T, A> Drop for VecDeque<T, A>
where A: Allocator,

1.6.0 · Source§

impl<T, A> Drop for tracing::stdlib::collections::vec_deque::Drain<'_, T, A>
where A: Allocator,

1.0.0 · Source§

impl<T, A> Drop for Rc<T, A>
where A: Allocator, T: ?Sized,

Source§

impl<T, A> Drop for UniqueRc<T, A>
where A: Allocator, T: ?Sized,

1.4.0 · Source§

impl<T, A> Drop for tracing::stdlib::rc::Weak<T, A>
where A: Allocator, T: ?Sized,

1.0.0 · Source§

impl<T, A> Drop for Arc<T, A>
where A: Allocator, T: ?Sized,

1.4.0 · Source§

impl<T, A> Drop for tracing::stdlib::sync::Weak<T, A>
where A: Allocator, T: ?Sized,

1.6.0 · Source§

impl<T, A> Drop for tracing::stdlib::vec::Drain<'_, T, A>
where A: Allocator,

1.0.0 · Source§

impl<T, A> Drop for tracing::stdlib::vec::IntoIter<T, A>
where A: Allocator,

1.0.0 · Source§

impl<T, A> Drop for Vec<T, A>
where A: Allocator,

1.80.0 · Source§

impl<T, F> Drop for LazyLock<T, F>

Source§

impl<T, F, A> Drop for ExtractIf<'_, T, F, A>
where A: Allocator,

1.40.0 · Source§

impl<T, const N: usize> Drop for tracing::stdlib::array::IntoIter<T, N>

1.0.0 · Source§

impl<W> Drop for BufWriter<W>
where W: Write + ?Sized,

impl<'a> Drop for RefBorrowData<'a>

impl Drop for Aes128Dec

impl Drop for Aes128Enc

impl Drop for Aes192Dec

impl Drop for Aes192Enc

impl Drop for Aes256Dec

impl Drop for Aes256Enc

impl Drop for Aes128

impl Drop for Aes192

impl Drop for Aes256

impl Drop for Aes128

impl Drop for Aes128Dec

impl Drop for Aes128Enc

impl Drop for Aes192

impl Drop for Aes192Dec

impl Drop for Aes192Enc

impl Drop for Aes256

impl Drop for Aes256Dec

impl Drop for Aes256Enc

impl<'a, T: 'a> Drop for CallocBackingStore<'a, T>

impl Drop for SetLenOnDrop<'_>

impl<I: Iterator, A: Allocator> Drop for Splice<'_, I, A>

impl<T, A: Allocator> Drop for RawVec<T, A>

impl<T, A: Allocator> Drop for Drain<'_, T, A>

impl<T, A: Allocator> Drop for IntoIter<T, A>

impl<T, A: Allocator> Drop for Vec<T, A>

impl<T: ?Sized, A: Allocator> Drop for Box<T, A>

impl Drop for Clipboard

impl<F: FnOnce()> Drop for ScopeGuard<F>

impl<'a, T: 'a, const CAP: usize> Drop for Drain<'a, T, CAP>

impl<T, Data, F> Drop for ScopeExitGuard<T, Data, F>
where F: FnMut(&Data, &mut T),

impl<T, const CAP: usize> Drop for ArrayVec<T, CAP>

impl<T, const CAP: usize> Drop for IntoIter<T, CAP>

impl<'b> Drop for AtomicBorrowRef<'b>

impl<'b> Drop for AtomicBorrowRefMut<'b>

impl Drop for LcCBB<'_>

impl Drop for ChaCha20Key

impl Drop for Salt

impl Drop for LcHmacCtx

impl Drop for Ciphertext<'_>

impl Drop for Document

impl Drop for PublicKey

impl Drop for Secret

impl<L: KeyType> Drop for Okm<'_, L>

impl<P: Pointer> Drop for ManagedPointer<P>

impl<T> Drop for Buffer<'_, T>

impl<T: Zeroize> Drop for ZeroizeBoxSlice<T>

impl<const L: usize> Drop for FixedLength<L>

impl Drop for Bomb

impl Drop for LockGuard

impl Drop for BacktraceFrameFmt<'_, '_, '_>

impl Drop for Mmap

impl Drop for PrintTree

impl<'e, E: Engine, W: Write> Drop for EncoderWriter<'e, E, W>

impl<'a, B: BitBlock> Drop for MutBorrowedBit<'a, B>

impl<'a, Alloc: BrotliAlloc> Drop for CommandQueue<'a, Alloc>

impl<'a, Alloc: Allocator<u16> + Allocator<u32> + Allocator<floatX>> Drop for StrideEval<'a, Alloc>

impl<Alloc: BrotliAlloc> Drop for StateWrapper<Alloc>

impl<ErrType, W: CustomWrite<ErrType>, BufferType: SliceWrapperMut<u8>, Alloc: BrotliAlloc> Drop for CompressorWriterCustomIo<ErrType, W, BufferType, Alloc>

impl<ReturnValue: Send + 'static, ExtraInput: Send + 'static, Alloc: BrotliAlloc + Send + 'static, U: Send + 'static + Sync> Drop for WorkerPool<ReturnValue, ExtraInput, Alloc, U>

impl<'brotli_state, AllocU8: Allocator<u8>, AllocU32: Allocator<u32>, AllocHC: Allocator<HuffmanCode>> Drop for BrotliState<AllocU8, AllocU32, AllocHC>

impl<ErrType, W: CustomWrite<ErrType>, BufferType: SliceWrapperMut<u8>, AllocU8: Allocator<u8>, AllocU32: Allocator<u32>, AllocHC: Allocator<HuffmanCode>> Drop for DecompressorWriterCustomIo<ErrType, W, BufferType, AllocU8, AllocU32, AllocHC>

impl Drop for BoxBytes

impl Drop for Shared

impl Drop for Bytes

impl Drop for BytesMut

impl Drop for FlagOnDrop

impl<'l, F: AsFd> Drop for Async<'l, F>

impl<F: AsFd, E> Drop for Generic<F, E>

impl<T> Drop for Sender<T>

impl Drop for CanvasData<'_>

impl Drop for Framebuffer

impl Drop for EventLoop

impl Drop for SelectedOperation<'_>

impl Drop for SyncWaker

impl Drop for Waker

impl<T> Drop for Channel<T>

impl<T> Drop for Channel<T>

impl<T> Drop for Receiver<T>

impl<T> Drop for Sender<T>

impl<T> Drop for Inner<T>

impl<T> Drop for Injector<T>

impl Drop for Bag

impl Drop for Guard

impl Drop for LocalHandle

impl<T> Drop for OnceLock<T>

impl<T> Drop for Queue<T>

impl<T, C: IsElement<T>> Drop for List<T, C>

impl<T: ?Sized + Pointable> Drop for Owned<T>

impl Drop for WaitGroup

impl<T> Drop for AtomicCell<T>

impl<T> Drop for OnceLock<T>

impl<T: ?Sized> Drop for ShardedLockWriteGuard<'_, T>

impl Drop for CowRcStr<'_>

impl Drop for Accumulator

impl Drop for Encoder<'_>

impl<T, E> Drop for DiplomatResult<T, E>

impl Drop for Ui

impl Drop for Painter

impl Drop for RestoreOnDrop<'_>

impl<W: Write> Drop for GzEncoder<W>

impl<W: Write, D: Ops> Drop for Writer<W, D>

impl Drop for Font

impl Drop for FtLibrary

impl Drop for Config

impl Drop for FontSet

impl Drop for ObjectSet

impl Drop for Pattern

impl Drop for Shaper

impl<T> Drop for TryLock<'_, T>

impl<T> Drop for Queue<T>

impl<T> Drop for BoundedSenderInner<T>

impl<T> Drop for Receiver<T>

impl<T> Drop for UnboundedReceiver<T>

impl<T> Drop for UnboundedSenderInner<T>

impl<T> Drop for Receiver<T>

impl<T> Drop for Sender<T>

impl Drop for Enter

impl<T> Drop for LocalFutureObj<'_, T>

impl Drop for Guard<'_>

impl<F: FnOnce(&SharedPollState) -> u8> Drop for PollStateBomb<'_, F>

impl<Fut> Drop for Shared<Fut>
where Fut: Future,

impl<Fut> Drop for ReadyToRunQueue<Fut>

impl<Fut> Drop for Task<Fut>

impl<Fut> Drop for FuturesUnordered<Fut>

impl<R: ?Sized> Drop for ReadLine<'_, R>

impl<T> Drop for BiLockGuard<'_, T>

impl<T> Drop for Inner<T>

impl<T: ?Sized> Drop for MutexGuard<'_, T>

impl<T: ?Sized> Drop for MutexLockFuture<'_, T>

impl<T: ?Sized> Drop for OwnedMutexGuard<T>

impl<T: ?Sized, U: ?Sized> Drop for MappedMutexGuard<'_, T, U>

impl<T, N> Drop for GenericArrayIter<T, N>
where N: ArrayLength<T>,

impl<F: FnMut()> Drop for DropGuard<F>

impl<W: Write> Drop for Encoder<W>

impl Drop for Effect

impl Drop for Device

impl Drop for Gamepad

impl Drop for Device

impl Drop for Enumerate

impl Drop for Monitor

impl Drop for Udev

impl<A: ArrayLike> Drop for ArrayVec<A>

impl Drop for IntoIter

impl Drop for StrV

impl Drop for EnumClass

impl Drop for FlagsClass

impl Drop for MatchInfo<'_>

impl Drop for ObjectRef

impl Drop for GString

impl Drop for GStringPtr

impl Drop for IConv

impl Drop for ThreadPool

impl Drop for VariantType

impl Drop for HashTable

impl Drop for List

impl Drop for PtrArray

impl Drop for SList

impl Drop for SendValue

impl Drop for Value

impl<T> Drop for ThreadGuard<T>

impl<T, F> Drop for SourceFuture<T, F>

impl<T, F> Drop for SourceStream<T, F>

impl<T, MM: SharedMemoryManager<Target = T>> Drop for Shared<T, MM>

impl<T: 'static, MM: BoxedMemoryManager<Target = T>> Drop for Boxed<T, MM>

impl<T: IsClass> Drop for ClassRef<'_, T>

impl<T: IsInterface> Drop for InterfaceRef<'_, T>

impl<T: ObjectType> Drop for WeakRef<T>

impl<T: TransparentPtrType> Drop for List<T>

impl<T: TransparentPtrType> Drop for SList<T>

impl<T: TransparentType> Drop for IntoIter<T>

impl<T: TransparentType> Drop for Slice<T>

impl Drop for Context

impl Drop for Relevant

impl<M> Drop for FreeListAllocator<M>

impl<P> Drop for DescriptorBucket<P>

impl<P, S> Drop for DescriptorAllocator<P, S>

impl Drop for Buffer

impl Drop for BufferList

impl Drop for BusStream

impl Drop for Caps

impl Drop for Context

impl Drop for Event

impl Drop for Memory

impl Drop for Message

impl Drop for MiniObject

impl Drop for Query

impl Drop for Sample

impl Drop for StreamLock<'_>

impl Drop for Structure

impl Drop for TagList

impl Drop for RecMutex

impl Drop for TaskLockGuard<'_>

impl Drop for Toc

impl Drop for TocEntry

impl<T> Drop for BufferMap<'_, T>

impl<T> Drop for MappedBuffer<T>

impl<T> Drop for MappedMemory<T>

impl<T> Drop for MemoryMap<'_, T>

impl<T> Drop for BufferCursor<T>

impl<T> Drop for BufferRefCursor<T>

impl<T> Drop for Iterator<T>

impl<T> Drop for ObjectLockGuard<'_, T>
where T: ?Sized,

impl Drop for AppSrcSink

impl Drop for UniqueAdapterMap<'_>

impl Drop for GLMemory

impl Drop for GLMemoryPBO

impl<T> Drop for GLVideoFrame<T>

impl<T> Drop for GLVideoFrameRef<T>

impl Drop for SDPTime

impl Drop for SDPZone

impl Drop for VideoCodecFrame<'_>

impl<'a, T: VideoCodecStateContext<'a>> Drop for VideoCodecState<'a, T>

impl<T> Drop for VideoFrame<T>

impl<T> Drop for VideoFrameRef<T>

impl Drop for UserPingsRx

impl Drop for Counts

impl Drop for RecvStream

impl<B, P> Drop for Streams<B, P>
where P: Peer,

impl<T, P, B> Drop for Connection<T, P, B>
where P: Peer, B: Buf,

impl<T, A: Allocator> Drop for RawDrain<'_, T, A>

impl<T, A: Allocator> Drop for RawIntoIter<T, A>

impl<T, A: Allocator> Drop for RawTable<T, A>

impl<T, F> Drop for ScopeGuard<T, F>
where F: FnMut(&mut T),

impl<'a, T> Drop for Drain<'a, T>

impl<'a, T> Drop for ValueDrain<'a, T>

impl<T> Drop for IntoIter<T>

impl Drop for Sender

impl<T> Drop for OptGuard<'_, T>

impl<T, U> Drop for Callback<T, U>

impl<T, U> Drop for Envelope<T, U>

impl<T, U> Drop for Receiver<T, U>

impl Drop for GaiFuture

impl<W: Write> Drop for AutoBreak<W>

impl<I, K, V, S> Drop for Splice<'_, I, K, V, S>
where I: Iterator<Item = (K, V)>, K: Hash + Eq, S: BuildHasher,

impl Drop for FdGuard

impl Drop for UnixCmsg

impl<'a, I> Drop for Chunk<'a, I>
where I: Iterator, I::Item: 'a,

impl<'a, K, I, F> Drop for Group<'a, K, I, F>
where I: Iterator, I::Item: 'a,

impl Drop for Repr

impl Drop for LayoutContext<'_>

impl Drop for BoxSlot<'_>

impl Drop for SnapshotSetter<'_>

impl Drop for Library

impl<'a, R: RawMutex + 'a, G: GetThreadId + 'a, T: ?Sized + 'a> Drop for MappedReentrantMutexGuard<'a, R, G, T>

impl<'a, R: RawMutex + 'a, G: GetThreadId + 'a, T: ?Sized + 'a> Drop for ReentrantMutexGuard<'a, R, G, T>

impl<'a, R: RawMutex + 'a, T: ?Sized + 'a> Drop for MappedMutexGuard<'a, R, T>

impl<'a, R: RawMutex + 'a, T: ?Sized + 'a> Drop for MutexGuard<'a, R, T>

impl<'a, R: RawRwLock + 'a, T: ?Sized + 'a> Drop for MappedRwLockReadGuard<'a, R, T>

impl<'a, R: RawRwLock + 'a, T: ?Sized + 'a> Drop for MappedRwLockWriteGuard<'a, R, T>

impl<'a, R: RawRwLock + 'a, T: ?Sized + 'a> Drop for RwLockReadGuard<'a, R, T>

impl<'a, R: RawRwLock + 'a, T: ?Sized + 'a> Drop for RwLockWriteGuard<'a, R, T>

impl<'a, R: RawRwLockUpgrade + 'a, T: ?Sized + 'a> Drop for RwLockUpgradableReadGuard<'a, R, T>

impl Drop for MmapInner

impl Drop for IdVector

impl Drop for JSEngine

impl Drop for Runtime

impl Drop for Stencil

impl<'a> Drop for ForOfIteratorGuard<'a>

impl<'a, T: 'a + CustomTrace> Drop for CustomAutoRooterGuard<'a, T>

impl<'a, T: 'a + RootKind> Drop for RootedGuard<'a, T>

impl<'a, T: Traceable + 'static> Drop for RootedVec<'a, T>

impl<T: Traceable + 'static> Drop for RootedTraceableBox<T>

impl Drop for JSAutoRealm

impl<T: GCMethods + Copy> Drop for Heap<T>

impl Drop for ThreadData

impl<W: Write> Drop for ChunkWriter<'_, W>

impl<W: Write> Drop for StreamWriter<'_, W>

impl<W: Write> Drop for Writer<W>

impl Drop for Poller

impl Drop for TraceDump

impl<'a> Drop for Fuse<'a>

impl<'a> Drop for Drain<'a>

impl<'a, T, C: From<Vec<T>>> Drop for DrainGuard<'a, T, C>

impl<'a, T: Ord + Send> Drop for Drain<'a, T>

impl<'a, T: Send> Drop for Drain<'a, T>

impl<'c, T> Drop for CollectResult<'c, T>

impl<'data, T: 'data + Send> Drop for DrainProducer<'data, T>

impl<'data, T: 'data> Drop for SliceDrain<'data, T>

impl<'data, T: Send> Drop for Drain<'data, T>

impl<T> Drop for CopyOnDrop<T>

impl<T> Drop for CopyOnDrop<'_, T>

impl Drop for ThreadPool

impl<'a> Drop for Terminator<'a>

impl<'a, T: Send, F: Fn() -> T> Drop for PoolGuard<'a, T, F>

impl<T, F> Drop for Lazy<T, F>

impl Drop for Ast

impl Drop for ClassSet

impl Drop for Hir

impl<'data, T> Drop for AncillaryIter<'data, T>

impl Drop for AeadKey

impl Drop for Tag

impl Drop for OkmBlock

impl Drop for HandshakeIter<'_, '_>

impl<const KDF_LEN: usize> Drop for KemSharedSecret<KDF_LEN>

impl<const KEY_LEN: usize> Drop for AeadKey<KEY_LEN>

impl Drop for Handle

impl<T, F, S> Drop for ScopeGuard<T, F, S>
where F: FnOnce(T), S: Strategy,

impl Drop for LoadBlocker

impl Drop for DataView

impl Drop for AutoWorkerReset<'_>

impl Drop for EventSource

impl Drop for Promise

impl Drop for WebGLBuffer

impl Drop for WebGLQuery

impl Drop for WebGLShader

impl Drop for WebGLSync

impl Drop for GPUAdapter

impl Drop for GPUBuffer

impl Drop for GPUDevice

impl Drop for GPUSampler

impl Drop for GPUTexture

impl Drop for Runtime

impl<'a, T: WeakReferenceable + 'a> Drop for WeakRefEntry<'a, T>

impl<D: DomTypes> Drop for CallSetup<D>

impl<D: DomTypes> Drop for CallbackObject<D>

impl<T> Drop for Root<T>

impl Drop for Part

impl Drop for Ctxt

impl<T: Serialize> Drop for IpcResponder<T>

impl<A, B> Drop for ArcUnion<A, B>

impl<H, T> Drop for HeaderSlice<H, T>

impl<T: ?Sized> Drop for Arc<T>

impl Drop for Minibrowser

impl<'a> Drop for AutoTrace<'a>

impl Drop for SmallBitVec

impl<'a> Drop for SetLenOnDrop<'a>

impl<'a, T: 'a + Array> Drop for Drain<'a, T>

impl<A: Array> Drop for IntoIter<A>

impl<A: Array> Drop for SmallVec<A>

impl Drop for Region

impl Drop for Surface

impl Drop for DataDevice

impl Drop for DragSource

impl Drop for FramePart

impl Drop for PopupInner

impl Drop for WindowInner

impl Drop for RawPool

impl Drop for Buffer

impl Drop for BufferData

impl Drop for Slot

impl Drop for SlotInner

impl<K> Drop for BufferSlot<K>

impl<U, S> Drop for ThemedPointer<U, S>

impl Drop for Clipboard

impl<Static> Drop for Atom<Static>

impl Drop for RuleTree

impl<'a> Drop for SharedRwLockReadGuard<'a>

impl<'a> Drop for SharedRwLockWriteGuard<'a>

impl<E> Drop for SequentialTaskList<E>
where E: TElement,

impl<E: TElement> Drop for StyleBloom<E>

impl<T: Sized> Drop for OwnedSlice<T>

impl<'a> Drop for DisplayGuard<'a>

impl<'a> Drop for ParseBuffer<'a>

impl Drop for TempDir

impl Drop for TempPath

impl<F, A> Drop for Tendril<F, A>
where F: Format, A: Atomicity,

impl<'a, T> Drop for Drain<'a, T>

impl<I: Iterator> Drop for Splice<'_, I>

impl<T> Drop for IntoIter<T>

impl<T> Drop for ThinVec<T>

impl<'a, W: Write + Seek, C: ColorType, K: TiffKind, D: Compression> Drop for ImageEncoder<'a, W, C, K, D>

impl<'a, W: Write + Seek, K: TiffKind> Drop for DirectoryEncoder<'a, W, K>

impl Drop for SuperBlitter<'_>

impl Drop for Readiness<'_>

impl Drop for ScheduledIo

impl Drop for CoreGuard<'_>

impl Drop for Runtime

impl Drop for TaskIdGuard

impl Drop for TimerEntry

impl Drop for Acquire<'_>

impl Drop for Notified<'_>

impl Drop for NotifyWaitersList<'_>

impl Drop for SemaphorePermit<'_>

impl Drop for AbortHandle

impl Drop for LocalSet

impl Drop for WakeList

impl<'a> Drop for LocalDataEnterGuard<'a>

impl<'a, T> Drop for Recv<'a, T>

impl<'a, T> Drop for RecvGuard<'a, T>

impl<'a, T> Drop for WaitersList<'a, T>

impl<'a, T: 'static> Drop for Pop<'a, T>

impl<'a, T: ?Sized> Drop for MappedMutexGuard<'a, T>

impl<'a, T: ?Sized> Drop for RwLockMappedWriteGuard<'a, T>

impl<'a, T: ?Sized> Drop for RwLockReadGuard<'a, T>

impl<'a, T: ?Sized> Drop for RwLockWriteGuard<'a, T>

impl<E: Source> Drop for PollEvented<E>

impl<S: 'static> Drop for Task<S>

impl<S: 'static> Drop for UnownedTask<S>

impl<T> Drop for Local<T>

impl<T> Drop for Receiver<T>

impl<T> Drop for Sender<T>

impl<T> Drop for WeakSender<T>

impl<T> Drop for OwnedPermit<T>

impl<T> Drop for Permit<'_, T>

impl<T> Drop for PermitIterator<'_, T>

impl<T> Drop for WeakSender<T>

impl<T> Drop for WeakUnboundedSender<T>

impl<T> Drop for Inner<T>

impl<T> Drop for Receiver<T>

impl<T> Drop for Sender<T>

impl<T> Drop for OnceCell<T>

impl<T> Drop for Receiver<T>

impl<T> Drop for Sender<T>

impl<T> Drop for JoinHandle<T>

impl<T> Drop for JoinSet<T>

impl<T> Drop for AtomicCell<T>

impl<T> Drop for IdleNotifiedSet<T>

impl<T> Drop for OnceCell<T>

impl<T> Drop for LockGuard<'_, T>

impl<T, S> Drop for Chan<T, S>

impl<T, S> Drop for Tx<T, S>

impl<T, S: Semaphore> Drop for Rx<T, S>

impl<T: 'static, F> Drop for TaskLocalFuture<T, F>

impl<T: AsRawFd> Drop for AsyncFd<T>

impl<T: ?Sized> Drop for MutexGuard<'_, T>

impl<T: ?Sized> Drop for OwnedMutexGuard<T>

impl<T: ?Sized, U: ?Sized> Drop for OwnedMappedMutexGuard<T, U>

impl<T: ?Sized, U: ?Sized> Drop for OwnedRwLockMappedWriteGuard<T, U>

impl<T: ?Sized, U: ?Sized> Drop for OwnedRwLockReadGuard<T, U>

impl Drop for DropGuard

impl<O, F: FnOnce() -> O> Drop for CallOnDrop<O, F>

impl<T> Drop for MaybeDangling<T>

impl<'a, T> Drop for Locked<'a, T>

impl<'a> Drop for PathSegmentsMut<'a>

impl<'a> Drop for UrlQuery<'a>

impl<F: FnMut(&str)> Drop for LossyDecoder<F>

impl Drop for Taker

impl<State> Drop for QueueFreezeGuard<'_, State>

impl Drop for Listener

impl Drop for Poller

impl Drop for WorkToken

impl Drop for CustomVAO

impl Drop for PBO

impl Drop for Program

impl Drop for Texture

impl Drop for VAO

impl Drop for GpuMarker

impl Drop for FrameMemory

impl Drop for RenderApi

impl Drop for ChunkPool

impl<'a> Drop for BoundPBO<'a>

impl<'a> Drop for PixelBuffer<'a>

impl<'a> Drop for TextureUploader<'a>

impl<'a> Drop for GpuDataRequest<'a>

impl<'a, T> Drop for GpuBufferWriter<'a, T>

impl<T> Drop for VBO<T>

impl<W> Drop for PrintTree<W>
where W: Write,

impl<'a> Drop for CrashAnnotatorGuard<'a>

impl Drop for BindGroup

impl Drop for Queue

impl Drop for Device

impl Drop for Global

impl Drop for Surface

impl Drop for Blas

impl Drop for Buffer

impl Drop for QuerySet

impl Drop for Sampler

impl Drop for Texture

impl Drop for TextureView

impl Drop for Tlas

impl Drop for SnatchGuard<'_>

impl<'a> Drop for RecordingGuard<'a>

impl<'a> Drop for UsageScope<'a>

impl<'a, 'b> Drop for BufferBarriers<'a, 'b>

impl<'a, Idx> Drop for InitTrackerDrain<'a, Idx>
where Idx: Debug + Ord + Copy,

impl Drop for Inner

impl Drop for Device

impl Drop for Queue

impl Drop for DropGuard

impl Drop for Device

impl Drop for Queue

impl Drop for Surface

impl<'a> Drop for AdapterContextLock<'a>

impl Drop for XkbKeymap

impl Drop for XkbState

impl Drop for XkbContext

impl Drop for WindowState

impl Drop for Window

impl Drop for Ime

impl Drop for DeviceInfo<'_>

impl Drop for Window

impl Drop for XConnection

impl Drop for Window

impl<T> Drop for XSmartPointer<'_, T>

impl Drop for CachedFont

impl Drop for FontCache

impl Drop for NotifyOnDrop<'_>

impl Drop for CSlice

impl<C> Drop for RawCookie<'_, C>

impl<C> Drop for VoidCookie<'_, C>

impl<C: XProtoConnectionExt> Drop for GrabServer<'_, C>

impl<T: 'static> Drop for KindaSortaDangling<T>

impl<Z> Drop for Zeroizing<Z>
where Z: Zeroize,

impl<U> Drop for EyepatchHackVector<U>