pub struct Config { /* private fields */ }Expand description
Configurable options for encoding and decoding byte slices using a builder pattern.
Construct an instance with Config::default().
Implementations§
Source§impl Config
impl Config
Sourcepub fn to_receiver<R: Read>(&mut self, r: R) -> Receiver<R>
pub fn to_receiver<R: Read>(&mut self, r: R) -> Receiver<R>
Construct a Receiver instance with this configuration.
Sourcepub fn to_sender<W: Write>(&mut self, w: W) -> Sender<W>
pub fn to_sender<W: Write>(&mut self, w: W) -> Sender<W>
Construct a Sender instance with this configuration.
Sourcepub fn typed<T: DeserializeOwned + Serialize>(&mut self) -> Config<T>
pub fn typed<T: DeserializeOwned + Serialize>(&mut self) -> Config<T>
Construct a framed::typed::Config instance to encode and decode a
serializable type T with this byte encoding configuration.
Sourcepub fn set_checksum(&mut self, checksum: Checksum) -> &mut Self
pub fn set_checksum(&mut self, checksum: Checksum) -> &mut Self
Set the checksum configuration.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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