pub enum EncodedString {
Latin1(Bytes),
Utf16Le(Bytes),
Utf16Be(Bytes),
}
Expand description
We inline the fields in V8String here to save some bytes in the serialized proto format. Interning is about saving bytes so this makes sense here.
Variants§
Latin1(Bytes)
ISO/IEC 8859-1:1998 encoding aka latin1 https://en.wikipedia.org/wiki/ISO/IEC_8859-1
Utf16Le(Bytes)
UTF-16 Little Endian Encoding
Utf16Be(Bytes)
UTF-16 Big Endian Encoding
Implementations§
Source§impl EncodedString
impl EncodedString
Sourcepub fn merge<B>(
field: &mut Option<EncodedString>,
tag: u32,
wire_type: WireType,
buf: &mut B,
ctx: DecodeContext,
) -> Result<(), DecodeError>where
B: Buf,
pub fn merge<B>(
field: &mut Option<EncodedString>,
tag: u32,
wire_type: WireType,
buf: &mut B,
ctx: DecodeContext,
) -> Result<(), DecodeError>where
B: Buf,
Decodes an instance of the message from a buffer, and merges it into self.
Sourcepub fn encoded_len(&self) -> usize
pub fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
Trait Implementations§
Source§impl Clone for EncodedString
impl Clone for EncodedString
Source§fn clone(&self) -> EncodedString
fn clone(&self) -> EncodedString
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for EncodedString
impl Debug for EncodedString
Source§impl PartialEq for EncodedString
impl PartialEq for EncodedString
impl StructuralPartialEq for EncodedString
Auto Trait Implementations§
impl !Freeze for EncodedString
impl RefUnwindSafe for EncodedString
impl Send for EncodedString
impl Sync for EncodedString
impl Unpin for EncodedString
impl UnwindSafe for EncodedString
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