pub struct VTableView<T>(/* private fields */)
where
T: ?Sized;Expand description
A typed view of a ValueVTable.
Implementations§
Source§impl<'a, T> VTableView<&'a mut T>
impl<'a, T> VTableView<&'a mut T>
Sourcepub fn of_deref() -> VTableView<&'a mut T>
pub fn of_deref() -> VTableView<&'a mut T>
Fetches the vtable for the type.
Source§impl<'a, T> VTableView<&'a T>
impl<'a, T> VTableView<&'a T>
Sourcepub fn of_deref() -> VTableView<&'a T>
pub fn of_deref() -> VTableView<&'a T>
Fetches the vtable for the type.
Source§impl<'a, T> VTableView<T>
impl<'a, T> VTableView<T>
Sourcepub fn of() -> VTableView<T>
pub fn of() -> VTableView<T>
Fetches the vtable for the type.
Sourcepub fn type_name(
&self,
) -> fn(&mut Formatter<'_>, TypeNameOpts) -> Result<(), Error>
pub fn type_name( &self, ) -> fn(&mut Formatter<'_>, TypeNameOpts) -> Result<(), Error>
cf. TypeNameFn
Sourcepub fn invariants(&self) -> Option<fn(&T) -> bool>
pub fn invariants(&self) -> Option<fn(&T) -> bool>
cf. InvariantsFn
Sourcepub fn partial_eq(&self) -> Option<fn(&T, &T) -> bool>
pub fn partial_eq(&self) -> Option<fn(&T, &T) -> bool>
cf. PartialEqFn for equality comparison
Sourcepub fn partial_ord(&self) -> Option<fn(&T, &T) -> Option<Ordering>>
pub fn partial_ord(&self) -> Option<fn(&T, &T) -> Option<Ordering>>
cf. PartialOrdFn for partial ordering comparison
Sourcepub fn hash(
&self,
) -> Option<for<'mem> fn(&'mem T, PtrMut<'mem>, for<'mem> unsafe fn(PtrMut<'mem>, &[u8]))>
pub fn hash( &self, ) -> Option<for<'mem> fn(&'mem T, PtrMut<'mem>, for<'mem> unsafe fn(PtrMut<'mem>, &[u8]))>
cf. HashFn
Sourcepub fn try_borrow_inner(
&self,
) -> Option<for<'src> fn(&'src T) -> Result<&'src T, TryBorrowInnerError>>
pub fn try_borrow_inner( &self, ) -> Option<for<'src> fn(&'src T) -> Result<&'src T, TryBorrowInnerError>>
cf. TryBorrowInnerFn
This is used by transparent types to efficiently access the inner value without copying.
Source§impl<'a, T> VTableView<T>where
T: Facet<'a>,
impl<'a, T> VTableView<T>where
T: Facet<'a>,
Sourcepub fn default_in_place(
&self,
) -> Option<for<'mem> fn(TypedPtrUninit<'mem, T>) -> &'mem mut T>
pub fn default_in_place( &self, ) -> Option<for<'mem> fn(TypedPtrUninit<'mem, T>) -> &'mem mut T>
cf. DefaultInPlaceFn
Sourcepub fn clone_into(
&self,
) -> Option<for<'src, 'dst> fn(&'src T, TypedPtrUninit<'dst, T>) -> &'dst mut T>
pub fn clone_into( &self, ) -> Option<for<'src, 'dst> fn(&'src T, TypedPtrUninit<'dst, T>) -> &'dst mut T>
cf. CloneIntoFn
Sourcepub fn parse(
&self,
) -> Option<for<'mem> fn(&str, TypedPtrUninit<'mem, T>) -> Result<&'mem mut T, ParseError>>
pub fn parse( &self, ) -> Option<for<'mem> fn(&str, TypedPtrUninit<'mem, T>) -> Result<&'mem mut T, ParseError>>
cf. ParseFn
Sourcepub fn try_from(
&self,
) -> Option<for<'src, 'mem, 'shape> fn(&'src T, &'static Shape, TypedPtrUninit<'mem, T>) -> Result<&'mem mut T, TryFromError>>
pub fn try_from( &self, ) -> Option<for<'src, 'mem, 'shape> fn(&'src T, &'static Shape, TypedPtrUninit<'mem, T>) -> Result<&'mem mut T, TryFromError>>
cf. TryFromFn
This also acts as a “TryFromInner” — you can use it to go:
String=>Utf8PathBufString=>UuidT=>Option<T>T=>Arc<T>T=>NonZero<T>- etc.
Sourcepub fn try_into_inner(
&self,
) -> Option<for<'src, 'dst> fn(&'src T, TypedPtrUninit<'dst, T>) -> Result<&'dst mut T, TryIntoInnerError>>
pub fn try_into_inner( &self, ) -> Option<for<'src, 'dst> fn(&'src T, TypedPtrUninit<'dst, T>) -> Result<&'dst mut T, TryIntoInnerError>>
cf. TryIntoInnerFn
This is used by transparent types to convert the wrapper type into its inner value. Primarily used during serialization.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for VTableView<T>where
T: ?Sized,
impl<T> RefUnwindSafe for VTableView<T>where
T: RefUnwindSafe + ?Sized,
impl<T> Send for VTableView<T>
impl<T> Sync for VTableView<T>
impl<T> Unpin for VTableView<T>
impl<T> UnwindSafe for VTableView<T>where
T: UnwindSafe + ?Sized,
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