Skip to main content

Deref

Trait Deref 

1.6.0 (const: unstable) · Source
pub trait Deref {
    type Target: ?Sized;

    // Required method
    fn deref(&self) -> &Self::Target;
}
Expand description

Used for immutable dereferencing operations, like *v.

In addition to being used for explicit dereferencing operations with the (unary) * operator in immutable contexts, Deref is also used implicitly by the compiler in many circumstances. This mechanism is called “Deref coercion”. In mutable contexts, DerefMut is used and mutable deref coercion similarly occurs.

Warning: Deref coercion is a powerful language feature which has far-reaching implications for every type that implements Deref. The compiler will silently insert calls to Deref::deref. For this reason, one should be careful about implementing Deref and only do so when deref coercion is desirable. See below for advice on when this is typically desirable or undesirable.

Types that implement Deref or DerefMut are often called “smart pointers” and the mechanism of deref coercion has been specifically designed to facilitate the pointer-like behavior that name suggests. Often, the purpose of a “smart pointer” type is to change the ownership semantics of a contained value (for example, Rc or Cow) or the storage semantics of a contained value (for example, Box).

§Deref coercion

If T implements Deref<Target = U>, and v is a value of type T, then:

  • In immutable contexts, *v (where T is neither a reference nor a raw pointer) is equivalent to *Deref::deref(&v).
  • Values of type &T are coerced to values of type &U
  • T implicitly implements all the methods of the type U which take the &self receiver.

For more details, visit the chapter in The Rust Programming Language as well as the reference sections on the dereference operator, method resolution, and type coercions.

§When to implement Deref or DerefMut

The same advice applies to both deref traits. In general, deref traits should be implemented if:

  1. a value of the type transparently behaves like a value of the target type;
  2. the implementation of the deref function is cheap; and
  3. users of the type will not be surprised by any deref coercion behavior.

In general, deref traits should not be implemented if:

  1. the deref implementations could fail unexpectedly; or
  2. the type has methods that are likely to collide with methods on the target type; or
  3. committing to deref coercion as part of the public API is not desirable.

Note that there’s a large difference between implementing deref traits generically over many target types, and doing so only for specific target types.

Generic implementations, such as for Box<T> (which is generic over every type and dereferences to T) should be careful to provide few or no methods, since the target type is unknown and therefore every method could collide with one on the target type, causing confusion for users. impl<T> Box<T> has no methods (though several associated functions), partly for this reason.

Specific implementations, such as for String (whose Deref implementation has Target = str) can have many methods, since avoiding collision is much easier. String and str both have many methods, and String additionally behaves as if it has every method of str because of deref coercion. The implementing type may also be generic while the implementation is still specific in this sense; for example, Vec<T> dereferences to [T], so methods of T are not applicable.

Consider also that deref coercion means that deref traits are a much larger part of a type’s public API than any other trait as it is implicitly called by the compiler. Therefore, it is advisable to consider whether this is something you are comfortable supporting as a public API.

The AsRef and Borrow traits have very similar signatures to Deref. It may be desirable to implement either or both of these, whether in addition to or rather than deref traits. See their documentation for details.

§Fallibility

This trait’s method should never unexpectedly fail. Deref coercion means the compiler will often insert calls to Deref::deref implicitly. Failure during dereferencing can be extremely confusing when Deref is invoked implicitly. In the majority of uses it should be infallible, though it may be acceptable to panic if the type is misused through programmer error, for example.

However, infallibility is not enforced and therefore not guaranteed. As such, unsafe code should not rely on infallibility in general for soundness.

§Examples

A struct with a single field which is accessible by dereferencing the struct.

use std::ops::Deref;

struct DerefExample<T> {
    value: T
}

impl<T> Deref for DerefExample<T> {
    type Target = T;

    fn deref(&self) -> &Self::Target {
        &self.value
    }
}

let x = DerefExample { value: 'a' };
assert_eq!('a', *x);

Required Associated Types§

1.0.0 (const: unstable) · Source

type Target: ?Sized

The resulting type after dereferencing.

Required Methods§

1.0.0 (const: unstable) · Source

fn deref(&self) -> &Self::Target

Dereferences the value.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl Deref for AlgorithmIdentifier

Source§

impl Deref for syn::token::And

Source§

type Target = WithSpan

Source§

impl Deref for rustmax::syn::token::And

Source§

type Target = WithSpan

Source§

impl Deref for syn::token::At

Source§

type Target = WithSpan

Source§

impl Deref for rustmax::syn::token::At

Source§

type Target = WithSpan

Source§

impl Deref for Attributes

Source§

impl Deref for bstr::bstr::BStr

Source§

impl Deref for winnow::stream::bstr::BStr

Source§

impl Deref for BString

Source§

impl Deref for BorrowedPayload<'_>

Source§

impl Deref for BoxBytes

Source§

impl Deref for BuildMetadata

Source§

impl Deref for ByteStr

Source§

impl Deref for ByteString

Source§

impl Deref for rustmax::bytes::Bytes

Source§

impl Deref for winnow::stream::bytes::Bytes

Source§

impl Deref for BytesMut

1.0.0 · Source§

impl Deref for CString

Source§

impl Deref for syn::token::Caret

Source§

type Target = WithSpan

Source§

impl Deref for rustmax::syn::token::Caret

Source§

type Target = WithSpan

Source§

impl Deref for CertificateDer<'_>

Source§

impl Deref for CertificateRevocationListDer<'_>

Source§

impl Deref for CertificateSigningRequestDer<'_>

Source§

impl Deref for rustls::client::client_conn::connection::ClientConnection

Source§

impl Deref for rustls::quic::connection::ClientConnection

Source§

impl Deref for syn::token::Colon

Source§

type Target = WithSpan

Source§

impl Deref for rustmax::syn::token::Colon

Source§

type Target = WithSpan

Source§

impl Deref for syn::token::Comma

Source§

type Target = WithSpan

Source§

impl Deref for rustmax::syn::token::Comma

Source§

type Target = WithSpan

Source§

impl Deref for rustls::conn::connection::Connection

Source§

impl Deref for rustls::quic::connection::Connection

Source§

impl Deref for CurrencyType

Source§

impl Deref for DataMarkerAttributes

Source§

impl Deref for DebouncedEvent

Source§

impl Deref for Der<'_>

Source§

impl Deref for syn::token::Dollar

Source§

type Target = WithSpan

Source§

impl Deref for rustmax::syn::token::Dollar

Source§

type Target = WithSpan

Source§

impl Deref for syn::token::Dot

Source§

type Target = WithSpan

Source§

impl Deref for rustmax::syn::token::Dot

Source§

type Target = WithSpan

Source§

impl Deref for EcdsaSigningAlgorithm

Source§

impl Deref for EchConfigListBytes<'_>

Source§

impl Deref for EnteredSpan

Source§

impl Deref for Env

Source§

impl Deref for syn::token::Eq

Source§

type Target = WithSpan

Source§

impl Deref for rustmax::syn::token::Eq

Source§

type Target = WithSpan

Source§

impl Deref for Error

Available on crate feature std or non-anyhow_no_core_error only.
Source§

type Target = dyn Error + Sync + Send

Source§

impl Deref for syn::token::Gt

Source§

type Target = WithSpan

Source§

impl Deref for rustmax::syn::token::Gt

Source§

type Target = WithSpan

Source§

impl Deref for LineBuffer

Source§

impl Deref for syn::token::Lt

Source§

type Target = WithSpan

Source§

impl Deref for rustmax::syn::token::Lt

Source§

type Target = WithSpan

Source§

impl Deref for syn::token::Minus

Source§

type Target = WithSpan

Source§

impl Deref for rustmax::syn::token::Minus

Source§

type Target = WithSpan

Source§

impl Deref for syn::token::Not

Source§

type Target = WithSpan

Source§

impl Deref for rustmax::syn::token::Not

Source§

type Target = WithSpan

Source§

impl Deref for NumberingSystem

Source§

impl Deref for syn::token::Or

Source§

type Target = WithSpan

Source§

impl Deref for rustmax::syn::token::Or

Source§

type Target = WithSpan

Source§

impl Deref for OriginalUri

Source§

impl Deref for OsStr

1.0.0 · Source§

impl Deref for OsString

1.0.0 · Source§

impl Deref for rustmax::std::path::PathBuf

Source§

impl Deref for syn::token::Percent

Source§

type Target = WithSpan

Source§

impl Deref for rustmax::syn::token::Percent

Source§

type Target = WithSpan

Source§

impl Deref for syn::token::Plus

Source§

type Target = WithSpan

Source§

impl Deref for rustmax::syn::token::Plus

Source§

type Target = WithSpan

Source§

impl Deref for PotentialUtf8

Source§

impl Deref for syn::token::Pound

Source§

type Target = WithSpan

Source§

impl Deref for rustmax::syn::token::Pound

Source§

type Target = WithSpan

Source§

impl Deref for Prerelease

Source§

impl Deref for Private

Source§

impl Deref for syn::token::Question

Source§

type Target = WithSpan

Source§

impl Deref for rustmax::syn::token::Question

Source§

type Target = WithSpan

Source§

impl Deref for RegionOverride

Source§

impl Deref for RegionalSubdivision

Source§

impl Deref for syn::token::Semi

Source§

type Target = WithSpan

Source§

impl Deref for rustmax::syn::token::Semi

Source§

type Target = WithSpan

Source§

impl Deref for rustls::server::server_conn::connection::ServerConnection

Source§

impl Deref for rustls::quic::connection::ServerConnection

Source§

impl Deref for syn::token::Slash

Source§

type Target = WithSpan

Source§

impl Deref for rustmax::syn::token::Slash

Source§

type Target = WithSpan

Source§

impl Deref for syn::token::Star

Source§

type Target = WithSpan

Source§

impl Deref for rustmax::syn::token::Star

Source§

type Target = WithSpan

Source§

impl Deref for Str

1.0.0 · Source§

impl Deref for String

Source§

impl Deref for SubjectPublicKeyInfoDer<'_>

Source§

impl Deref for TempPath

Source§

impl Deref for syn::token::Tilde

Source§

type Target = WithSpan

Source§

impl Deref for rustmax::syn::token::Tilde

Source§

type Target = WithSpan

Source§

impl Deref for TimeZoneShortId

Source§

impl Deref for Tls12ClientSessionValue

Available on crate feature tls12 only.
Source§

type Target = ClientSessionCommon

Source§

impl Deref for Tls13ClientSessionValue

Source§

type Target = ClientSessionCommon

Source§

impl Deref for UnbufferedClientConnection

Source§

impl Deref for UnbufferedServerConnection

Source§

impl Deref for syn::token::Underscore

Source§

type Target = WithSpan

Source§

impl Deref for rustmax::syn::token::Underscore

Source§

type Target = WithSpan

Source§

impl Deref for rustmax::axum::extract::ws::Utf8Bytes

Source§

impl Deref for tungstenite::protocol::frame::utf8::Utf8Bytes

Source§

impl Deref for V2

Source§

impl Deref for V3

Source§

impl Deref for V3_128b

Source§

impl Deref for V3_256b

Source§

impl Deref for V3_512b

Source§

impl Deref for Variants

Source§

impl Deref for WakerRef<'_>

Source§

impl<'a, B> Deref for MutBorrowedBit<'a, B>
where B: BitBlock,

Source§

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

Source§

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

Source§

impl<'a, R, T> Deref for lock_api::mutex::MappedMutexGuard<'a, R, T>
where R: RawMutex + 'a, T: 'a + ?Sized,

Source§

impl<'a, R, T> Deref for lock_api::rwlock::MappedRwLockReadGuard<'a, R, T>
where R: RawRwLock + 'a, T: 'a + ?Sized,

Source§

impl<'a, R, T> Deref for lock_api::rwlock::MappedRwLockWriteGuard<'a, R, T>
where R: RawRwLock + 'a, T: 'a + ?Sized,

Source§

impl<'a, R, T> Deref for lock_api::mutex::MutexGuard<'a, R, T>
where R: RawMutex + 'a, T: 'a + ?Sized,

Source§

impl<'a, R, T> Deref for lock_api::rwlock::RwLockReadGuard<'a, R, T>
where R: RawRwLock + 'a, T: 'a + ?Sized,

Source§

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

Source§

impl<'a, R, T> Deref for lock_api::rwlock::RwLockWriteGuard<'a, R, T>
where R: RawRwLock + 'a, T: 'a + ?Sized,

Source§

impl<'a, T, A> Deref for rustmax::prelude::vec::PeekMut<'a, T, A>
where A: Allocator,

Source§

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

Source§

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

Source§

impl<'a, T> Deref for rustmax::tokio::sync::MappedMutexGuard<'a, T>
where T: ?Sized,

Source§

impl<'a, T> Deref for ZeroVec<'a, T>
where T: AsULE,

Source§

impl<'a, V> Deref for VarZeroCow<'a, V>
where V: VarULE + ?Sized,

Source§

impl<'a> Deref for Curve25519SeedBin<'a>

Source§

type Target = Buffer<'a, Curve25519SeedBinType>

Source§

impl<'a> Deref for DecapsulationKeyBytes<'a>

Source§

type Target = Buffer<'a, DecapsulationKeyBytesType>

Source§

impl<'a> Deref for EcPrivateKeyBin<'a>

Source§

type Target = Buffer<'a, EcPrivateKeyBinType>

Source§

impl<'a> Deref for EcPrivateKeyRfc5915Der<'a>

Source§

type Target = Buffer<'a, EcPrivateKeyRfc5915DerType>

Source§

impl<'a> Deref for EcPublicKeyCompressedBin<'a>

Source§

type Target = Buffer<'a, EcPublicKeyCompressedBinType>

Source§

impl<'a> Deref for EcPublicKeyUncompressedBin<'a>

Source§

type Target = Buffer<'a, EcPublicKeyUncompressedBinType>

Source§

impl<'a> Deref for EncapsulationKeyBytes<'a>

Source§

type Target = Buffer<'a, EncapsulationKeyBytesType>

Source§

impl<'a> Deref for EndEntityCert<'a>

Source§

type Target = Cert<'a>

1.36.0 · Source§

impl<'a> Deref for IoSlice<'a>

1.36.0 · Source§

impl<'a> Deref for IoSliceMut<'a>

Source§

impl<'a> Deref for MaybeUninitSlice<'a>

Source§

impl<'a> Deref for Pkcs8V1Der<'a>

Source§

type Target = Buffer<'a, Pkcs8V1DerType>

Source§

impl<'a> Deref for Pkcs8V2Der<'a>

Source§

type Target = Buffer<'a, Pkcs8V2DerType>

Source§

impl<'a> Deref for PqdsaPrivateKeyRaw<'a>

Source§

type Target = Buffer<'a, PqdsaPrivateKeyRawType>

Source§

impl<'a> Deref for PqdsaSeedRaw<'a>

Source§

type Target = Buffer<'a, PqdsaSeedRawType>

Source§

impl<'a> Deref for PublicKeyX509Der<'a>

Source§

type Target = Buffer<'a, PublicKeyX509DerType>

Source§

impl<'a> Deref for shlex::Shlex<'a>

Source§

impl<'a> Deref for shlex::Shlex<'a>

Source§

impl<'c, 'a> Deref for syn::parse::StepCursor<'c, 'a>

Source§

impl<'c, 'a> Deref for rustmax::syn::parse::StepCursor<'c, 'a>

Source§

impl<'i> Deref for DeArray<'i>

Source§

impl<'s, T> Deref for SliceVec<'s, T>

Source§

impl<'s> Deref for SockRef<'s>

Source§

impl<A, T> Deref for Aligned<A, T>
where A: Alignment, T: ?Sized,

Source§

impl<A> Deref for tinyvec::arrayvec::ArrayVec<A>
where A: Array,

Source§

type Target = [<A as Array>::Item]

Source§

impl<A> Deref for SmallVec<A>
where A: Array,

Source§

type Target = [<A as Array>::Item]

Source§

impl<A> Deref for TinyVec<A>
where A: Array,

Source§

type Target = [<A as Array>::Item]

Source§

impl<B, T> Deref for zerocopy::ref::def::Ref<B, T>

1.0.0 · Source§

impl<B> Deref for Cow<'_, B>
where B: ToOwned + ?Sized,

Source§

impl<C0, C1, T> Deref for EitherCart<C0, C1>
where C0: Deref<Target = T>, C1: Deref<Target = T>, T: ?Sized,

Source§

impl<Data> Deref for rustls::quic::connection::ConnectionCommon<Data>

Source§

impl<I, S> Deref for Stateful<I, S>

Source§

impl<I> Deref for LocatingSlice<I>

Source§

impl<I> Deref for Partial<I>

Source§

impl<I> Deref for SubImage<I>
where I: Deref,

Source§

type Target = SubImageInner<I>

Source§

impl<K, V, S> Deref for AHashMap<K, V, S>

Source§

type Target = HashMap<K, V, S>

Source§

impl<L, R> Deref for Either<L, R>
where L: Deref, R: Deref<Target = <L as Deref>::Target>,

Source§

type Target = <L as Deref>::Target

Source§

impl<P, Container> Deref for ImageBuffer<P, Container>
where P: Pixel, Container: Deref<Target = [<P as Pixel>::Subpixel]>,

Source§

type Target = [<P as Pixel>::Subpixel]

1.33.0 (const: unstable) · Source§

impl<Ptr> Deref for Pin<Ptr>
where Ptr: Deref,

Source§

type Target = <Ptr as Deref>::Target

Source§

impl<S> Deref for BlockingStream<S>
where S: Stream + Unpin,

Source§

impl<S> Deref for State<S>

Source§

impl<T, A> Deref for ABox<T, A>
where A: Alignment, T: ?Sized,

Source§

impl<T, A> Deref for AVec<T, A>
where A: Alignment,

1.0.0 · Source§

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

1.0.0 · Source§

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

Source§

impl<T, A> Deref for GrayAlpha_v08<T, A>

Source§

type Target = GrayA<T, A>

1.12.0 · Source§

impl<T, A> Deref for rustmax::alloc::collections::binary_heap::PeekMut<'_, T, A>
where T: Ord, A: Allocator,

1.0.0 · Source§

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

Source§

impl<T, A> Deref for UniqueArc<T, A>
where A: Allocator, T: ?Sized,

Source§

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

1.0.0 (const: unstable) · Source§

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

Source§

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

1.100.0 (const: unstable) · Source§

impl<T, F> Deref for DropGuard<T, F>
where F: FnOnce(T),

Source§

impl<T, F> Deref for regex_automata::util::lazy::Lazy<T, F>
where F: Fn() -> T,

Source§

impl<T, F> Deref for once_cell::unsync::Lazy<T, F>
where F: FnOnce() -> T,

Source§

impl<T, F> Deref for once_cell::sync::Lazy<T, F>
where F: FnOnce() -> T,

1.80.0 · Source§

impl<T, F> Deref for LazyCell<T, F>
where F: FnOnce() -> T,

1.80.0 · Source§

impl<T, F> Deref for LazyLock<T, F>
where F: FnOnce() -> T,

Source§

impl<T, F> Deref for VarZeroVec<'_, T, F>
where T: VarULE + ?Sized, F: VarZeroVecFormat,

Source§

impl<T, N> Deref for GenericArray<T, N>
where N: ArrayLength<T>,

Source§

impl<T, S> Deref for AHashSet<T, S>

Source§

type Target = HashSet<T, S>

Source§

impl<T, U> Deref for Array<T, U>
where U: ArraySize,

Source§

impl<T, U> Deref for rustmax::futures::lock::MappedMutexGuard<'_, T, U>
where T: ?Sized, U: ?Sized,

Source§

impl<T, U> Deref for OwnedMappedMutexGuard<T, U>
where T: ?Sized, U: ?Sized,

Source§

impl<T, U> Deref for OwnedRwLockMappedWriteGuard<T, U>
where T: ?Sized, U: ?Sized,

Source§

impl<T, U> Deref for OwnedRwLockReadGuard<T, U>
where T: ?Sized, U: ?Sized,

Source§

impl<T, const CAP: usize> Deref for arrayvec::arrayvec::ArrayVec<T, CAP>

1.0.0 (const: unstable) · Source§

impl<T> Deref for &T
where T: ?Sized,

1.0.0 (const: unstable) · Source§

impl<T> Deref for &mut T
where T: ?Sized,

1.9.0 (const: unstable) · Source§

impl<T> Deref for AssertUnwindSafe<T>

Source§

impl<T> Deref for AutoFinisher<T>
where T: AutoFinish,

Source§

impl<T> Deref for CachePadded<T>

Source§

impl<T> Deref for ConnectInfo<T>

Source§

impl<T> Deref for rustls::conn::ConnectionCommon<T>

Source§

impl<T> Deref for Extension<T>

Source§

impl<T> Deref for Flock<T>
where T: Flockable,

Available on crate feature fs and neither Redox OS nor Solaris only.
Source§

impl<T> Deref for Form<T>

Source§

impl<T> Deref for Gray_v08<T>

Available on non-crate feature unstable-experimental only.
Source§

impl<T> Deref for Json<T>

1.20.0 (const: unstable) · Source§

impl<T> Deref for ManuallyDrop<T>
where T: ?Sized,

Source§

impl<T> Deref for rustmax::std::sync::nonpoison::MappedMutexGuard<'_, T>
where T: ?Sized,

Source§

impl<T> Deref for rustmax::std::sync::MappedMutexGuard<'_, T>
where T: ?Sized,

Source§

impl<T> Deref for rustmax::std::sync::nonpoison::MappedRwLockReadGuard<'_, T>
where T: ?Sized,

Source§

impl<T> Deref for rustmax::std::sync::MappedRwLockReadGuard<'_, T>
where T: ?Sized,

Source§

impl<T> Deref for rustmax::std::sync::nonpoison::MappedRwLockWriteGuard<'_, T>
where T: ?Sized,

Source§

impl<T> Deref for rustmax::std::sync::MappedRwLockWriteGuard<'_, T>
where T: ?Sized,

Source§

impl<T> Deref for MaybeStaticSlice<T>
where T: 'static,

Source§

impl<T> Deref for Metadata<'_, T>
where T: SmartDisplay + ?Sized,

Permit using Metadata as a smart pointer to the user-provided metadata.

Source§

impl<T> Deref for rustmax::std::sync::nonpoison::MutexGuard<'_, T>
where T: ?Sized,

1.0.0 · Source§

impl<T> Deref for rustmax::std::sync::MutexGuard<'_, T>
where T: ?Sized,

Source§

impl<T> Deref for rustmax::futures::lock::MutexGuard<'_, T>
where T: ?Sized,

Source§

impl<T> Deref for rustmax::tokio::sync::MutexGuard<'_, T>
where T: ?Sized,

Source§

impl<T> Deref for Owned<T>
where T: Pointable + ?Sized,

Source§

impl<T> Deref for rustmax::futures::lock::OwnedMutexGuard<T>
where T: ?Sized,

Source§

impl<T> Deref for rustmax::tokio::sync::OwnedMutexGuard<T>
where T: ?Sized,

Source§

impl<T> Deref for OwnedRwLockWriteGuard<T>
where T: ?Sized,

Source§

impl<T> Deref for Path<T>

Source§

impl<T> Deref for typed_path::common::non_utf8::pathbuf::PathBuf<T>
where T: Encoding,

Source§

impl<T> Deref for PlaneData<T>
where T: Pixel,

Source§

impl<T> Deref for Query<T>

Source§

impl<T> Deref for ReadOnly<T>
where T: Immutable + ?Sized,

Source§

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

Source§

impl<T> Deref for rustmax::tokio::sync::watch::Ref<'_, T>

1.0.0 (const: unstable) · Source§

impl<T> Deref for rustmax::core::cell::Ref<'_, T>
where T: ?Sized,

1.0.0 (const: unstable) · Source§

impl<T> Deref for RefMut<'_, T>
where T: ?Sized,

Source§

impl<T> Deref for RwLockMappedWriteGuard<'_, T>
where T: ?Sized,

Source§

impl<T> Deref for rustmax::std::sync::nonpoison::RwLockReadGuard<'_, T>
where T: ?Sized,

1.0.0 · Source§

impl<T> Deref for rustmax::std::sync::RwLockReadGuard<'_, T>
where T: ?Sized,

Source§

impl<T> Deref for rustmax::tokio::sync::RwLockReadGuard<'_, T>
where T: ?Sized,

Source§

impl<T> Deref for rustmax::std::sync::nonpoison::RwLockWriteGuard<'_, T>
where T: ?Sized,

1.0.0 · Source§

impl<T> Deref for rustmax::std::sync::RwLockWriteGuard<'_, T>
where T: ?Sized,

Source§

impl<T> Deref for rustmax::tokio::sync::RwLockWriteGuard<'_, T>
where T: ?Sized,

Source§

impl<T> Deref for ShardedLockReadGuard<'_, T>
where T: ?Sized,

Source§

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

Source§

impl<T> Deref for SharedPtr<T>
where T: SharedPtrTarget,

Source§

impl<T> Deref for libloading::safe::Symbol<'_, T>

Source§

impl<T> Deref for libloading::os::unix::Symbol<T>

Source§

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

Source§

impl<T> Deref for TokenSlice<'_, T>

Source§

impl<T> Deref for Triple<T>

Source§

impl<T> Deref for Unalign<T>
where T: Unaligned,

Source§

impl<T> Deref for UnbufferedConnectionCommon<T>

Source§

impl<T> Deref for UniquePtr<T>
where T: UniquePtrTarget,

Source§

impl<T> Deref for Utf8PathBuf<T>
where T: Utf8Encoding,

Source§

impl<Z> Deref for Zeroizing<Z>
where Z: Zeroize + ?Sized,

Source§

impl<const ARRAY_CAPACITY_MAX: usize> Deref for SmallStr<ARRAY_CAPACITY_MAX>

Source§

impl<const CAP: usize> Deref for ArrayString<CAP>

Source§

impl<const MAX_SIZE: usize> Deref for ObjectIdentifier<MAX_SIZE>

Source§

impl<const N: usize> Deref for ArrayStr<N>

Source§

impl<const N: usize> Deref for CcidEndpoints<N>

Available on Linux and crate feature all only.
Source§

impl<const N: usize> Deref for TinyAsciiStr<N>

Source§

impl<const SIZE: usize> Deref for WriteBuffer<SIZE>