pub struct MessageId {
pub sender: MemberId,
pub seq: usize,
}Expand description
Simple message id for tests with monotonically incrementing sequence numbers per peer.
This contains the sender again as we need unique message ids and just using the sequence number would not be sufficient.
Fields§
§sender: MemberId§seq: usizeImplementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for MessageId
impl<'de> Deserialize<'de> for MessageId
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<DGM> ForwardSecureGroupMessage<usize, MessageId, DGM> for TestMessage<DGM>
impl<DGM> ForwardSecureGroupMessage<usize, MessageId, DGM> for TestMessage<DGM>
Source§fn content(&self) -> ForwardSecureMessageContent<MemberId, MessageId>
fn content(&self) -> ForwardSecureMessageContent<MemberId, MessageId>
Returns data required to manage group encryption and receive decrypted application messages.
Source§fn direct_messages(&self) -> Vec<DirectMessage<MemberId, MessageId, DGM>>
fn direct_messages(&self) -> Vec<DirectMessage<MemberId, MessageId, DGM>>
Returns optional list of direct messages. Read more
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>
Source§impl<DGM> GroupMessage<usize, MessageId, DGM> for TestMessage<DGM>
impl<DGM> GroupMessage<usize, MessageId, DGM> for TestMessage<DGM>
Source§fn content(&self) -> GroupMessageContent<MemberId>
fn content(&self) -> GroupMessageContent<MemberId>
Returns content of either a control- or application message.
Source§fn direct_messages(&self) -> Vec<DirectMessage<MemberId, MessageId, DGM>>
fn direct_messages(&self) -> Vec<DirectMessage<MemberId, MessageId, DGM>>
Returns optional list of direct messages.
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>
impl Copy for MessageId
impl Eq for MessageId
impl OperationId for MessageId
impl StructuralPartialEq for MessageId
Auto Trait Implementations§
impl Freeze for MessageId
impl RefUnwindSafe for MessageId
impl Send for MessageId
impl Sync for MessageId
impl Unpin for MessageId
impl UnwindSafe for MessageId
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