Skip to main content

NodeLabels

Struct NodeLabels 

Source
pub struct NodeLabels<L, I: Iterator<Item = ((usize, usize), L)>> { /* private fields */ }

Implementations§

Source§

impl<L: Clone + 'static, I: Iterator<Item = ((usize, usize), L)>> NodeLabels<L, I>

Source

pub fn new(num_nodes: usize, iter: I) -> Self

Creates an NodeLabels of outgoing arcs for nodes from 0 to num_nodes-1

Source

pub fn try_new_from(num_nodes: usize, iter: I, from: usize) -> Result<Self>

Creates an NodeLabels of outgoing arcs for nodes from from to from+num_nodes-1.

§Errors

This method will return an error if the given iterator yields arcs starting from a source node smaller than from.

Trait Implementations§

Source§

impl<L: Clone, I: Clone + Iterator<Item = ((usize, usize), L)>> Clone for NodeLabels<L, I>

Source§

fn clone(&self) -> NodeLabels<L, I>

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<L: Clone + 'static, I: Iterator<Item = ((usize, usize), L)>> ExactSizeLender for NodeLabels<L, I>

Source§

fn len(&self) -> usize

Returns the exact remaining length of the lender. Read more
Source§

fn is_empty(&self) -> bool

Returns true if the lender has no more elements.
Source§

impl<L: Clone + 'static, I: Iterator<Item = ((usize, usize), L)>> Lender for NodeLabels<L, I>

Source§

fn __check_covariance<'long: 'short, 'short>( proof: CovariantProof<<Self as Lending<'long>>::Lend>, ) -> CovariantProof<<Self as Lending<'short>>::Lend>

Internal method for compile-time covariance checking. Read more
Source§

fn next(&mut self) -> Option<Lend<'_, Self>>

Yields the next lend, if any, of the lender. Read more
Source§

fn size_hint(&self) -> (usize, Option<usize>)

Gets the estimated minimum and maximum length of the lender. Use .len() for the exact length if the lender implements ExactSizeLender. Read more
Source§

fn next_chunk(&mut self, chunk_size: usize) -> Chunk<'_, Self>
where Self: Sized,

Takes the next chunk_size lends of the lender with temporary lender Chunk. This is equivalent to cloning the lender and calling take(chunk_size) on it. Read more
Source§

fn count(self) -> usize
where Self: Sized,

Counts the number of lends in the lender by consuming it. Read more
Source§

fn last<'call>(&'call mut self) -> Option<Self::Lend>
where Self: Sized,

Gets the last lend of the lender, if any, by consuming it. Read more
Source§

fn advance_by(&mut self, n: usize) -> Result<(), NonZero<usize>>

Advances the lender by n lends. Read more
Source§

fn nth(&mut self, n: usize) -> Option<Self::Lend>

Yields the nth lend of the lender, if any, by consuming it. If the lender does not have enough lends, returns None. Read more
Source§

fn step_by(self, step: usize) -> StepBy<Self>
where Self: Sized,

Skips step - 1 lends between each lend of the lender. Read more
Source§

fn chain<U>(self, other: U) -> Chain<Self, <U as IntoLender>::Lender>
where Self: Sized, U: for<'all> IntoLender + for<'all> Lending<'all, Lend = Self::Lend>,

Chains the lender with another lender of the same type. Read more
Source§

fn zip<U>(self, other: U) -> Zip<Self, <U as IntoLender>::Lender>
where U: IntoLender, Self: Sized,

Zips the lender with another lender of the same or different type. Read more
Source§

fn intersperse<'call>(self, separator: Self::Lend) -> Intersperse<'call, Self>
where Self: Sized, Self::Lend: for<'all> Clone,

Intersperses each lend of this lender with the given separator. Read more
Source§

fn intersperse_with<'call, G>( self, separator: G, ) -> IntersperseWith<'call, Self, G>
where Self: Sized, G: FnMut() -> Self::Lend,

Intersperses each lend of this lender with the separator produced by the given function. Read more
Source§

fn map<F>(self, f: Covar<F>) -> Map<Self, F>
where Self: Sized, F: for<'all> FnMutHKA<'all, Self::Lend>,

Maps each lend of this lender using the given function. Read more
Source§

fn map_into_iter<O, F>(self, f: F) -> MapIntoIter<Self, O, F>
where F: FnMut(Self::Lend) -> O, Self: Sized,

Maps each lend of this lender into an owned value using the given function. Read more
Source§

fn for_each<F>(self, f: F)
where Self: Sized, F: FnMut(Self::Lend),

Calls the given function with each lend of this lender. Read more
Source§

fn filter<P>(self, predicate: P) -> Filter<Self, P>
where Self: Sized, P: FnMut(&Self::Lend) -> bool,

Filters this lender using the given predicate. Read more
Source§

fn filter_map<F>(self, f: Covar<F>) -> FilterMap<Self, F>
where Self: Sized, F: for<'all> FnMutHKAOpt<'all, Self::Lend>,

Filters and maps this lender using the given function. Read more
Source§

fn enumerate(self) -> Enumerate<Self>
where Self: Sized,

Enumerates this lender. Each lend is paired with its zero-based index. Read more
Source§

fn peekable<'call>(self) -> Peekable<'call, Self>
where Self: Sized,

Makes this lender peekable, so that it is possible to peek at the next lend without consuming it. Read more
Source§

fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P>
where Self: Sized, P: FnMut(&Self::Lend) -> bool,

Skips the first contiguous sequence of lends of this lender that satisfy the given predicate. Read more
Source§

fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P>
where Self: Sized, P: FnMut(&Self::Lend) -> bool,

Takes the first contiguous sequence of lends of this lender that satisfy the given predicate. Read more
Source§

fn map_while<P>(self, predicate: Covar<P>) -> MapWhile<Self, P>
where Self: Sized, P: for<'all> FnMutHKAOpt<'all, Self::Lend>,

Maps this lender using the given function while it returns Some. Read more
Source§

fn skip(self, n: usize) -> Skip<Self>
where Self: Sized,

Skips the first n lends of this lender. Read more
Source§

fn take(self, n: usize) -> Take<Self>
where Self: Sized,

Takes the first n lends of this lender. Read more
Source§

fn scan<St, F>(self, initial_state: St, f: Covar<F>) -> Scan<Self, St, F>
where Self: Sized, F: for<'all> FnMutHKAOpt<'all, (&'all mut St, Self::Lend)>,

Source§

fn flat_map<'call, F>(self, f: Covar<F>) -> FlatMap<'call, Self, F>
where Self: Sized, F: for<'all> FnMutHKA<'all, Self::Lend>, <F as FnMutHKA<'all, Self::Lend>>::B: for<'all> IntoLender,

Source§

fn flatten<'call>(self) -> Flatten<'call, Self>
where Self: Sized, Self::Lend: for<'all> IntoLender,

Source§

fn fuse(self) -> Fuse<Self>
where Self: Sized,

Source§

fn inspect<F>(self, f: F) -> Inspect<Self, F>
where Self: Sized, F: FnMut(&Self::Lend),

Source§

fn mutate<F>(self, f: F) -> Mutate<Self, F>
where Self: Sized, F: FnMut(&mut Self::Lend),

Mutates each lend with the given function. Read more
Source§

fn by_ref(&mut self) -> &mut Self
where Self: Sized,

Source§

fn collect<B>(self) -> B
where Self: Sized, B: FromLender<Self>,

Source§

fn try_collect<'a, B>( &'a mut self, ) -> <<Self::Lend as Try>::Residual as Residual<B>>::TryType
where Self: Sized, Self::Lend: for<'all> Try, <Self::Lend as Try>::Residual: for<'all> Residual<B>, B: for<'all> FromLender<TryShunt<'all, &'a mut Self>>,

Source§

fn collect_into<E>(self, collection: &mut E) -> &mut E
where Self: Sized, E: ExtendLender<Self>,

Source§

fn partition<E, F>(self, f: F) -> (E, E)
where Self: Sized, E: Default + ExtendLender<Self>, F: FnMut(&Self::Lend) -> bool,

Source§

fn is_partitioned<P>(self, predicate: P) -> bool
where Self: Sized, P: FnMut(Self::Lend) -> bool,

Source§

fn try_fold<B, F, R>(&mut self, init: B, f: F) -> R
where F: FnMut(B, Self::Lend) -> R, R: Try<Output = B>,

Source§

fn try_for_each<F, R>(&mut self, f: F) -> R
where F: FnMut(Self::Lend) -> R, R: Try<Output = ()>,

Source§

fn fold<B, F>(self, init: B, f: F) -> B
where Self: Sized, F: FnMut(B, Self::Lend) -> B,

Source§

fn reduce<T, F>(self, f: F) -> Option<T>
where Self: Sized, Self::Lend: for<'all> ToOwned<Owned = T>, F: FnMut(T, Self::Lend) -> T,

Source§

fn try_reduce<T, F, R>( self, f: F, ) -> <<R as Try>::Residual as Residual<Option<T>>>::TryType
where Self: Sized, Self::Lend: for<'all> ToOwned<Owned = T>, F: FnMut(T, Self::Lend) -> R, R: Try<Output = T>, <R as Try>::Residual: Residual<Option<T>>,

Source§

fn all<F>(&mut self, f: F) -> bool
where F: FnMut(Self::Lend) -> bool,

Source§

fn any<F>(&mut self, f: F) -> bool
where F: FnMut(Self::Lend) -> bool,

Source§

fn find<P>(&mut self, predicate: P) -> Option<Self::Lend>
where Self: Sized, P: FnMut(&Self::Lend) -> bool,

Source§

fn find_map<'a, F>( &'a mut self, f: F, ) -> Option<<F as FnMutHKAOpt<'a, Self::Lend>>::B>
where Self: Sized, F: for<'all> FnMutHKAOpt<'all, Self::Lend>,

Source§

fn try_find<F, R>( &mut self, f: F, ) -> <<R as Try>::Residual as Residual<Option<Self::Lend>>>::TryType
where Self: Sized, F: FnMut(&Self::Lend) -> R, R: Try<Output = bool>, <R as Try>::Residual: for<'all> Residual<Option<Self::Lend>>,

Source§

fn position<P>(&mut self, predicate: P) -> Option<usize>
where Self: Sized, P: FnMut(Self::Lend) -> bool,

Source§

fn max<T>(self) -> Option<T>
where T: Ord, Self: Sized, Self::Lend: for<'all> ToOwned<Owned = T>,

Source§

fn min<T>(self) -> Option<T>
where T: Ord, Self: Sized, Self::Lend: for<'all> ToOwned<Owned = T>,

Source§

fn max_by_key<B, T, F>(self, f: F) -> Option<T>
where B: Ord, Self: Sized, Self::Lend: for<'all> ToOwned<Owned = T>, F: FnMut(&T) -> B,

Source§

fn max_by<T, F>(self, compare: F) -> Option<T>
where Self: Sized, Self::Lend: for<'all> ToOwned<Owned = T>, F: FnMut(&T, &Self::Lend) -> Ordering,

Source§

fn min_by_key<B, T, F>(self, f: F) -> Option<T>
where B: Ord, Self: Sized, Self::Lend: for<'all> ToOwned<Owned = T>, F: FnMut(&T) -> B,

Source§

fn min_by<T, F>(self, compare: F) -> Option<T>
where Self: Sized, Self::Lend: for<'all> ToOwned<Owned = T>, F: FnMut(&T, &Self::Lend) -> Ordering,

Source§

fn unzip<ExtA, ExtB>(self) -> (ExtA, ExtB)
where Self: Sized, Self::Lend: for<'all> TupleLend<'all>, ExtA: Default + ExtendLender<FirstShunt<Self>>, ExtB: Default + ExtendLender<SecondShunt<Self>>,

Source§

fn copied<T>(self) -> Copied<Self>
where Self: Sized + for<'all> Lending<'all, Lend = &'all T>, T: Copy,

Source§

fn cloned<T>(self) -> Cloned<Self>
where Self: Sized + for<'all> Lending<'all, Lend = &'all T>, T: Clone,

Source§

fn owned(self) -> Owned<Self>
where Self: Sized, Self::Lend: for<'all> ToOwned,

Turns this Lender into an Iterator. Read more
Source§

fn cycle(self) -> Cycle<Self>
where Self: Sized + Clone,

Source§

fn sum<S>(self) -> S
where Self: Sized, S: SumLender<Self>,

Source§

fn product<P>(self) -> P
where Self: Sized, P: ProductLender<Self>,

Source§

fn cmp<L>(self, other: L) -> Ordering
where L: IntoLender, <L as IntoLender>::Lender: for<'all> Lending<'all, Lend = Self::Lend>, Self::Lend: for<'all> Ord, Self: Sized,

Source§

fn cmp_by<L, F>(self, other: L, cmp: F) -> Ordering
where Self: Sized, L: IntoLender, F: for<'all> FnMut(Self::Lend, <<L as IntoLender>::Lender as Lending<'all>>::Lend) -> Ordering,

Source§

fn partial_cmp<L>(self, other: L) -> Option<Ordering>
where L: IntoLender, Self::Lend: for<'all> PartialOrd<<<L as IntoLender>::Lender as Lending<'all>>::Lend>, Self: Sized,

Source§

fn partial_cmp_by<L, F>(self, other: L, partial_cmp: F) -> Option<Ordering>
where Self: Sized, L: IntoLender, F: for<'all> FnMut(Self::Lend, <<L as IntoLender>::Lender as Lending<'all>>::Lend) -> Option<Ordering>,

Source§

fn eq<L>(self, other: L) -> bool
where L: IntoLender, Self::Lend: for<'all> PartialEq<<<L as IntoLender>::Lender as Lending<'all>>::Lend>, Self: Sized,

The Lender version of Iterator::eq. Read more
Source§

fn eq_by<L, F>(self, other: L, eq: F) -> bool
where Self: Sized, L: IntoLender, F: for<'all> FnMut(Self::Lend, <<L as IntoLender>::Lender as Lending<'all>>::Lend) -> bool,

Source§

fn ne<L>(self, other: L) -> bool
where L: IntoLender, Self::Lend: for<'all> PartialEq<<<L as IntoLender>::Lender as Lending<'all>>::Lend>, Self: Sized,

The Lender version of Iterator::ne. Read more
Source§

fn lt<L>(self, other: L) -> bool
where L: IntoLender, Self::Lend: for<'all> PartialOrd<<<L as IntoLender>::Lender as Lending<'all>>::Lend>, Self: Sized,

The Lender version of Iterator::lt. Read more
Source§

fn le<L>(self, other: L) -> bool
where L: IntoLender, Self::Lend: for<'all> PartialOrd<<<L as IntoLender>::Lender as Lending<'all>>::Lend>, Self: Sized,

The Lender version of Iterator::le. Read more
Source§

fn gt<L>(self, other: L) -> bool
where L: IntoLender, Self::Lend: for<'all> PartialOrd<<<L as IntoLender>::Lender as Lending<'all>>::Lend>, Self: Sized,

The Lender version of Iterator::gt. Read more
Source§

fn ge<L>(self, other: L) -> bool
where L: IntoLender, Self::Lend: for<'all> PartialOrd<<<L as IntoLender>::Lender as Lending<'all>>::Lend>, Self: Sized,

The Lender version of Iterator::ge. Read more
Source§

fn is_sorted<T>(self) -> bool
where Self: Sized, Self::Lend: for<'all> ToOwned<Owned = T>, T: PartialOrd,

Source§

fn is_sorted_by<T, F>(self, compare: F) -> bool
where Self: Sized, Self::Lend: for<'all> ToOwned<Owned = T>, F: FnMut(&T, &T) -> Option<Ordering>,

Source§

fn is_sorted_by_key<F, K>(self, f: F) -> bool
where Self: Sized, F: FnMut(Self::Lend) -> K, K: PartialOrd,

Source§

fn iter<'this>(self) -> Iter<'this, Self>
where Self: Sized + 'this, Self::Lend: 'this,

Turns this Lender into an Iterator where it has already fulfilled the requirements of the Iterator trait. Read more
Source§

fn lender_by_ref<'this>(self) -> FromIterRef<Iter<'this, Self>>
where Self: Sized + 'this, Self::Lend: 'this,

Turns this Lender into a new Lender that lends references to the items of the original lender. Read more
Source§

fn chunky(self, chunk_size: usize) -> Chunky<Self>
where Self: Sized + ExactSizeLender,

A lending replacement for Iterator::array_chunks. Read more
Source§

fn convert<E>(self) -> Convert<E, Self>
where Self: Sized,

Converts a Lender whose lend type is Result<T, E> into a FallibleLender with error type E and lend type T. Read more
Source§

fn into_fallible(self) -> IntoFallible<Self>
where Self: Sized,

Converts a Lender into a FallibleLender by wrapping into Result<Lend<'_, Self>, Infallible> where Infallible is an error that can never actually happen. Read more
Source§

impl<'succ, L: Clone + 'static, I: Iterator<Item = ((usize, usize), L)>> Lending<'succ> for NodeLabels<L, I>

Source§

type Lend = (usize, <NodeLabels<L, I> as NodeLabelsLender<'succ>>::IntoIterator)

The type being lent.
Source§

impl<'succ, L: Clone + 'static, I: Iterator<Item = ((usize, usize), L)>> NodeLabelsLender<'succ> for NodeLabels<L, I>

Source§

type Label = (usize, L)

Source§

type IntoIterator = Succ<'succ, L, I>

Source§

fn into_labeled_pairs<'a>(self) -> IntoLabeledPairs<'a, Self>
where Self: Sized + for<'b> NodeLabelsLender<'b, Label: Pair<Left = usize>>,

Converts this lender into an iterator of labeled pairs of type ((usize, usize), Label), provided that the label type implements Pair with Left = usize. Read more
Source§

impl<L: Clone + 'static, I: Iterator<Item = ((usize, usize), L)> + Clone> SortedLender for NodeLabels<L, I>

Auto Trait Implementations§

§

impl<L, I> Freeze for NodeLabels<L, I>
where I: Freeze, L: Freeze,

§

impl<L, I> RefUnwindSafe for NodeLabels<L, I>

§

impl<L, I> Send for NodeLabels<L, I>
where I: Send, L: Send,

§

impl<L, I> Sync for NodeLabels<L, I>
where I: Sync, L: Sync,

§

impl<L, I> Unpin for NodeLabels<L, I>
where I: Unpin, L: Unpin,

§

impl<L, I> UnsafeUnpin for NodeLabels<L, I>
where I: UnsafeUnpin, L: UnsafeUnpin,

§

impl<L, I> UnwindSafe for NodeLabels<L, I>
where I: UnwindSafe, L: UnwindSafe,

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> CastableFrom<T> for T

Source§

fn cast_from(value: T) -> T

Call Self as W
Source§

impl<T, U> CastableInto<U> for T
where U: CastableFrom<T>,

Source§

fn cast(self) -> U

Call W::cast_from(self)
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> DowncastableFrom<T> for T

Source§

fn downcast_from(value: T) -> T

Truncate the current UnsignedInt to a possibly smaller size
Source§

impl<T, U> DowncastableInto<U> for T
where U: DowncastableFrom<T>,

Source§

fn downcast(self) -> U

Call W::downcast_from(self)
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<L> IntoLender for L
where L: Lender,

Source§

type Lender = L

The lender type that this type converts into.
Source§

fn into_lender(self) -> L

Converts this type into a Lender.
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Splat<T> for T

Source§

fn splat(value: T) -> T

Source§

impl<T> To<T> for T

Source§

fn to(self) -> T

Source§

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

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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> UpcastableFrom<T> for T

Source§

fn upcast_from(value: T) -> T

Extend the current UnsignedInt to a possibly bigger size.
Source§

impl<T, U> UpcastableInto<U> for T
where U: UpcastableFrom<T>,

Source§

fn upcast(self) -> U

Call W::upcast_from(self)
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V