pub struct Encoder { /* private fields */ }Expand description
Encoder for LNMP text format
Implementations§
Source§impl Encoder
impl Encoder
Sourcepub fn with_config(config: EncoderConfig) -> Self
pub fn with_config(config: EncoderConfig) -> Self
Creates a new encoder with custom configuration
Sourcepub fn with_semicolons(use_semicolons: bool) -> Self
👎Deprecated: Use new() for canonical format. Semicolons are not part of v0.2 canonical format.
pub fn with_semicolons(use_semicolons: bool) -> Self
Creates a new encoder with specified format (deprecated - use new() for canonical format)
Sourcepub fn encode(&self, record: &LnmpRecord) -> String
pub fn encode(&self, record: &LnmpRecord) -> String
Encodes a complete record into LNMP text format (canonical format with sorted fields)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Encoder
impl RefUnwindSafe for Encoder
impl Send for Encoder
impl Sync for Encoder
impl Unpin for Encoder
impl UnwindSafe for Encoder
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