Trait microkelvin::GetMaxKey
source · [−]pub trait GetMaxKey<'a, A, K> where
Self: Compound<A>,
Self::Leaf: Keyed<K>,
A: Annotation<Self::Leaf> + Borrow<MaxKey<K>>,
K: Ord, {
fn max_key(&'a self) -> Result<Option<Branch<'a, Self, A>>, CanonError>;
fn max_key_mut(
&'a mut self
) -> Result<Option<BranchMut<'a, Self, A>>, CanonError>
where
Self: MutableLeaves;
}
Expand description
Trait that provides a max_leaf() method to any Compound with a MaxKey annotation
Required methods
Construct a Branch
pointing to the element with the largest key
fn max_key_mut(
&'a mut self
) -> Result<Option<BranchMut<'a, Self, A>>, CanonError> where
Self: MutableLeaves,
fn max_key_mut(
&'a mut self
) -> Result<Option<BranchMut<'a, Self, A>>, CanonError> where
Self: MutableLeaves,
Construct a BranchMut
pointing to the element with the largest key