pub struct BlockId {
pub matrixid: u64,
pub block_row: usize,
pub block_col: usize,
}
Expand description
Block identifier
Fields§
§matrixid: u64
§block_row: usize
§block_col: usize
Implementations§
Source§impl BlockId
impl BlockId
Sourcepub fn new(matrix_id: u64, block_row: usize, block_col: usize) -> Self
pub fn new(matrix_id: u64, block_row: usize, block_col: usize) -> Self
Create a new block identifier
Sourcepub fn to_u64(&self) -> u64
pub fn to_u64(&self) -> u64
Convert BlockId to u64 for serialization (using a hash-like approach)
Sourcepub fn from_string(s: &str) -> Result<Self, String>
pub fn from_string(s: &str) -> Result<Self, String>
Parse BlockId from string representation
Trait Implementations§
impl Eq for BlockId
impl StructuralPartialEq for BlockId
Auto Trait Implementations§
impl Freeze for BlockId
impl RefUnwindSafe for BlockId
impl Send for BlockId
impl Sync for BlockId
impl Unpin for BlockId
impl UnwindSafe for BlockId
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more