pub struct Encoder<Seq>where
Seq: SerializeSeq,{
pub seq: Seq,
}
Expand description
An encoder to serialize a stream of packets.
Fields§
§seq: Seq
Implementations§
Source§impl<Seq> Encoder<Seq>where
Seq: SerializeSeq,
impl<Seq> Encoder<Seq>where
Seq: SerializeSeq,
Sourcepub fn new<S>(serializer: S) -> Result<Self, S::Error>where
S: Serializer<SerializeSeq = Seq>,
pub fn new<S>(serializer: S) -> Result<Self, S::Error>where
S: Serializer<SerializeSeq = Seq>,
Creates a new encoder for a serde::Serializer
.
§Errors
If the serializer cannot start a new sequence.
Trait Implementations§
Auto Trait Implementations§
impl<Seq> Freeze for Encoder<Seq>where
Seq: Freeze,
impl<Seq> RefUnwindSafe for Encoder<Seq>where
Seq: RefUnwindSafe,
impl<Seq> Send for Encoder<Seq>where
Seq: Send,
impl<Seq> Sync for Encoder<Seq>where
Seq: Sync,
impl<Seq> Unpin for Encoder<Seq>where
Seq: Unpin,
impl<Seq> UnwindSafe for Encoder<Seq>where
Seq: 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