pub enum GridQuorumSetError<ID> {
NoRow,
NoColumn,
RaggedRow {
row: usize,
len: usize,
column_count: usize,
},
DuplicateId {
id: ID,
},
}Expand description
An error returned when building an invalid GridQuorumSet.
A grid must be a rectangle of distinct IDs with at least one row and one column. Construction reports the first violation instead of repairing the input, so the mistake surfaces where it is made.
Variants§
NoRow
The grid has no row, so it has no ID.
NoColumn
Row 0 is empty, so the grid has no column.
RaggedRow
A row is shorter or longer than row 0, so the grid is not a rectangle.
Fields
DuplicateId
An ID is in more than one cell. Each cell holds its own ID.
Fields
§
id: IDThe ID of the first cell, in row-major order, that repeats an earlier cell.
Trait Implementations§
Source§impl<ID: Clone> Clone for GridQuorumSetError<ID>
impl<ID: Clone> Clone for GridQuorumSetError<ID>
Source§impl<ID: Debug> Debug for GridQuorumSetError<ID>
impl<ID: Debug> Debug for GridQuorumSetError<ID>
Source§impl<ID> Display for GridQuorumSetError<ID>where
ID: Display,
impl<ID> Display for GridQuorumSetError<ID>where
ID: Display,
impl<ID: Eq> Eq for GridQuorumSetError<ID>
Source§impl<ID> Error for GridQuorumSetError<ID>
impl<ID> Error for GridQuorumSetError<ID>
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl<ID: PartialEq> PartialEq for GridQuorumSetError<ID>
impl<ID: PartialEq> PartialEq for GridQuorumSetError<ID>
impl<ID: PartialEq> StructuralPartialEq for GridQuorumSetError<ID>
Auto Trait Implementations§
impl<ID> Forget for GridQuorumSetError<ID>
impl<ID> Freeze for GridQuorumSetError<ID>where
ID: Freeze,
impl<ID> RefUnwindSafe for GridQuorumSetError<ID>where
ID: RefUnwindSafe,
impl<ID> Send for GridQuorumSetError<ID>where
ID: Send,
impl<ID> Sync for GridQuorumSetError<ID>where
ID: Sync,
impl<ID> Unpin for GridQuorumSetError<ID>where
ID: Unpin,
impl<ID> UnsafeUnpin for GridQuorumSetError<ID>where
ID: UnsafeUnpin,
impl<ID> UnwindSafe for GridQuorumSetError<ID>where
ID: UnwindSafe,
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