pub struct NumAppender<T, const N: u32>(pub Option<T>);Expand description
An integer appender.
When T implements Default, AddAssign<T> and MulAssign<usize> then NumAppender<T, N>
implements Appender<T> in the following way: if self contains t of type T then
pushing s in self updates t into (t * N) + s.
This struct is useful when you want to parse an integer from a text file.
Tuple Fields§
§0: Option<T>Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<T, const N: u32> Freeze for NumAppender<T, N>where
T: Freeze,
impl<T, const N: u32> RefUnwindSafe for NumAppender<T, N>where
T: RefUnwindSafe,
impl<T, const N: u32> Send for NumAppender<T, N>where
T: Send,
impl<T, const N: u32> Sync for NumAppender<T, N>where
T: Sync,
impl<T, const N: u32> Unpin for NumAppender<T, N>where
T: Unpin,
impl<T, const N: u32> UnwindSafe for NumAppender<T, N>where
T: 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