GroupControlMessage

Struct GroupControlMessage 

Source
pub struct GroupControlMessage<ID, C> {
    pub group_id: ID,
    pub action: GroupAction<ID, C>,
}
Expand description

Control messages which are processed in order to update group state.

There are two variants, one containing a group action and the ID of the group to which the action should be applied. The other is a special message which can be used to “undo” a message which has been previously applied to the group.

Fields§

§group_id: ID§action: GroupAction<ID, C>

Implementations§

Source§

impl<ID, C> GroupControlMessage<ID, C>
where ID: Copy,

Source

pub fn is_create(&self) -> bool

Return true if this is a create control message.

Source

pub fn group_id(&self) -> ID

Return the ID of the group this message should be applied to.

Trait Implementations§

Source§

impl<ID: Clone, C: Clone> Clone for GroupControlMessage<ID, C>

Source§

fn clone(&self) -> GroupControlMessage<ID, C>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<ID: Debug, C: Debug> Debug for GroupControlMessage<ID, C>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Operation<char, u32, GroupControlMessage<char, ()>> for TestOperation

Source§

fn id(&self) -> u32

Id of this operation.
Source§

fn author(&self) -> char

ID of the author of this operation.
Source§

fn dependencies(&self) -> Vec<u32>

Other operation dependencies.
Source§

fn previous(&self) -> Vec<u32>

The last graph tips in the group this operation belongs to.
Source§

fn payload(&self) -> GroupControlMessage<char, ()>

Payload of this operation.
Source§

impl Orderer<char, u32, GroupControlMessage<char, ()>> for TestOrderer

Source§

fn next_message( y: Self::State, control_message: &GroupControlMessage<MemberId, Conditions>, ) -> Result<(Self::State, Self::Operation), Self::Error>

Construct the next operation which should include meta-data required for establishing order between different operations.

In this implementation causal order is established between operations using a graph structure. Every operation contains a pointer to both the previous operations in a single auth group graph, and also the tips of any sub-group graphs.

Source§

type State = TestOrdererState

Source§

type Error = OrdererError

Source§

type Operation = TestOperation

Source§

fn queue( y: Self::State, message: &Self::Operation, ) -> Result<Self::State, Self::Error>

Queue up a new local or remote message.
Source§

fn next_ready_message( y: Self::State, ) -> Result<(Self::State, Option<Self::Operation>), Self::Error>

Retrieve the next ready message.

Auto Trait Implementations§

§

impl<ID, C> Freeze for GroupControlMessage<ID, C>
where ID: Freeze, C: Freeze,

§

impl<ID, C> RefUnwindSafe for GroupControlMessage<ID, C>

§

impl<ID, C> Send for GroupControlMessage<ID, C>
where ID: Send, C: Send,

§

impl<ID, C> Sync for GroupControlMessage<ID, C>
where ID: Sync, C: Sync,

§

impl<ID, C> Unpin for GroupControlMessage<ID, C>
where ID: Unpin, C: Unpin,

§

impl<ID, C> UnwindSafe for GroupControlMessage<ID, C>
where ID: UnwindSafe, C: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V