[−][src]Struct tcb::graph::middleware::graph::GRAPH
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]
peer_index: usize,
peer_number: usize,
client: Sender<ClientMessage>,
configuration: Arc<Configuration>
) -> GRAPH
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]
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>,