Skip to main content

DisplayVisitor

Struct DisplayVisitor 

Source
pub struct DisplayVisitor<'a, 'fmt, W> { /* private fields */ }

Implementations§

Source§

impl<'a, 'fmt, W> DisplayVisitor<'a, 'fmt, W>

Source

pub fn new(input: &'a mut &'a [u8], f: &'fmt mut W) -> Self

Source

pub fn has_displayed_whole_input(&self) -> bool

Source§

impl<W: Write> DisplayVisitor<'_, '_, W>

Source

pub fn read_usize_borsh(&mut self) -> Result<usize, FormatError>

Source

pub fn display_byte_sequence( &mut self, len: usize, display: ByteDisplay, _context: Context, ) -> Result<(), FormatError>

Trait Implementations§

Source§

impl<W: Write, L: LinkingScheme, M> TypeVisitor<L, M> for DisplayVisitor<'_, '_, W>

Source§

type Arg = Context

Source§

type ReturnType = Result<(), FormatError>

Source§

fn visit_enum( &mut self, e: &Enum<L>, schema: &impl TypeResolver<LinkingScheme = L>, context: Context, ) -> Self::ReturnType

Source§

fn visit_struct( &mut self, s: &Struct<L>, schema: &impl TypeResolver<LinkingScheme = L>, context: Context, ) -> Self::ReturnType

Source§

fn visit_tuple( &mut self, t: &Tuple<L>, schema: &impl TypeResolver<LinkingScheme = L>, context: Context, ) -> Self::ReturnType

Source§

fn visit_option( &mut self, value: &L::TypeLink, schema: &impl TypeResolver<LinkingScheme = L>, context: Self::Arg, ) -> Self::ReturnType

Source§

fn visit_primitive( &mut self, p: Primitive, _schema: &impl TypeResolver<LinkingScheme = L>, context: Context, ) -> Self::ReturnType

Source§

fn visit_array( &mut self, len: &usize, value: &L::TypeLink, schema: &impl TypeResolver<LinkingScheme = L>, context: Context, ) -> Self::ReturnType

Source§

fn visit_vec( &mut self, value: &L::TypeLink, schema: &impl TypeResolver<LinkingScheme = L>, context: Context, ) -> Self::ReturnType

Source§

fn visit_map( &mut self, key: &L::TypeLink, value: &L::TypeLink, schema: &impl TypeResolver<LinkingScheme = L>, context: Context, ) -> Self::ReturnType

Auto Trait Implementations§

§

impl<'a, 'fmt, W> Freeze for DisplayVisitor<'a, 'fmt, W>

§

impl<'a, 'fmt, W> RefUnwindSafe for DisplayVisitor<'a, 'fmt, W>
where W: RefUnwindSafe,

§

impl<'a, 'fmt, W> Send for DisplayVisitor<'a, 'fmt, W>
where W: Send,

§

impl<'a, 'fmt, W> Sync for DisplayVisitor<'a, 'fmt, W>
where W: Sync,

§

impl<'a, 'fmt, W> Unpin for DisplayVisitor<'a, 'fmt, W>

§

impl<'a, 'fmt, W> UnsafeUnpin for DisplayVisitor<'a, 'fmt, W>

§

impl<'a, 'fmt, W> !UnwindSafe for DisplayVisitor<'a, 'fmt, W>

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> Same for T

Source§

type Output = T

Should always be Self
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.