EntryMut

Struct EntryMut 

Source
pub struct EntryMut<'a, N: Ord + Clone, D> { /* private fields */ }
Expand description

A find_mut query on the interval tree does not directly return references to the nodes in the tree, but wraps the fields interval and data in an EntryMut. Only the data part can be mutably accessed using the data method

Implementations§

Source§

impl<'a, N: Ord + Clone + 'a, D: 'a> EntryMut<'a, N, D>

Source

pub fn data(&'a mut self) -> &'a mut D

Get a mutable reference to the data for this entry

Source

pub fn interval(&self) -> &'a Interval<N>

Get a reference to the interval for this entry

Trait Implementations§

Source§

impl<'a, N: Debug + Ord + Clone, D: Debug> Debug for EntryMut<'a, N, D>

Source§

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

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

impl<'a, N: Hash + Ord + Clone, D: Hash> Hash for EntryMut<'a, N, D>

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<'a, N: PartialEq + Ord + Clone, D: PartialEq> PartialEq for EntryMut<'a, N, D>

Source§

fn eq(&self, other: &EntryMut<'a, N, D>) -> 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<'a, N, D> Serialize for EntryMut<'a, N, D>
where N: Serialize + Ord + Clone, D: Serialize,

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<'a, N: Eq + Ord + Clone, D: Eq> Eq for EntryMut<'a, N, D>

Source§

impl<'a, N: Ord + Clone, D> StructuralPartialEq for EntryMut<'a, N, D>

Auto Trait Implementations§

§

impl<'a, N, D> Freeze for EntryMut<'a, N, D>

§

impl<'a, N, D> RefUnwindSafe for EntryMut<'a, N, D>

§

impl<'a, N, D> Send for EntryMut<'a, N, D>
where D: Send, N: Sync,

§

impl<'a, N, D> Sync for EntryMut<'a, N, D>
where D: Sync, N: Sync,

§

impl<'a, N, D> Unpin for EntryMut<'a, N, D>

§

impl<'a, N, D> !UnwindSafe for EntryMut<'a, N, D>

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<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
Source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V