pub struct ForwardSecureOrderer<DGM> { /* private fields */ }Available on (crate features
message_scheme) and (crate features test_utils) only.Expand description
Simplified orderer for testing the “message encryption” group APIs.
NOTE: This orderer does not fullfill the full specification for correct ordering. It’s assuming that peers process all messages after each member has published max. one control or application message. On top it’s very inefficient, as every published message points at every previously published messages from all peers.
This is sufficient for the current testing setup but for anything “production ready” and more robust for all concurrency scenarios, a more sophisticated solution will be required.
Implementations§
Source§impl<DGM> ForwardSecureOrderer<DGM>
impl<DGM> ForwardSecureOrderer<DGM>
pub fn init(my_id: MemberId) -> ForwardSecureOrdererState<DGM>
Trait Implementations§
Source§impl<DGM: Clone> Clone for ForwardSecureOrderer<DGM>
impl<DGM: Clone> Clone for ForwardSecureOrderer<DGM>
Source§impl<DGM: Debug> Debug for ForwardSecureOrderer<DGM>
impl<DGM: Debug> Debug for ForwardSecureOrderer<DGM>
Source§impl<DGM> ForwardSecureOrdering<usize, MessageId, DGM> for ForwardSecureOrderer<DGM>where
DGM: Debug + Clone + AckedGroupMembership<MemberId, MessageId> + Serialize + for<'a> Deserialize<'a>,
impl<DGM> ForwardSecureOrdering<usize, MessageId, DGM> for ForwardSecureOrderer<DGM>where
DGM: Debug + Clone + AckedGroupMembership<MemberId, MessageId> + Serialize + for<'a> Deserialize<'a>,
type State = ForwardSecureOrdererState<DGM>
type Error = ForwardSecureOrdererError
type Message = TestMessage<DGM>
fn next_control_message( y: Self::State, control_message: &ControlMessage<MemberId, MessageId>, direct_messages: &[DirectMessage<MemberId, MessageId, DGM>], ) -> Result<(Self::State, Self::Message), Self::Error>
fn next_application_message( y: Self::State, generation: Generation, ciphertext: Vec<u8>, ) -> Result<(Self::State, Self::Message), Self::Error>
fn queue( y: Self::State, message: &Self::Message, ) -> Result<Self::State, Self::Error>
fn set_welcome( y: Self::State, message: &Self::Message, ) -> Result<Self::State, Self::Error>
fn next_ready_message( y: Self::State, ) -> Result<(Self::State, Option<Self::Message>), Self::Error>
Auto Trait Implementations§
impl<DGM> Freeze for ForwardSecureOrderer<DGM>where
PhantomData<DGM>: Freeze,
impl<DGM> RefUnwindSafe for ForwardSecureOrderer<DGM>where
PhantomData<DGM>: RefUnwindSafe,
impl<DGM> Send for ForwardSecureOrderer<DGM>where
PhantomData<DGM>: Send,
impl<DGM> Sync for ForwardSecureOrderer<DGM>where
PhantomData<DGM>: Sync,
impl<DGM> Unpin for ForwardSecureOrderer<DGM>where
PhantomData<DGM>: Unpin,
impl<DGM> UnsafeUnpin for ForwardSecureOrderer<DGM>where
PhantomData<DGM>: UnsafeUnpin,
impl<DGM> UnwindSafe for ForwardSecureOrderer<DGM>where
PhantomData<DGM>: 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