[][src]Struct var_byte_str::GapsBytes

pub struct GapsBytes<'a> { /* fields omitted */ }

An iterator that return gap as copy of variable byte encoded along with sign boolean. Each iteration return a tuple of bool and SmallVec<[u8; 5]>. The bool part is true when the bytes it represent should be convert into negative value. The SmallVec<[u8; 5]> part contain absolute value of different in least significant byte first order.

For example, if the different is 1. The return value will be (false, [1]). If the different is -1, the return value will be (true, [1]).

It has the same assumption as Gaps. It doesn't check validity of value.

Trait Implementations

impl<'a> ExactSizeIterator for GapsBytes<'a>[src]

impl<'a> FusedIterator for GapsBytes<'a>[src]

impl<'a> Iterator for GapsBytes<'a>[src]

type Item = (bool, SmallVec<[u8; 5]>)

Max number of bytes needed to store largest gap between two Unicode characters is 33 bits. Since variable byte encoding have 7 bits available per byte, so largest gap can be represent by 5 bytes.

Auto Trait Implementations

impl<'a> RefUnwindSafe for GapsBytes<'a>

impl<'a> Send for GapsBytes<'a>

impl<'a> Sync for GapsBytes<'a>

impl<'a> Unpin for GapsBytes<'a>

impl<'a> UnwindSafe for GapsBytes<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.