Struct v9::id::RunList[][src]

pub struct RunList<M: TableMarker> { /* fields omitted */ }

Stores Ids with great efficiency. Runs are stored like a Range. (In the case of a single run, zero allocation is needed.) Non-contiguous Ids have the same memory overhead as a Vec.

If you are iterating over the rows in a table, it’s easiest to use the table’s Read, Write, or Edit decl_context!. Otherwise you will need to take &$table::Id or &mut $table::Id as an argument to the Kernel.

Implementations

impl<M: TableMarker> RunList<M>[src]

pub fn len(&self) -> usize[src]

pub fn is_empty(&self) -> bool[src]

pub fn push(&mut self, i: Id<M>)[src]

pub fn push_run(&mut self, r: RangeInclusive<Id<M>>)[src]

pub fn pop(&mut self) -> Option<Id<M>>[src]

pub fn last(&self) -> Option<Id<M>>[src]

pub fn clear(&mut self)[src]

pub fn iter(&self) -> RunListIter<'_, M>

Notable traits for RunListIter<'a, M>

impl<'a, M: TableMarker> Iterator for RunListIter<'a, M> type Item = Id<M>;
[src]

pub fn extend_from(&mut self, new: Self)[src]

pub fn extend(&mut self, iter: impl Iterator<Item = Id<M>>)[src]

pub fn iter_runs<'a>(
    &'a self
) -> impl Iterator<Item = RangeInclusive<Id<M>>> + 'a
[src]

pub fn sort(&mut self)[src]

Trait Implementations

impl<M: Clone + TableMarker> Clone for RunList<M>[src]

impl<M: TableMarker> Debug for RunList<M>[src]

impl<M: Default + TableMarker> Default for RunList<M>[src]

impl<'de, M: TableMarker> Deserialize<'de> for RunList<M> where
    M: Deserialize<'de>, 
[src]

impl<'a, M: TableMarker> IntoIterator for &'a RunList<M>[src]

type Item = Id<M>

The type of the elements being iterated over.

type IntoIter = RunListIter<'a, M>

Which kind of iterator are we turning this into?

impl<M: TableMarker> Serialize for RunList<M> where
    M: Serialize
[src]

Auto Trait Implementations

impl<M> RefUnwindSafe for RunList<M> where
    <M as TableMarker>::RawId: RefUnwindSafe

impl<M> Send for RunList<M>

impl<M> Sync for RunList<M>

impl<M> Unpin for RunList<M> where
    <M as TableMarker>::RawId: Unpin

impl<M> UnwindSafe for RunList<M> where
    <M as TableMarker>::RawId: RefUnwindSafe + UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<X> ForeignKey for X[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.