Struct v9::id::RunList [−][src]
Stores Id
s with great efficiency.
Runs are stored like a Range
.
(In the case of a single run, zero allocation is needed.)
Non-contiguous Id
s 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]
Notable traits for RunListIter<'a, M>
impl<'a, M: TableMarker> Iterator for RunListIter<'a, M> type Item = Id<M>;
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]
&'a self
) -> impl Iterator<Item = RangeInclusive<Id<M>>> + 'a
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]
M: Deserialize<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
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?
fn into_iter(self) -> Self::IntoIter
[src]
impl<M: TableMarker> Serialize for RunList<M> where
M: Serialize,
[src]
M: Serialize,
Auto Trait Implementations
impl<M> RefUnwindSafe for RunList<M> where
<M as TableMarker>::RawId: RefUnwindSafe,
<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,
<M as TableMarker>::RawId: Unpin,
impl<M> UnwindSafe for RunList<M> where
<M as TableMarker>::RawId: RefUnwindSafe + UnwindSafe,
<M as TableMarker>::RawId: RefUnwindSafe + UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<X> ForeignKey for X
[src]
fn __v9_link_foreign_table_name() -> Option<Name>
[src]
fn __v9_link_foreign_key<LM: TableMarker>(_universe: &mut Universe)
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,