pub struct Role { /* private fields */ }Expand description
Represents a named role that can be assigned to entities within a namespace.
Implementations§
Source§impl Role
impl Role
Sourcepub fn new_with_namespace(
name: impl Into<String>,
namespace: impl Into<String>,
) -> Self
pub fn new_with_namespace( name: impl Into<String>, namespace: impl Into<String>, ) -> Self
Creates a new role within the provided namespace.
pub fn id(&self) -> &ConceptId
pub fn name(&self) -> &str
pub fn namespace(&self) -> &str
pub fn attributes(&self) -> &HashMap<String, Value>
pub fn set_attribute(&mut self, key: impl Into<String>, value: Value)
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
impl StructuralPartialEq for Role
Auto Trait Implementations§
impl Forget for Role
impl Freeze for Role
impl Move for Role
impl RefUnwindSafe for Role
impl Send for Role
impl Sync for Role
impl Unpin for Role
impl UnsafeUnpin for Rolewhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<(String, Value)>: UnsafeUnpin,
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