pub struct Encoder { /* private fields */ }Expand description
Idiomatic encoder bound to a mode (and optional mapping).
Implementations§
Source§impl Encoder
impl Encoder
Sourcepub fn new(mode: Mode) -> Self
pub fn new(mode: Mode) -> Self
Create an encoder for mode.
For Mode::Session, prefer crate::Session::builder.
Sourcepub fn with_mapping(mode: Mode, mapping: Mapping) -> Self
pub fn with_mapping(mode: Mode, mapping: Mapping) -> Self
Create an encoder with an explicit mapping (session or custom).
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 UnsafeUnpin 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