pub struct MessageOrderer<DGM> { /* private fields */ }Expand description
Orderer for testing the “data encryption” group APIs.
This is sufficient for the current testing setup but for anything “production ready” a more sophisticated solution will be required as all messages are kept in memory.
Implementations§
Source§impl<DGM> MessageOrderer<DGM>
impl<DGM> MessageOrderer<DGM>
pub fn init(my_id: MemberId) -> MessageOrdererState<DGM>
Trait Implementations§
Source§impl<DGM: Clone> Clone for MessageOrderer<DGM>
impl<DGM: Clone> Clone for MessageOrderer<DGM>
Source§fn clone(&self) -> MessageOrderer<DGM>
fn clone(&self) -> MessageOrderer<DGM>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<DGM: Debug> Debug for MessageOrderer<DGM>
impl<DGM: Debug> Debug for MessageOrderer<DGM>
Source§impl<DGM> Ordering<usize, MessageId, DGM> for MessageOrderer<DGM>where
DGM: Debug + Clone + GroupMembership<MemberId, MessageId> + Serialize + for<'a> Deserialize<'a>,
impl<DGM> Ordering<usize, MessageId, DGM> for MessageOrderer<DGM>where
DGM: Debug + Clone + GroupMembership<MemberId, MessageId> + Serialize + for<'a> Deserialize<'a>,
type State = MessageOrdererState<DGM>
type Error = MessageOrdererError
type Message = TestMessage<DGM>
fn next_control_message( y: Self::State, control_message: &ControlMessage<MemberId>, direct_messages: &[DirectMessage<MemberId, MessageId, DGM>], ) -> Result<(Self::State, Self::Message), Self::Error>
fn next_application_message( y: Self::State, group_secret_id: GroupSecretId, nonce: XAeadNonce, 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 MessageOrderer<DGM>
impl<DGM> RefUnwindSafe for MessageOrderer<DGM>where
DGM: RefUnwindSafe,
impl<DGM> Send for MessageOrderer<DGM>where
DGM: Send,
impl<DGM> Sync for MessageOrderer<DGM>where
DGM: Sync,
impl<DGM> Unpin for MessageOrderer<DGM>where
DGM: Unpin,
impl<DGM> UnwindSafe for MessageOrderer<DGM>where
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