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