/// An item in a [`Table`]. pubtrait Item { /// The type of identifier for the item. type Id: Id;
/// Return `True` if the item is deleted. fn is_deleted(&self) -> bool;
}
/// An identifier for referring to an item in a [`Table`]. pubtrait Id: IdPrivate { /// Return the index of the item in the table. fn index(&self) -> usize;
}
mod id_private { pubtrait IdPrivate { fn new(id: usize) -> Self;
}
} pub(super) use id_private::IdPrivate;
/// A table of items. /// /// Each item has a unique identifier. /// Items can be deleted without changing the identifiers of other items. #[derive(Debug)] pubstruct Table<T>(Vec<T>);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.