pub struct CodeGen<'a, F0: FnMut(&str) -> String, F1: FnMut(Awi) -> String, F2: FnMut(Awi) -> String, F3: FnMut(&str, Option<NonZeroUsize>, Option<&str>) -> String, F4: FnMut(String, Option<NonZeroUsize>, bool) -> String> {
    pub static_width: bool,
    pub return_type: Option<&'a str>,
    pub must_use: F0,
    pub static_construction_fn: F1,
    pub lit_construction_fn: F2,
    pub construction_fn: F3,
    pub const_wrapper: F4,
    pub fn_names: FnNames<'a>,
}
Expand description

Note: the type must be unambiguous for the construction functions

  • static_width: if the type needs a statically known width
  • return_type: if the bits need to be returned
  • must_use: wraps return values in a function for insuring #[must_use]
  • static_construction_fn: construction for internal constants
  • lit_construction_fn: construction function for known literals of the return type
  • construction_fn: is input the specified initialization, width if it is statically known, and dynamic width if known. As a special case, the initialization is empty for when initialization doesn’t matter
  • const_wrapper: used for the bits macro, pass the String straight through otherwise

Fields§

§static_width: bool§return_type: Option<&'a str>§must_use: F0§static_construction_fn: F1§lit_construction_fn: F2§construction_fn: F3§const_wrapper: F4§fn_names: FnNames<'a>

Auto Trait Implementations§

§

impl<'a, F0, F1, F2, F3, F4> RefUnwindSafe for CodeGen<'a, F0, F1, F2, F3, F4>

§

impl<'a, F0, F1, F2, F3, F4> Send for CodeGen<'a, F0, F1, F2, F3, F4>
where F0: Send, F1: Send, F2: Send, F3: Send, F4: Send,

§

impl<'a, F0, F1, F2, F3, F4> Sync for CodeGen<'a, F0, F1, F2, F3, F4>
where F0: Sync, F1: Sync, F2: Sync, F3: Sync, F4: Sync,

§

impl<'a, F0, F1, F2, F3, F4> Unpin for CodeGen<'a, F0, F1, F2, F3, F4>
where F0: Unpin, F1: Unpin, F2: Unpin, F3: Unpin, F4: Unpin,

§

impl<'a, F0, F1, F2, F3, F4> UnwindSafe for CodeGen<'a, F0, F1, F2, F3, F4>
where F0: UnwindSafe, F1: UnwindSafe, F2: UnwindSafe, F3: UnwindSafe, F4: UnwindSafe,

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>,

§

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>,

§

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.