[−][src]Struct var_byte_str::VarByteString
The core struct that represent variable byte encoded of gap of string.
See module documentation for more detail
Implementations
impl VarByteString
[src]
pub fn buffer_len(&self) -> usize
[src]
Return number of bytes of buffer that represent the string
pub fn sign_len(&self) -> usize
[src]
Return number of bit of sign
that represent the string
pub fn len(&self) -> usize
[src]
pub fn size(&self) -> usize
[src]
Return number of bytes this object require to represent the string
pub fn chars(&self) -> Charsⓘ
[src]
Return an iterator of chars where each iteration return
a char
primitive converted from this representation.
pub fn gaps(&self) -> Gapsⓘ
[src]
Return an iterator of gaps where each iteration return a different between current character and previous character. The first iteration always return a code point. It return code point "as is" from original value.
pub fn gaps_bytes(&self) -> GapsBytesⓘ
[src]
Return an iterator of bytes of gap where each iteration
return a tuple of bool
and SmallVec<[u8; 5]>
. The bool
part is true when the
bytes it represent should be convert to negative value. The SmallVec<[u8; 5]>
part
contain absolute value of different in least significant byte first order.
Trait Implementations
impl Clone for VarByteString
[src]
fn clone(&self) -> VarByteString
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for VarByteString
[src]
impl Display for VarByteString
[src]
impl Eq for VarByteString
[src]
impl<S> From<S> for VarByteString where
S: Borrow<str>,
[src]
S: Borrow<str>,
Add a way to construct this object from any kind of str
fn from(s: S) -> VarByteString
[src]
impl Hash for VarByteString
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<'a> Into<String> for &'a VarByteString
[src]
Add a way to convert back this object into String
impl<'a> Into<String> for VarByteString
[src]
Add a way to consume this object and turn it into String
impl<S> PartialEq<S> for VarByteString where
S: Borrow<str>,
[src]
S: Borrow<str>,
Allow VarByteString to allow using operator ==
with &str
fn eq(&self, other: &S) -> bool
[src]
It compare with &str by encodes other string into variable gap bytes then compare it to self.
#[must_use]fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl PartialEq<VarByteString> for VarByteString
[src]
fn eq(&self, other: &VarByteString) -> bool
[src]
fn ne(&self, other: &VarByteString) -> bool
[src]
impl<S> PartialOrd<S> for VarByteString where
S: Borrow<str>,
[src]
S: Borrow<str>,
Allow VarByteString to be comparable with &str
fn partial_cmp(&self, other: &S) -> Option<Ordering>
[src]
It compare by encode other as &str
into variable gap bytes and compare based on sign and bytes
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl StructuralEq for VarByteString
[src]
impl StructuralPartialEq for VarByteString
[src]
Auto Trait Implementations
impl RefUnwindSafe for VarByteString
impl Send for VarByteString
impl Sync for VarByteString
impl Unpin for VarByteString
impl UnwindSafe for VarByteString
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,