Trait microkelvin::Nth
source · [−]pub trait Nth<'a, A> where
Self: Compound<A>,
A: Annotation<Self::Leaf> + Borrow<Cardinality>, {
fn nth(&'a self, n: u64) -> Result<Option<Branch<'a, Self, A>>, CanonError>;
fn nth_mut(
&'a mut self,
n: u64
) -> Result<Option<BranchMut<'a, Self, A>>, CanonError>
where
Self: MutableLeaves;
}
Expand description
Trait that provides nth()
and nth_mut()
methods to any Compound with a
Cardinality annotation
Required methods
Construct a Branch
pointing to the nth
element, if any
fn nth_mut(
&'a mut self,
n: u64
) -> Result<Option<BranchMut<'a, Self, A>>, CanonError> where
Self: MutableLeaves,
fn nth_mut(
&'a mut self,
n: u64
) -> Result<Option<BranchMut<'a, Self, A>>, CanonError> where
Self: MutableLeaves,
Construct a BranchMut
pointing to the nth
element, if any