Enum PtrType
pub enum PtrType {
Ref {
mutbl: Mutability,
pointee: PointeeInfo,
},
Box {
pointee: PointeeInfo,
},
Raw {
meta_kind: PointerMetaKind,
},
FnPtr,
VTablePtr(TraitName),
}Expand description
Stores all the information that we need to know about a pointer.
Variants§
Ref
Fields
§
mutbl: MutabilityIndicates a shared vs mutable reference.
§
pointee: PointeeInfoDescribes what we know about the pointee.
Box
Fields
§
pointee: PointeeInfoRaw
Fields
§
meta_kind: PointerMetaKindIndicates what kind of metadata this pointer carries.
FnPtr
VTablePtr(TraitName)
This is a “stand-alone” vtable pointer, something that does not exist in surface Rust.
Implementations§
§impl PtrType
impl PtrType
pub fn as_wide_pair<T>(self) -> Option<Type>where
T: Target + Obj,
pub fn as_wide_pair<T>(self) -> Option<Type>where
T: Target + Obj,
Returns a pair type representing this wide pointer or None if it is thin.
§impl PtrType
impl PtrType
pub fn safe_pointee(self) -> Option<PointeeInfo>
pub fn safe_pointee(self) -> Option<PointeeInfo>
If this is a safe pointer, return the pointee information.
pub fn meta_kind(self) -> PointerMetaKind
Trait Implementations§
impl Copy for PtrType
§impl<'de> Deserialize<'de> for PtrType
impl<'de> Deserialize<'de> for PtrType
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<PtrType, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<PtrType, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for PtrType
§impl Ord for PtrType
impl Ord for PtrType
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
§impl PartialOrd for PtrType
impl PartialOrd for PtrType
§impl Serialize for PtrType
impl Serialize for PtrType
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for PtrType
Auto Trait Implementations§
impl !Send for PtrType
impl !Sync for PtrType
impl Freeze for PtrType
impl RefUnwindSafe for PtrType
impl Unpin for PtrType
impl UnsafeUnpin for PtrType
impl UnwindSafe for PtrType
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more