Struct rs9p::serialize::Encoder [−][src]
pub struct Encoder<W> { /* fields omitted */ }
A wrapper class of WriteBytesExt to provide operator overloads for serializing
Operator ‘<<’ serializes the right hand side argument into the left hand side encoder
Implementations
impl<W: WriteBytesExt> Encoder<W>
[src]
pub fn new(writer: W) -> Encoder<W>
[src]
pub fn bytes_written(&self) -> usize
[src]
Return total bytes written
pub fn encode<T: Encodable>(&mut self, data: &T) -> Result<usize>
[src]
Encode data, equivalent to: decoder << data
pub fn into_inner(self) -> W
[src]
Get inner writer
Trait Implementations
impl<W: Clone> Clone for Encoder<W>
[src]
impl<W: Debug> Debug for Encoder<W>
[src]
impl<'a, T: Encodable, W: WriteBytesExt> Shl<&'a T> for Encoder<W>
[src]
Auto Trait Implementations
impl<W> RefUnwindSafe for Encoder<W> where
W: RefUnwindSafe,
W: RefUnwindSafe,
impl<W> Send for Encoder<W> where
W: Send,
W: Send,
impl<W> Sync for Encoder<W> where
W: Sync,
W: Sync,
impl<W> Unpin for Encoder<W> where
W: Unpin,
W: Unpin,
impl<W> UnwindSafe for Encoder<W> where
W: UnwindSafe,
W: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,