ImplBlockBuilder

Struct ImplBlockBuilder 

Source
pub(crate) struct ImplBlockBuilder<'a, D: DataExt> {
    pub(crate) input: &'a DeriveInput,
    pub(crate) data: &'a D,
    pub(crate) trt: Trait,
    pub(crate) field_type_trait_bounds: FieldBounds<'a>,
    pub(crate) zerocopy_crate: &'a Path,
    pub(crate) self_type_trait_bounds: SelfBounds<'a>,
    pub(crate) padding_check: Option<PaddingCheck>,
    pub(crate) inner_extras: Option<TokenStream>,
    pub(crate) outer_extras: Option<TokenStream>,
}

Fields§

§input: &'a DeriveInput§data: &'a D§trt: Trait§field_type_trait_bounds: FieldBounds<'a>§zerocopy_crate: &'a Path§self_type_trait_bounds: SelfBounds<'a>§padding_check: Option<PaddingCheck>§inner_extras: Option<TokenStream>§outer_extras: Option<TokenStream>

Implementations§

Source§

impl<'a, D: DataExt> ImplBlockBuilder<'a, D>

Source

pub(crate) fn new( input: &'a DeriveInput, data: &'a D, trt: Trait, field_type_trait_bounds: FieldBounds<'a>, zerocopy_crate: &'a Path, ) -> Self

Source

pub(crate) fn self_type_trait_bounds( self, self_type_trait_bounds: SelfBounds<'a>, ) -> Self

Source

pub(crate) fn padding_check<P: Into<Option<PaddingCheck>>>( self, padding_check: P, ) -> Self

Source

pub(crate) fn inner_extras(self, inner_extras: TokenStream) -> Self

Source

pub(crate) fn outer_extras<T: Into<Option<TokenStream>>>( self, outer_extras: T, ) -> Self

Source

pub(crate) fn build(self) -> TokenStream

Auto Trait Implementations§

§

impl<'a, D> Freeze for ImplBlockBuilder<'a, D>

§

impl<'a, D> RefUnwindSafe for ImplBlockBuilder<'a, D>
where D: RefUnwindSafe,

§

impl<'a, D> !Send for ImplBlockBuilder<'a, D>

§

impl<'a, D> !Sync for ImplBlockBuilder<'a, D>

§

impl<'a, D> Unpin for ImplBlockBuilder<'a, D>

§

impl<'a, D> UnwindSafe for ImplBlockBuilder<'a, D>
where D: RefUnwindSafe,

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.