Struct Indices

Source
pub struct Indices<T: ?Sized> { /* private fields */ }
Expand description

Indices of usize to identify a node in a TreeSchema

Implementations§

Source§

impl<T> Indices<T>

Source

pub fn new(data: T, len: usize) -> Self

Create a new Indices

Source

pub fn len(&self) -> usize

The length of the indices keys

Source

pub fn is_empty(&self) -> bool

Source

pub fn into_inner(self) -> (T, usize)

Split indices into data and length

Trait Implementations§

Source§

impl<U, T: AsRef<[U]> + ?Sized> AsRef<[U]> for Indices<T>

Source§

fn as_ref(&self) -> &[U]

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl<T: Clone + ?Sized> Clone for Indices<T>

Source§

fn clone(&self) -> Indices<T>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T: Debug + ?Sized> Debug for Indices<T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T: Default + ?Sized> Default for Indices<T>

Source§

fn default() -> Indices<T>

Returns the “default value” for a type. Read more
Source§

impl<'de, T> Deserialize<'de> for Indices<T>
where T: Deserialize<'de> + ?Sized,

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl<T> From<T> for Indices<T>

Source§

fn from(value: T) -> Self

Converts to this type from the input type.
Source§

impl<'a, U, T: ?Sized> IntoIterator for &'a Indices<T>
where &'a T: IntoIterator<Item = U>,

Source§

type Item = U

The type of the elements being iterated over.
Source§

type IntoIter = Take<<&'a T as IntoIterator>::IntoIter>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl<T: Ord + ?Sized> Ord for Indices<T>

Source§

fn cmp(&self, other: &Indices<T>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl<T: PartialEq + ?Sized> PartialEq for Indices<T>

Source§

fn eq(&self, other: &Indices<T>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<T: PartialOrd + ?Sized> PartialOrd for Indices<T>

Source§

fn partial_cmp(&self, other: &Indices<T>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<T> Serialize for Indices<T>
where T: Serialize + ?Sized,

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<T: AsMut<[usize]> + ?Sized> Transcode for Indices<T>

Source§

type Error = <[usize] as Transcode>::Error

The possible error when transcoding. Read more
Source§

fn transcode( &mut self, schema: &Schema, keys: impl IntoKeys, ) -> Result<(), DescendError<Self::Error>>

Perform a node lookup of a K: IntoKeys on a Schema and transcode it. Read more
Source§

impl<T: Copy + ?Sized> Copy for Indices<T>

Source§

impl<T: Eq + ?Sized> Eq for Indices<T>

Source§

impl<T: ?Sized> StructuralPartialEq for Indices<T>

Auto Trait Implementations§

§

impl<T> Freeze for Indices<T>
where T: Freeze + ?Sized,

§

impl<T> RefUnwindSafe for Indices<T>
where T: RefUnwindSafe + ?Sized,

§

impl<T> Send for Indices<T>
where T: Send + ?Sized,

§

impl<T> Sync for Indices<T>
where T: Sync + ?Sized,

§

impl<T> Unpin for Indices<T>
where T: Unpin + ?Sized,

§

impl<T> UnwindSafe for Indices<T>
where T: UnwindSafe + ?Sized,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<!> for T

Source§

fn from(t: !) -> T

Converts to this type from the input type.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,