Skip to main content

ToServerBodyWire

Struct ToServerBodyWire 

Source
pub struct ToServerBodyWire;

Trait Implementations§

Source§

impl Wire for ToServerBodyWire

Source§

const FIXED_SIZE: Option<usize> = ::std::option::Option::None

The encoded size if every value of this type has the same size.
Source§

const MIN_SIZE: usize = 1

A lower bound on the encoded size, used to reject impossible element counts early.
Source§

type Ref<'a> = ToServerBodyRef<'a>

The borrowed form returned by accessors. Cheap to copy.
Source§

type Owned = ToServerBody

The owned form used for building and encoding values.
Source§

type Root = ()

Lifetime-free state a root View keeps to rebuild its Ref without walking the input again, such as a struct’s field offsets.
Source§

fn verify<'a>(v: &mut Verifier<'a>) -> Result<ToServerBodyRef<'a>, DecodeError>

Checks one value at the verifier’s position and returns its borrowed form.
Source§

fn read<'a>(r: &mut Reader<'a>) -> ToServerBodyRef<'a>

Reads one verified value and advances past it.
Source§

fn skip(r: &mut Reader<'_>)

Advances past one verified value.
Source§

fn read_span(r: Reader<'_>) -> ToServerBodyRef<'_>

Reads a verified value that spans exactly the reader. Types whose end is otherwise found by walking their contents, such as lists, use the known end instead.
Source§

fn root(_: &ToServerBodyRef<'_>)

Extracts the state a root view keeps.
Source§

fn from_root(r: Reader<'_>, _: ()) -> ToServerBodyRef<'_>

Rebuilds the borrowed form of a root value spanning exactly r.
Source§

fn read_owned(r: &mut Reader<'_>) -> ToServerBody

Reads one verified value as owned, sharing str and data bytes with the input.
Source§

fn verify_owned(v: &mut Verifier<'_>) -> Result<ToServerBody, DecodeError>

Checks one value at the verifier’s position and returns it as owned, sharing str and data bytes with the input. Read more
Source§

fn encoded_len(value: &ToServerBody) -> usize

Source§

fn encode<S: Sink>(value: &ToServerBody, out: &mut S)

Source§

fn ref_encoded_len(value: ToServerBodyRef<'_>) -> usize

Source§

fn encode_ref<S: Sink>(value: ToServerBodyRef<'_>, out: &mut S)

Encodes a borrowed value. Verified input is canonical, so this reproduces the input bytes.

Auto Trait Implementations§

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.