[−][src]Struct tcb::causality_checker::causality_checker_structs::VersionMatrix
Matrix where each row is a peer's version vector. This is used to determine causal stability.
Fields
matrix: Vec<VersionVector>
Implementations
impl VersionMatrix
[src]
pub fn new(peer_number: usize) -> VersionMatrix
[src]
Creates a new version matrix that is NxN where N is the group size. Each row will be a peer's version vector, where the peer's id is the row number.
Arguments
peer_number
- Number of peers in the group.
pub fn check_stability(&self, dot_version_vector: &VersionVector) -> bool
[src]
Compares the causal stability in each row to a peer's version vector.
Arguments
dot_version_vector
- Peer's version vector to check stability.
pub fn update_peer_entry(
&mut self,
peer_id: usize,
dot_version_vector: VersionVector
)
[src]
&mut self,
peer_id: usize,
dot_version_vector: VersionVector
)
Updates a peer's row in the version vector matrix.
Arguments
peer_id
- Peer's id that will be its row in the matrix.
dot_version_vector
- Peer's new version vector.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for VersionMatrix
impl Send for VersionMatrix
impl Sync for VersionMatrix
impl Unpin for VersionMatrix
impl UnwindSafe for VersionMatrix
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,