Struct wicrs_server::hub::PermissionGroup [−][src]
pub struct PermissionGroup { pub id: ID, pub name: String, pub members: Vec<String>, pub hub_permissions: HubPermissions, pub channel_permissions: HashMap<ID, ChannelPermissions>, pub created: DateTime<Utc>, }
Expand description
Represents a set of permissions that can be easily given to any hub member.
Fields
id: ID
ID of the group.
name: String
Name of the group.
members: Vec<String>
Array of the IDs of hub members who are members of the group.
hub_permissions: HubPermissions
Hub permission settings that the group has.
channel_permissions: HashMap<ID, ChannelPermissions>
Mapping of channel permission settings the group has to the channel they apply to.
created: DateTime<Utc>
Time in milliseconds since Unix Epoch that the group was created.
Implementations
Adds a hub member to the group, maps to HubMember::join_group
.
Removes a hub member from the group, maps to HubMember::leave_group
.
Changes the setting of a hub permission for the group.
pub fn set_channel_permission(
&mut self,
channel_id: ID,
permission: ChannelPermission,
value: PermissionSetting
)
[src]
pub fn set_channel_permission(
&mut self,
channel_id: ID,
permission: ChannelPermission,
value: PermissionSetting
)
[src]Changes the setting of a channel permission for a specific channel for the group.
Checks if the group has the All
permission.
Checks if the group has a permission.
Checks if the group has a permission in a specific channel.
Trait Implementations
fn resolve_field<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context<'life2>
) -> Pin<Box<dyn Future<Output = ServerResult<Option<Value>>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
[src]
fn resolve_field<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context<'life2>
) -> Pin<Box<dyn Future<Output = ServerResult<Option<Value>>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
[src]Resolves a field value and outputs it as a json value async_graphql::Value
. Read more
fn find_entity<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 Context<'life2>,
params: &'life3 Value
) -> Pin<Box<dyn Future<Output = ServerResult<Option<Value>>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
[src]
fn find_entity<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 Context<'life2>,
params: &'life3 Value
) -> Pin<Box<dyn Future<Output = ServerResult<Option<Value>>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
[src]Find the GraphQL entity with the given name from the parameter. Read more
fn collect_all_fields(
&'a self,
ctx: &ContextBase<'a, &'a Positioned<SelectionSet>>,
fields: &mut Fields<'a>
) -> Result<(), ServerError> where
Self: Send + Sync,
[src]
fn collect_all_fields(
&'a self,
ctx: &ContextBase<'a, &'a Positioned<SelectionSet>>,
fields: &mut Fields<'a>
) -> Result<(), ServerError> where
Self: Send + Sync,
[src]Collect all the fields of the container that are queried in the selection set. Read more
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]Deserialize this value from the given Serde deserializer. Read more
fn resolve<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 ContextSelectionSet<'life2>,
_field: &'life3 Positioned<Field>
) -> Pin<Box<dyn Future<Output = ServerResult<Value>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
[src]
fn resolve<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
ctx: &'life1 ContextSelectionSet<'life2>,
_field: &'life3 Positioned<Field>
) -> Pin<Box<dyn Future<Output = ServerResult<Value>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
[src]Resolve an output value to async_graphql::Value
.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Create type information in the registry and return qualified typename.
Qualified typename.
Introspection type name Read more
Auto Trait Implementations
impl RefUnwindSafe for PermissionGroup
impl Send for PermissionGroup
impl Sync for PermissionGroup
impl Unpin for PermissionGroup
impl UnwindSafe for PermissionGroup
Blanket Implementations
Mutably borrows from an owned value. Read more
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read more
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
type Output = T
type Output = T
Should always be Self
pub fn vzip(self) -> V