pub struct BinaryLinoCodec {
pub options: BinaryLinoOptions,
pub limits: DecodeLimits,
}Expand description
Convenience codec for complete LiNo packets.
Fields§
§options: BinaryLinoOptions§limits: DecodeLimitsImplementations§
Source§impl BinaryLinoCodec
impl BinaryLinoCodec
pub fn new() -> Self
pub fn with_options(options: BinaryLinoOptions) -> Self
Sourcepub fn encode(&self, document: &[LiNo<String>]) -> BinaryResult<Vec<u8>>
pub fn encode(&self, document: &[LiNo<String>]) -> BinaryResult<Vec<u8>>
Encodes the supplied model without canonicalizing its groups.
Sourcepub fn decode(&self, bytes: &[u8]) -> BinaryResult<LinoDocument>
pub fn decode(&self, bytes: &[u8]) -> BinaryResult<LinoDocument>
Decodes exactly one complete packet, rejecting trailing bytes.
Trait Implementations§
Source§impl Clone for BinaryLinoCodec
impl Clone for BinaryLinoCodec
impl Copy for BinaryLinoCodec
Source§impl Debug for BinaryLinoCodec
impl Debug for BinaryLinoCodec
Auto Trait Implementations§
impl Freeze for BinaryLinoCodec
impl RefUnwindSafe for BinaryLinoCodec
impl Send for BinaryLinoCodec
impl Sync for BinaryLinoCodec
impl Unpin for BinaryLinoCodec
impl UnsafeUnpin for BinaryLinoCodec
impl UnwindSafe for BinaryLinoCodec
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