Reader

Trait Reader 

Source
pub trait Reader {
    // Required method
    fn read_from_slice(&self, reader: &mut UserSliceReader) -> Result;
}
Expand description

A trait for types that can be updated from a user slice.

This works similarly to FromStr, but operates on a UserSliceReader rather than a &str.

It is automatically implemented for all atomic integers, or any type that implements FromStr wrapped in a Mutex.

Required Methods§

Source

fn read_from_slice(&self, reader: &mut UserSliceReader) -> Result

Updates the value from the given user slice.

Implementors§

Source§

impl<T: FromStr + Unpin> Reader for Mutex<T>

Source§

impl<T: AtomicType + FromStr> Reader for Atomic<T>
where T::Repr: AtomicBasicOps,