zerovec_derive::make_varule

Struct UnsizedFields

source
struct UnsizedFields<'a> {
    fields: Vec<UnsizedField<'a>>,
}

Fields§

§fields: Vec<UnsizedField<'a>>

Implementations§

source§

impl<'a> UnsizedFields<'a>

source

fn new(fields: Vec<UnsizedField<'a>>) -> Self

source

fn varule_ty(&self) -> TokenStream2

source

fn varule_accessor(&self) -> TokenStream2

source

fn varule_setter(&self) -> TokenStream2

source

fn varule_vis(&self) -> TokenStream2

source

fn has_zf(&self) -> bool

source

fn encode_write(&self, out: TokenStream2) -> TokenStream2

source

fn encode_len(&self) -> TokenStream2

source

fn push_zf_setters(&self, lt: &Lifetime, field_inits: &mut Vec<TokenStream2>)

Constructs ZeroFrom setters for each field of the stack type

source

fn maybe_multi_getters(&self) -> Option<TokenStream2>

source

fn varule_validator(&self) -> Option<TokenStream2>

In case this needs custom validation code, return it

The code will validate a variable known as last_field_bytes

Auto Trait Implementations§

§

impl<'a> Freeze for UnsizedFields<'a>

§

impl<'a> RefUnwindSafe for UnsizedFields<'a>

§

impl<'a> !Send for UnsizedFields<'a>

§

impl<'a> !Sync for UnsizedFields<'a>

§

impl<'a> Unpin for UnsizedFields<'a>

§

impl<'a> UnwindSafe for UnsizedFields<'a>

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.