VTableView

Struct VTableView 

Source
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>
where T: Facet<'a> + ?Sized,

Source

pub fn of_deref() -> VTableView<&'a mut T>

Fetches the vtable for the type.

Source§

impl<'a, T> VTableView<&'a T>
where T: Facet<'a> + ?Sized,

Source

pub fn of_deref() -> VTableView<&'a T>

Fetches the vtable for the type.

Source§

impl<'a, T> VTableView<T>
where T: Facet<'a> + ?Sized,

Source

pub const fn of() -> VTableView<T>

Fetches the vtable for the type.

Source

pub const fn type_name( &self, ) -> fn(&mut Formatter<'_>, TypeNameOpts) -> Result<(), Error>

Source

pub fn invariants(&self) -> Option<fn(TypedPtrConst<'_, T>) -> bool>

Source

pub fn display( &self, ) -> Option<fn(TypedPtrConst<'_, T>, &mut Formatter<'_>) -> Result<(), Error>>

Source

pub fn debug( &self, ) -> Option<fn(TypedPtrConst<'_, T>, &mut Formatter<'_>) -> Result<(), Error>>

cf. DebugFn

Source

pub fn partial_eq( &self, ) -> Option<fn(TypedPtrConst<'_, T>, TypedPtrConst<'_, T>) -> bool>

cf. PartialEqFn for equality comparison

Source

pub fn partial_ord( &self, ) -> Option<fn(TypedPtrConst<'_, T>, TypedPtrConst<'_, T>) -> Option<Ordering>>

cf. PartialOrdFn for partial ordering comparison

Source

pub fn ord( &self, ) -> Option<fn(TypedPtrConst<'_, T>, TypedPtrConst<'_, T>) -> Ordering>

cf. CmpFn for total ordering

Source

pub fn hash( &self, ) -> Option<for<'mem> fn(TypedPtrConst<'mem, T>, &mut dyn Hasher)>

cf. HashFn

Source

pub fn try_borrow_inner( &self, ) -> Option<for<'src> fn(TypedPtrConst<'src, T>) -> Result<TypedPtrConst<'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>,

Source

pub fn default_in_place( &self, ) -> Option<for<'mem> fn(TypedPtrUninit<'mem, T>) -> TypedPtrMut<'mem, T>>

Source

pub fn clone_into( &self, ) -> Option<for<'src, 'dst> fn(TypedPtrConst<'src, T>, TypedPtrUninit<'dst, T>) -> TypedPtrMut<'dst, T>>

Source

pub fn parse( &self, ) -> Option<for<'mem> fn(&str, TypedPtrUninit<'mem, T>) -> Result<TypedPtrMut<'mem, T>, ParseError>>

cf. ParseFn

Source

pub fn try_from( &self, ) -> Option<for<'src, 'mem, 'shape> fn(TypedPtrConst<'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 => Utf8PathBuf
  • String => Uuid
  • T => Option<T>
  • T => Arc<T>
  • T => NonZero<T>
  • etc.
Source

pub fn try_into_inner( &self, ) -> Option<for<'src, 'dst> fn(TypedPtrConst<'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§

Source§

impl<T> Debug for VTableView<T>
where T: Debug + ?Sized,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

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>
where T: Send + ?Sized,

§

impl<T> Sync for VTableView<T>
where T: Sync + ?Sized,

§

impl<T> Unpin for VTableView<T>
where T: Unpin + ?Sized,

§

impl<T> UnwindSafe for VTableView<T>
where T: UnwindSafe + ?Sized,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.