[][src]Struct tcb::causality_checker::causality_checker_structs::VersionMatrix

pub struct VersionMatrix {
    pub matrix: Vec<VersionVector>,
}

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]

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

impl Debug for VersionMatrix[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.