[][src]Struct ttf_parser::parser::LazyArray16

pub struct LazyArray16<'a, T> { /* fields omitted */ }

A slice-like container that converts internal binary data only on access.

This is a low-level, internal structure that should not be used directly.

Implementations

impl<'a, T: FromData> LazyArray16<'a, T>[src]

pub fn new(data: &'a [u8]) -> Self[src]

Creates a new LazyArray.

pub fn get(&self, index: u16) -> Option<T>[src]

Returns a value at index.

pub fn last(&self) -> Option<T>[src]

Returns the last value.

pub fn slice(&self, range: Range<u16>) -> Option<Self>[src]

Returns array's length.

pub fn len(&self) -> u16[src]

Returns array's length.

pub fn is_empty(&self) -> bool[src]

Checks if array is empty.

Performs a binary search by specified key.

pub fn binary_search_by<F>(&self, f: F) -> Option<(u16, T)> where
    F: FnMut(&T) -> Ordering
[src]

Performs a binary search using specified closure.

Trait Implementations

impl<'a, T: Clone> Clone for LazyArray16<'a, T>[src]

impl<'a, T: Copy> Copy for LazyArray16<'a, T>[src]

impl<'a, T: FromData + Debug + Copy> Debug for LazyArray16<'a, T>[src]

impl<T, '_> Default for LazyArray16<'_, T>[src]

impl<'a, T: FromData> IntoIterator for LazyArray16<'a, T>[src]

type Item = T

The type of the elements being iterated over.

type IntoIter = LazyArrayIter16<'a, T>

Which kind of iterator are we turning this into?

Auto Trait Implementations

impl<'a, T> RefUnwindSafe for LazyArray16<'a, T> where
    T: RefUnwindSafe

impl<'a, T> Send for LazyArray16<'a, T> where
    T: Send

impl<'a, T> Sync for LazyArray16<'a, T> where
    T: Sync

impl<'a, T> Unpin for LazyArray16<'a, T> where
    T: Unpin

impl<'a, T> UnwindSafe for LazyArray16<'a, T> where
    T: UnwindSafe

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<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.