Skip to main content

GroupBroadcast

Enum GroupBroadcast 

pub enum GroupBroadcast {
Show 33 variants Create { initial_invitees: Vec<u64>, options: MessageGroupOptions, }, LeaveRoom { key: MessageGroupKey, }, LeaveRoomResponse { key: MessageGroupKey, success: bool, message: String, }, End { key: MessageGroupKey, }, EndResponse { key: MessageGroupKey, success: bool, }, Disconnected { key: MessageGroupKey, }, Message { sender: u64, key: MessageGroupKey, message: SecBuffer, }, MessageResponse { key: MessageGroupKey, success: bool, }, KeyPackage { key: MessageGroupKey, joiner_cid: u64, payload: Vec<u8>, }, Welcome { key: MessageGroupKey, joiner_cid: u64, payload: Vec<u8>, }, Commit { key: MessageGroupKey, epoch: u64, payload: Vec<u8>, }, HierarchyAssign { key: MessageGroupKey, target_cid: u64, payload: Vec<u8>, }, Promote { key: MessageGroupKey, target_cid: u64, path: CommandPath, }, Demote { key: MessageGroupKey, target_cid: u64, }, Add { key: MessageGroupKey, invitees: Vec<u64>, }, AddResponse { key: MessageGroupKey, failed_to_invite_list: Option<Vec<u64>>, }, AcceptMembership { target: u64, key: MessageGroupKey, }, DeclineMembership { target: u64, key: MessageGroupKey, }, AcceptMembershipResponse { key: MessageGroupKey, success: bool, }, DeclineMembershipResponse { key: MessageGroupKey, success: bool, }, Kick { key: MessageGroupKey, kick_list: Vec<u64>, }, KickResponse { key: MessageGroupKey, success: bool, }, ListGroupsFor { cid: u64, }, ListResponse { groups: Vec<MessageGroupKey>, }, RequestJoin { sender: u64, key: MessageGroupKey, }, Invitation { sender: u64, key: MessageGroupKey, }, CreateResponse { key: Option<MessageGroupKey>, }, MemberStateChanged { key: MessageGroupKey, state: MemberState, }, GroupNonExists { key: MessageGroupKey, }, RequestJoinPending { result: Result<(), String>, key: MessageGroupKey, }, RestoreMembership { key: MessageGroupKey, }, RestoreOwnership { key: MessageGroupKey, }, MessageDropped { key: MessageGroupKey, sender: u64, reason: String, },
}
Expand description

Enum representing different types of group broadcast messages

Variants§

§

Create

Create a new group with initial invitees

Fields

§initial_invitees: Vec<u64>

CIDs of initial members

§options: MessageGroupOptions

Group configuration options

§

LeaveRoom

Leave a group

Fields

§key: MessageGroupKey

Group key

§

LeaveRoomResponse

Response to leaving a group

Fields

§key: MessageGroupKey

Group key

§success: bool

Success status

§message: String

Response message

§

End

End a group

Fields

§key: MessageGroupKey

Group key

§

EndResponse

Response to ending a group

Fields

§key: MessageGroupKey

Group key

§success: bool

Success status

§

Disconnected

Disconnected from a group

Fields

§key: MessageGroupKey

Group key

§

Message

Message broadcast to a group

Fields

§sender: u64

Sender CID

§key: MessageGroupKey

Group key

§message: SecBuffer

Message payload

§

MessageResponse

Response to a message broadcast

Fields

§key: MessageGroupKey

Group key

§success: bool

Success status

§

KeyPackage

A joiner publishes its post-quantum TreeKEM KeyPackage to the group owner so the owner can Add it to the ratchet tree. payload is an opaque serialized citadel_treekem::KeyPackage — the relay forwards it verbatim and never inspects it (zero-trust).

Fields

§key: MessageGroupKey

Group key

§joiner_cid: u64

The joining member’s CID (so the owner knows where to route the Welcome)

§payload: Vec<u8>

Opaque serialized citadel_treekem::KeyPackage

§

Welcome

The group owner delivers a TreeKEM Welcome to a single joiner (routed to joiner_cid). payload is an opaque serialized citadel_treekem::Welcome; the relay never inspects it.

Fields

§key: MessageGroupKey

Group key

§joiner_cid: u64

The joining member’s CID (the server routes this packet to this CID)

§payload: Vec<u8>

Opaque serialized citadel_treekem::Welcome

§

Commit

The group owner broadcasts a TreeKEM Commit to the existing members (everyone but the joiner). payload is an opaque serialized citadel_treekem::Commit; the relay never inspects it.

Fields

§key: MessageGroupKey

Group key

§epoch: u64

The epoch this commit advances the group into (monotonic; used for ordering/gating)

§payload: Vec<u8>

Opaque serialized citadel_treekem::Commit

§

HierarchyAssign

The group owner delivers a Decentralized-Hierarchy-Encryption node-secret assignment to one member (routed to target_cid). payload is the member’s command path + node secret, sealed to that member’s leaf KEM key — opaque to the relay, which sees neither the path nor the secret.

Fields

§key: MessageGroupKey

Group key

§target_cid: u64

The member receiving the assignment (the server routes this packet to this CID)

§payload: Vec<u8>

Opaque KEM-sealed citadel_treekem::HierarchyMember

§

Promote

Owner-local request (from the group handle) to assign/raise target_cid to path. Handled entirely on the owner node — it never reaches the relay; the resulting Self::HierarchyAssign (carrying only the sealed node secret) is what goes on the wire, so path stays off it.

Fields

§key: MessageGroupKey

Group key

§target_cid: u64

The member being (re)assigned

§path: CommandPath

The command path to assign (owner-local; never serialized to the relay)

§

Demote

Owner-local request (from the group handle) to revoke target_cid’s elevated rank. Handled on the owner node: it rotates the hierarchy, re-seals each member’s assignment, and epoch-bumps.

Fields

§key: MessageGroupKey

Group key

§target_cid: u64

The member being demoted

§

Add

Add members to a group

Fields

§key: MessageGroupKey

Group key

§invitees: Vec<u64>

CIDs of members to add

§

AddResponse

Response to adding members to a group

Fields

§key: MessageGroupKey

Group key

§failed_to_invite_list: Option<Vec<u64>>

List of failed invitations

§

AcceptMembership

Accept membership in a group

Fields

§target: u64

Target CID

§key: MessageGroupKey

Group key

§

DeclineMembership

Decline membership in a group

Fields

§target: u64

Target CID

§key: MessageGroupKey

Group key

§

AcceptMembershipResponse

Response to accepting membership in a group

Fields

§key: MessageGroupKey

Group key

§success: bool

Success status

§

DeclineMembershipResponse

Response to declining membership in a group

Fields

§key: MessageGroupKey

Group key

§success: bool

Success status

§

Kick

Kick members from a group

Fields

§key: MessageGroupKey

Group key

§kick_list: Vec<u64>

CIDs of members to kick

§

KickResponse

Response to kicking members from a group

Fields

§key: MessageGroupKey

Group key

§success: bool

Success status

§

ListGroupsFor

List groups for a user

Fields

§cid: u64

User CID

§

ListResponse

Response to listing groups for a user

Fields

§groups: Vec<MessageGroupKey>

List of group keys

§

RequestJoin

Request to join a group

Fields

§sender: u64

Sender CID

§key: MessageGroupKey

Group key

§

Invitation

Invitation to join a group

Fields

§sender: u64

Sender CID

§key: MessageGroupKey

Group key

§

CreateResponse

Response to creating a group

Fields

§key: Option<MessageGroupKey>

Group key (optional)

§

MemberStateChanged

Member state changed

Fields

§key: MessageGroupKey

Group key

§state: MemberState

New member state

§

GroupNonExists

Group does not exist

Fields

§key: MessageGroupKey

Group key

§

RequestJoinPending

Request to join a group is pending

Fields

§result: Result<(), String>

Result of the request

§key: MessageGroupKey

Group key

§

RestoreMembership

Server → member, when the member’s session is (re-)established while the server still lists it in key. A new session holds no TreeKEM state, so the member answers by publishing a fresh Self::KeyPackage; the owner re-adds it (replacing its stale leaf) and returns a Welcome. The relay handles only the same opaque KeyPackage/Welcome as an ordinary join.

Fields

§key: MessageGroupKey

Group key

§

RestoreOwnership

Restoring a group whose owner’s session ended and was re-established within the grace period.

Server → owner, at the owner’s (re)connect: the group still exists here but the owner’s TreeKEM state died with its old session. The owner re-founds the tree (fresh leaf secret, epoch 0) and opens a group channel, then echoes this signal back.

Owner → server, once re-founded: the server sends Self::RestoreMembership to every member, who rejoin the new tree with fresh KeyPackages. Only the owner’s echo is acted on.

Fields

§key: MessageGroupKey

Group key

§

MessageDropped

Local notice (never sent on the wire) that a group message addressed to this session was dropped because it could not be decrypted here, e.g. it arrived before this session’s Welcome. Delivered to the group channel if one is open, otherwise to the kernel as a GroupEvent.

Fields

§key: MessageGroupKey

Group key

§sender: u64

The sender of the dropped message

§reason: String

Why it could not be delivered

Trait Implementations§

§

impl Clone for GroupBroadcast

§

fn clone(&self) -> GroupBroadcast

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
§

impl Debug for GroupBroadcast

§

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

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for GroupBroadcast

§

fn deserialize<__D>( __deserializer: __D, ) -> Result<GroupBroadcast, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl From<GroupBroadcast> for GroupBroadcastPayload

§

fn from(broadcast: GroupBroadcast) -> GroupBroadcastPayload

Convert GroupBroadcast to GroupBroadcastPayload

§

impl Serialize for GroupBroadcast

§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

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
§

impl<T> AttachedPayload for T
where T: Send + Sync + 'static + Serialize + DeserializeOwned,

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
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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
§

impl<T> ContextRequirements for T
where T: 'static,

§

impl<T> Conv for T

§

fn conv<T>(self) -> T
where Self: Into<T>,

Converts self into T using Into<T>. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>
where Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>
where Self: Display,

Causes self to use its Display implementation when Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where Self: LowerExp,

Causes self to use its LowerExp implementation when Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where Self: LowerHex,

Causes self to use its LowerHex implementation when Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>
where Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>
where Self: Pointer,

Causes self to use its Pointer implementation when Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where Self: UpperExp,

Causes self to use its UpperExp implementation when Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where Self: UpperHex,

Causes self to use its UpperHex implementation when Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>
where &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<'a, T> LocalContextRequirements<'a> for T
where T: 'a,

§

impl<T> NetObject for T
where T: Debug + Serialize + DeserializeOwned + Send + Sync + Clone + 'static,

§

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

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where Self: Borrow<B>, B: 'a + ?Sized, R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
where Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where Self: AsRef<U>, U: 'a + ?Sized, R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where Self: AsMut<U>, U: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where Self: Deref<Target = T>, T: 'a + ?Sized, R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( &'a mut self, func: impl FnOnce(&'a mut T) -> R, ) -> R
where Self: DerefMut<Target = T> + Deref, T: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe function.
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

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

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<T> SyncContextRequirements for T
where T: 'static,

§

impl<'a, T> SyncIO for T
where T: Serialize + Deserialize<'a>,

§

fn serialize_to_vector(&self) -> Result<Vec<u8>, NetworkError>
where Self: Serialize,

Serializes a bincode type to a byte vector
§

fn deserialize_from_vector<'a>(input: &'a [u8]) -> Result<Self, NetworkError>
where Self: Deserialize<'a>,

Deserialized a bincode type from a byte vector
§

fn deserialize_from_owned_vector(input: Vec<u8>) -> Result<Self, NetworkError>
where Self: DeserializeOwned,

Deserializes from an owned buffer
§

fn deserialize_in_place<'a, R, T>( reader: R, place: &mut T, ) -> Result<(), NetworkError>
where T: Deserialize<'a>, R: BincodeRead<'a>,

Deserializes in-place
§

fn serialize_into_buf(&self, buf: &mut BytesMut) -> Result<(), NetworkError>
where Self: Serialize,

Serializes self into a buffer, appending to any existing contents.
§

fn serialize_into_slice(&self, slice: &mut [u8]) -> Result<(), NetworkError>
where Self: Serialize,

Serializes directly into a slice
§

fn serialized_size(&self) -> Option<usize>
where Self: Serialize,

Returns the expected size of the serialized objects
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
§

impl<T, U, F> Then<U, F> for T
where F: Fn(T) -> U,

§

fn then(self, fx: F) -> U

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
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. 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.
§

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

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more