Struct awint_macro_internals::CodeGen
source · 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 widthreturn_type
: if the bits need to be returnedmust_use
: wraps return values in a function for insuring#[must_use]
static_construction_fn
: construction for internal constantslit_construction_fn
: construction function for known literals of the return typeconstruction_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 matterconst_wrapper
: used for thebits
macro, pass theString
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>where
F0: RefUnwindSafe,
F1: RefUnwindSafe,
F2: RefUnwindSafe,
F3: RefUnwindSafe,
F4: RefUnwindSafe,
impl<'a, F0, F1, F2, F3, F4> Send for CodeGen<'a, F0, F1, F2, F3, F4>
impl<'a, F0, F1, F2, F3, F4> Sync for CodeGen<'a, F0, F1, F2, F3, F4>
impl<'a, F0, F1, F2, F3, F4> Unpin for CodeGen<'a, F0, F1, F2, F3, F4>
impl<'a, F0, F1, F2, F3, F4> UnwindSafe for CodeGen<'a, F0, F1, F2, F3, F4>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more