pub struct MllpCodec {}Implementations§
Source§impl MllpCodec
impl MllpCodec
pub fn encode(with: &[u8]) -> Vec<u8> ⓘ
pub fn decode(with: &[u8]) -> Result<&[u8], MllpSyntaxError>
Sourcepub fn ack() -> [u8; 4]
pub fn ack() -> [u8; 4]
Creates an MLLP ACK.
use mllp_rs::MllpCodec;
let ack = MllpCodec::ack();Sourcepub fn nak() -> [u8; 4]
pub fn nak() -> [u8; 4]
Creates an MLLP NAK (Negative ACK).
use mllp_rs::MllpCodec;
let nak = MllpCodec::nak();pub fn is_ack(with: &[u8]) -> bool
pub fn is_nak(with: &[u8]) -> bool
Auto Trait Implementations§
impl Freeze for MllpCodec
impl RefUnwindSafe for MllpCodec
impl Send for MllpCodec
impl Sync for MllpCodec
impl Unpin for MllpCodec
impl UnwindSafe for MllpCodec
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