pub struct Encoder<'a> { /* private fields */ }Implementations§
Source§impl<'a> Encoder<'a>
impl<'a> Encoder<'a>
pub fn new(text: &'a str) -> Result<Self, Error>
Sourcepub const unsafe fn from_length(text: &'a str, length: Length) -> Self
pub const unsafe fn from_length(text: &'a str, length: Length) -> Self
Reuses the encoded length admitted for this exact immutable text.
§Safety
length must describe these same text bytes, measured by this codec.
pub const fn length(&self) -> Length
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Encoder<'a>
impl<'a> RefUnwindSafe for Encoder<'a>
impl<'a> Send for Encoder<'a>
impl<'a> Sync for Encoder<'a>
impl<'a> Unpin for Encoder<'a>
impl<'a> UnsafeUnpin for Encoder<'a>
impl<'a> UnwindSafe for Encoder<'a>
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