pub enum AdminOp {
Show 17 variants
CreateChannel {
name: String,
visibility: Visibility,
},
DeleteChannel {
name: String,
},
RenameChannel {
name: String,
new_name: String,
},
SetVisibility {
name: String,
visibility: Visibility,
},
AclAdd {
channel: String,
user: String,
},
AclRemove {
channel: String,
user: String,
},
InviteCreate {
channel: String,
uses: Option<u32>,
expires_in_secs: Option<u64>,
},
InviteRevoke {
token: String,
},
Kick {
channel: String,
target: String,
},
Ban {
channel: String,
user: String,
},
UserRemove {
username: String,
},
MachineRemove {
name: String,
},
MachineAdd {
name: String,
pubkey: Vec<u8>,
},
AclList {
channel: String,
},
Unban {
channel: String,
user: String,
},
BanList {
channel: String,
},
InviteList {
channel: String,
},
}Expand description
An admin / moderation operation (DESIGN.md §7), authorized server-side by user role.
Variants§
CreateChannel
Create a channel with a visibility tier.
DeleteChannel
Delete a channel.
RenameChannel
Rename a channel.
SetVisibility
Change a channel’s visibility tier.
AclAdd
Add a user to a channel’s access-control list.
AclRemove
Remove a user from a channel’s access-control list.
InviteCreate
Create an invite token for a channel.
Fields
InviteRevoke
Revoke an invite token.
Kick
Kick a live session or user from a channel.
Ban
Ban a user from a channel.
UserRemove
Remove a user from the server (server-admin).
MachineRemove
Revoke an enrolled machine (server-admin / self), force-dropping its live sessions.
MachineAdd
Enroll a new machine key under the authenticated user (self-service, DESIGN.md §5.1).
Appended after MachineRemove so existing variant indices are unchanged (forward-compat).
Fields
AclList
List a channel’s ACL members (channel-admin; answered with a UserList).
Unban
Lift a channel ban (channel-admin; does not grant ACL membership).
BanList
List a channel’s banned users (channel-admin; answered with a UserList).
InviteList
List a channel’s outstanding invites (channel-admin; answered with an InviteList).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for AdminOp
impl<'de> Deserialize<'de> for AdminOp
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>,
impl Eq for AdminOp
impl StructuralPartialEq for AdminOp
Auto Trait Implementations§
impl Freeze for AdminOp
impl RefUnwindSafe for AdminOp
impl Send for AdminOp
impl Sync for AdminOp
impl Unpin for AdminOp
impl UnsafeUnpin for AdminOp
impl UnwindSafe for AdminOp
Blanket Implementations§
impl<T> AsyncFriendly for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request