pub struct Coordinate {
pub dims: BTreeMap<CategoryId, ItemId>,
}Expand description
A coordinate maps categories to items: one cell of a measure’s tensor.
BTreeMap gives a stable, ordered key (important for hashing/serialization
and, later, for deriving a fixed differential-dataflow key).
Fields§
§dims: BTreeMap<CategoryId, ItemId>Implementations§
Source§impl Coordinate
impl Coordinate
pub fn new() -> Self
pub fn from_pairs(pairs: impl IntoIterator<Item = (CategoryId, ItemId)>) -> Self
pub fn get(&self, cat: CategoryId) -> Option<ItemId>
pub fn with(self, cat: CategoryId, item: ItemId) -> Self
Sourcepub fn categories(&self) -> impl Iterator<Item = CategoryId> + '_
pub fn categories(&self) -> impl Iterator<Item = CategoryId> + '_
The set of categories this coordinate is defined over.
Trait Implementations§
Source§impl Clone for Coordinate
impl Clone for Coordinate
Source§fn clone(&self) -> Coordinate
fn clone(&self) -> Coordinate
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Coordinate
impl Debug for Coordinate
Source§impl Default for Coordinate
impl Default for Coordinate
Source§impl<'de> Deserialize<'de> for Coordinate
impl<'de> Deserialize<'de> for Coordinate
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Coordinate
Source§impl Hash for Coordinate
impl Hash for Coordinate
Source§impl Ord for Coordinate
impl Ord for Coordinate
Source§fn cmp(&self, other: &Coordinate) -> Ordering
fn cmp(&self, other: &Coordinate) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for Coordinate
impl PartialEq for Coordinate
Source§impl PartialOrd for Coordinate
impl PartialOrd for Coordinate
Source§impl Serialize for Coordinate
impl Serialize for Coordinate
impl StructuralPartialEq for Coordinate
Auto Trait Implementations§
impl Freeze for Coordinate
impl RefUnwindSafe for Coordinate
impl Send for Coordinate
impl Sync for Coordinate
impl Unpin for Coordinate
impl UnsafeUnpin for Coordinate
impl UnwindSafe for Coordinate
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