pub struct Assert<T: Parse, U: Display> { /* private fields */ }
Expand description
The container struct for assert method and its type.
Implementations§
Source§impl<T: Parse, U: Display> Assert<T, U>
impl<T: Parse, U: Display> Assert<T, U>
Sourcepub fn error(&self, arg: TokenStream2, error: U)
pub fn error(&self, arg: TokenStream2, error: U)
§Panics
- when it is success to parse
- when there is different in error message
Sourcepub fn ok<V>(&self, arg: TokenStream2, assert: V)where
V: FnOnce(T),
pub fn ok<V>(&self, arg: TokenStream2, 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> Freeze for Assert<T, U>
impl<T, U> RefUnwindSafe for Assert<T, U>where
T: RefUnwindSafe,
U: RefUnwindSafe,
impl<T, U> Send for Assert<T, U>
impl<T, U> Sync for Assert<T, U>
impl<T, U> Unpin for Assert<T, U>
impl<T, U> UnwindSafe for Assert<T, U>where
T: UnwindSafe,
U: 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