[][src]Struct tcb::graph::middleware::graph::GRAPH

pub struct GRAPH { /* fields omitted */ }

Implementation of the causal delivery algorithm.

Implementations

impl GRAPH[src]

pub fn new(
    peer_index: usize,
    peer_number: usize,
    client: Sender<ClientMessage>,
    configuration: Arc<Configuration>
) -> GRAPH
[src]

Builds a new GRAPH struct that implements the causal delivery algorithm.

Arguments

peer_index - Local peer's globally unique id.

peer_number - Number of peers in the group.

client - Channel between the Middleware and the Peer that will be used to send delivered/stable messages to Peer.

configuration - Middleware's configuration file.

pub fn dequeue(&mut self, message: Message)[src]

Handler for a message sent by the Client to be broadcast. This function adds a message to the causal graph.

Arguments

message - Message received from the Client.

pub fn receive(&mut self, message: Message)[src]

Handles a message received from a peer via broadcast.

Arguments

message - Message received from a peer in the group.

pub fn deletestable(&mut self, dot: Dot)[src]

Softly deletes an acked stable message by marking its position in the array available.

Arguments

dot - Dot acked as stable by the Client.

Auto Trait Implementations

impl RefUnwindSafe for GRAPH

impl Send for GRAPH

impl Sync for GRAPH

impl Unpin for GRAPH

impl UnwindSafe for GRAPH

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.