Struct memtable_core::Position [−][src]
Expand description
Represents the position of a cell in a table
Fields
row: usizeRepresents the row number of a cell starting from 0
col: usizeRepresents the coumn number of a cell starting from 0
Implementations
Trait Implementations
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
Compares positions in terms of order by seeing if one comes before/after another in rows. If on the same row, then the columns are compared.
Examples
// Row is first used for comparisons assert!(Position { row: 0, col: 1 } < Position { row: 1, col: 0 }); assert!(Position { row: 1, col: 0 } > Position { row: 0, col: 1 }); // Column is used for comparisons if rows are equal assert!(Position { row: 0, col: 0 } < Position { row: 0, col: 1 }); assert!(Position { row: 0, col: 1 } > Position { row: 0, col: 0 }); // Row & column need to match for equality assert_eq!(Position { row: 0, col: 0 }, Position { row: 0, col: 0 });
Compares and returns the maximum of two values. Read more
Compares and returns the minimum of two values. Read more
Compares positions in terms of order by seeing if one comes before/after another in rows. If on the same row, then the columns are compared.
This method tests less than (for self and other) and is used by the < operator. Read more
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
This method tests greater than (for self and other) and is used by the > operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for Positionimpl UnwindSafe for PositionBlanket Implementations
Mutably borrows from an owned value. Read more