Enum UnOp
pub enum UnOp {
Int(IntUnOp),
Cast(CastOp),
GetThinPointer,
GetMetadata,
ComputeSize(Type),
ComputeAlign(Type),
VTableMethodLookup(TraitMethodName),
}Variants§
Int(IntUnOp)
An operation on an integer; returns an integer of the same type.
Cast(CastOp)
A form of cast; the return type is given by the specific cast operation.
GetThinPointer
Returns a raw pointer with same thin pointer as the operand, but without the metadata.
GetMetadata
Returns the metadata of a pointer as a value.
The return type is given by PointerMetaKind::ty(), e.g., for a thin pointer this is ().
ComputeSize(Type)
Returns the dynamic size of the type given the pointer metadata.
The operand must be a matching metadata for the type. For sized types this is ().
ComputeAlign(Type)
Returns the dynamic alignment of the type given the pointer metadata.
The operand must be a matching metadata for the type. For sized types this is ().
VTableMethodLookup(TraitMethodName)
Lookup the function pointer for a trait object method.
The operand must be a pointer to a vtable as returned by Constant::VTablePointer.
The parameter specifies which method of the vtable to look up.
Trait Implementations§
impl Copy for UnOp
§impl<'de> Deserialize<'de> for UnOp
impl<'de> Deserialize<'de> for UnOp
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<UnOp, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<UnOp, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for UnOp
§impl Ord for UnOp
impl Ord for UnOp
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
§impl PartialOrd for UnOp
impl PartialOrd for UnOp
§impl Serialize for UnOp
impl Serialize for UnOp
§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,
impl StructuralPartialEq for UnOp
Auto Trait Implementations§
impl !Send for UnOp
impl !Sync for UnOp
impl Freeze for UnOp
impl RefUnwindSafe for UnOp
impl Unpin for UnOp
impl UnsafeUnpin for UnOp
impl UnwindSafe for UnOp
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
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
§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
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> ⓘ
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> ⓘ
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