pub struct Config<Repr: KindRepr> {
pub allowed_combinations_message: &'static str,
pub derive_unaligned: bool,
pub allowed_combinations: &'static [&'static [Repr]],
pub disallowed_but_legal_combinations: &'static [&'static [Repr]],
}
Fields§
§allowed_combinations_message: &'static str
§derive_unaligned: bool
§allowed_combinations: &'static [&'static [Repr]]
§disallowed_but_legal_combinations: &'static [&'static [Repr]]
Implementations§
source§impl<R: KindRepr> Config<R>
impl<R: KindRepr> Config<R>
sourcepub fn validate_reprs(&self, input: &DeriveInput) -> Result<Vec<R>, Vec<Error>>
pub fn validate_reprs(&self, input: &DeriveInput) -> Result<Vec<R>, Vec<Error>>
Validate that input
’s representation attributes conform to the
requirements specified by this Config
.
validate_reprs
extracts the repr
attributes, validates that they
conform to the requirements of self
, and returns them. Regardless of
whether align
attributes are considered during validation, they are
stripped out of the returned value since no callers care about them.
Auto Trait Implementations§
impl<Repr> Freeze for Config<Repr>
impl<Repr> RefUnwindSafe for Config<Repr>where
Repr: RefUnwindSafe,
impl<Repr> Send for Config<Repr>where
Repr: Sync,
impl<Repr> Sync for Config<Repr>where
Repr: Sync,
impl<Repr> Unpin for Config<Repr>
impl<Repr> UnwindSafe for Config<Repr>where
Repr: RefUnwindSafe,
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