pub enum SActor {
User {
id: Option<SActorType>,
_extra_fields: Map<String, Value>,
},
Group {
groups: Option<SGroups>,
_extra_fields: Map<String, Value>,
},
Unknown(Value),
}Variants§
Implementations§
Source§impl SActor
impl SActor
Sourcepub const fn is_unknown(&self) -> bool
pub const fn is_unknown(&self) -> bool
Returns true if the enum is SActor::Unknown otherwise false
Source§impl SActor
impl SActor
Sourcepub fn inexistent_actors(&self) -> Option<Vec<SActorType>>
pub fn inexistent_actors(&self) -> Option<Vec<SActorType>>
Check if the actor exists if the Actor exists, it will return None if the Actor does not exist, it will return the list of actors that do not exist
pub fn from_user_string(user: &str) -> Self
pub fn from_user_id(id: u32) -> Self
pub fn from_group_string(group: &str) -> Self
pub fn from_group_id(id: u32) -> Self
pub fn from_group_vec_string(group: Vec<&str>) -> Self
pub fn from_group_vec_id(groups: Vec<u32>) -> Self
pub fn from_group_vec_actors(groups: Vec<SActorType>) -> Self
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SActor
impl<'de> Deserialize<'de> for SActor
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
impl Eq for SActor
impl StructuralPartialEq for SActor
Auto Trait Implementations§
impl Freeze for SActor
impl RefUnwindSafe for SActor
impl Send for SActor
impl Sync for SActor
impl Unpin for SActor
impl UnwindSafe for SActor
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