Struct assert_parse::Assert
source · [−]Expand description
The container struct for assert method and its type.
Implementations
sourceimpl<T, U> Assert<T, U> where
T: Parse,
U: Display,
impl<T, U> Assert<T, U> where
T: Parse,
U: Display,
sourcepub fn error(&self, arg: TokenStream, error: U)
pub fn error(&self, arg: TokenStream, error: U)
Panics
- when it is success to parse
- when there is different in error message
sourcepub fn ok<V>(&self, arg: TokenStream, assert: V) where
V: FnOnce(T),
pub fn ok<V>(&self, arg: TokenStream, assert: V) where
V: FnOnce(T),
Panics
- when it is failed to parse
- when it is failed to finish to call assert
Auto Trait Implementations
impl<T, U> RefUnwindSafe for Assert<T, U> where
T: RefUnwindSafe,
U: RefUnwindSafe,
impl<T, U> Send for Assert<T, U> where
T: Send,
U: Send,
impl<T, U> Sync for Assert<T, U> where
T: Sync,
U: Sync,
impl<T, U> Unpin for Assert<T, U> where
T: Unpin,
U: Unpin,
impl<T, U> UnwindSafe for Assert<T, U> where
T: UnwindSafe,
U: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more