Struct ttf_parser::parser::LazyArray16 [−][src]
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.
pub fn binary_search(&self, key: &T) -> Option<(u16, T)> where
T: Ord,
[src]
T: Ord,
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]
F: FnMut(&T) -> Ordering,
Performs a binary search using specified closure.
Trait Implementations
impl<'a, T: Clone> Clone for LazyArray16<'a, T>
[src]
fn clone(&self) -> LazyArray16<'a, T>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[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]
Auto Trait Implementations
impl<'a, T> RefUnwindSafe for LazyArray16<'a, T> where
T: RefUnwindSafe,
[src]
T: RefUnwindSafe,
impl<'a, T> Send for LazyArray16<'a, T> where
T: Send,
[src]
T: Send,
impl<'a, T> Sync for LazyArray16<'a, T> where
T: Sync,
[src]
T: Sync,
impl<'a, T> Unpin for LazyArray16<'a, T> where
T: Unpin,
[src]
T: Unpin,
impl<'a, T> UnwindSafe for LazyArray16<'a, T> where
T: UnwindSafe,
[src]
T: UnwindSafe,
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,
pub 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.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
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.
pub 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>,