pub struct IdList(/* private fields */);Expand description
Mainly for iteration (skip, take, count, into_iter) handling.
Implementations§
Source§impl IdList
impl IdList
Sourcepub fn from_ids<I: Into<Id>>(ids: impl IntoIterator<Item = I>) -> Self
pub fn from_ids<I: Into<Id>>(ids: impl IntoIterator<Item = I>) -> Self
Creates IdList. Preserves ids iteration order.
Sourcepub fn from_spans<S: Into<OrderedSpan>>(
spans: impl IntoIterator<Item = S>,
) -> Self
pub fn from_spans<S: Into<OrderedSpan>>( spans: impl IntoIterator<Item = S>, ) -> Self
Creates IdList. Preserves ids iteration order.
Sourcepub fn as_spans(&self) -> &[OrderedSpan]
pub fn as_spans(&self) -> &[OrderedSpan]
Access OrderedSpan directly. This can be useful to figure out if the
spans are in a particular order.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for IdList
impl RefUnwindSafe for IdList
impl Send for IdList
impl Sync for IdList
impl Unpin for IdList
impl UnsafeUnpin for IdList
impl UnwindSafe for IdList
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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