pub struct Role {
pub id: String,
pub name: String,
pub description: Option<String>,
pub permissions: Vec<String>,
pub is_predefined: bool,
pub metadata: Option<Metadata>,
pub created_at: DateTime,
pub updated_at: DateTime,
}Expand description
A custom role that can be used to assign set of permissions to members.
Fields§
§id: StringUnique identifier of the role.
name: StringUser-defined name of the role.
description: Option<String>User-defined description of the role.
permissions: Vec<String>List of permission granted by this role.
Constraints:
- max items: 100
is_predefined: boolTrue if the role is provided by SumUp.
metadata: Option<Metadata>§created_at: DateTimeThe timestamp of when the role was created.
updated_at: DateTimeThe timestamp of when the role was last updated.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Role
impl<'de> Deserialize<'de> for Role
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
Auto Trait Implementations§
impl Freeze for Role
impl RefUnwindSafe for Role
impl Send for Role
impl Sync for Role
impl Unpin for Role
impl UnsafeUnpin for Role
impl UnwindSafe for Role
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