pub struct Requires<C, Raise, Err>{
pub cond: C,
/* private fields */
}
Available on crate feature
require
only.Expand description
Requires
is the final representation of a requirement, usable in the requirements!
macro.
When you use the requirement!
macro it will expand into a constant function which returns
a Requires
instance.
§Generics
C
: The required conditionRaise
: If the requirement was not fulfilled this is invoked to raise the correspondingErr
Err
: The error toRaise
if the requirement was not fulfilled
Fields§
§cond: C
The required condition
Implementations§
Trait Implementations§
Source§impl<C, Raise, Err> Condition for Requires<C, Raise, Err>
impl<C, Raise, Err> Condition for Requires<C, Raise, Err>
Source§fn check(&mut self, vector: Vector) -> MoveMask
fn check(&mut self, vector: Vector) -> MoveMask
Compute the condition over the vector, if any bit was set update seen to true.
§Returns
The MoveMask
used to extract the condition result, used to check validity of the input,
ensuring each byte fulfilled at least one condition.
Auto Trait Implementations§
impl<C, Raise, Err> Freeze for Requires<C, Raise, Err>
impl<C, Raise, Err> RefUnwindSafe for Requires<C, Raise, Err>where
C: RefUnwindSafe,
Raise: RefUnwindSafe,
impl<C, Raise, Err> Send for Requires<C, Raise, Err>
impl<C, Raise, Err> Sync for Requires<C, Raise, Err>
impl<C, Raise, Err> Unpin for Requires<C, Raise, Err>
impl<C, Raise, Err> UnwindSafe for Requires<C, Raise, Err>where
C: UnwindSafe,
Raise: UnwindSafe,
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