Struct spawn_access_control::RoleManager
source · pub struct RoleManager { /* private fields */ }
Expand description
Sahiplik ve Roller yönetimi sağlayan kütüphane
Implementations§
source§impl RoleManager
impl RoleManager
sourcepub fn new(owner: &str) -> RoleManager
pub fn new(owner: &str) -> RoleManager
Yeni bir kontrat sahipliği ve roller yönetimi başlatır
sourcepub fn transfer_ownership(
&mut self,
current_owner: &str,
new_owner: &str,
) -> bool
pub fn transfer_ownership( &mut self, current_owner: &str, new_owner: &str, ) -> bool
Sahipliği başka bir kullanıcıya devreder (yalnızca mevcut sahip çağırabilir)
sourcepub fn assign_role(&mut self, owner: &str, role: &str, user: &str) -> bool
pub fn assign_role(&mut self, owner: &str, role: &str, user: &str) -> bool
Belirli bir kullanıcıya rol atar (yalnızca sahip yapabilir)
sourcepub fn remove_role(&mut self, owner: &str, role: &str, user: &str) -> bool
pub fn remove_role(&mut self, owner: &str, role: &str, user: &str) -> bool
Bir kullanıcıya atanmış rollerden birini siler (yalnızca sahip yapabilir)
sourcepub fn has_role(&self, role: &str, user: &str) -> bool
pub fn has_role(&self, role: &str, user: &str) -> bool
Kullanıcının bir role sahip olup olmadığını kontrol eder
sourcepub fn role_based_access(&self, user: &str, role: &str) -> bool
pub fn role_based_access(&self, user: &str, role: &str) -> bool
Rol bazlı erişim kontrolü sağlar (sadece sahip veya belirli rolü olanlar çağırabilir)
sourcepub fn list_role_users(&self, role: &str) -> Vec<String>
pub fn list_role_users(&self, role: &str) -> Vec<String>
Belirli bir rol altında kayıtlı kullanıcıları listeler
Trait Implementations§
source§impl From<RoleManager> for JsValue
impl From<RoleManager> for JsValue
source§fn from(value: RoleManager) -> Self
fn from(value: RoleManager) -> Self
Converts to this type from the input type.
source§impl FromWasmAbi for RoleManager
impl FromWasmAbi for RoleManager
source§impl IntoWasmAbi for RoleManager
impl IntoWasmAbi for RoleManager
source§impl LongRefFromWasmAbi for RoleManager
impl LongRefFromWasmAbi for RoleManager
source§impl OptionFromWasmAbi for RoleManager
impl OptionFromWasmAbi for RoleManager
source§impl OptionIntoWasmAbi for RoleManager
impl OptionIntoWasmAbi for RoleManager
source§impl RefFromWasmAbi for RoleManager
impl RefFromWasmAbi for RoleManager
source§type Anchor = RcRef<RoleManager>
type Anchor = RcRef<RoleManager>
The type that holds the reference to
Self
for the duration of the
invocation of the function that has an &Self
parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.source§impl RefMutFromWasmAbi for RoleManager
impl RefMutFromWasmAbi for RoleManager
source§impl TryFromJsValue for RoleManager
impl TryFromJsValue for RoleManager
source§impl VectorFromWasmAbi for RoleManager
impl VectorFromWasmAbi for RoleManager
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[RoleManager]>
source§impl VectorIntoJsValue for RoleManager
impl VectorIntoJsValue for RoleManager
fn vector_into_jsvalue(vector: Box<[RoleManager]>) -> JsValue
source§impl VectorIntoWasmAbi for RoleManager
impl VectorIntoWasmAbi for RoleManager
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[RoleManager]>) -> Self::Abi
source§impl WasmDescribeVector for RoleManager
impl WasmDescribeVector for RoleManager
Auto Trait Implementations§
impl Freeze for RoleManager
impl RefUnwindSafe for RoleManager
impl Send for RoleManager
impl Sync for RoleManager
impl Unpin for RoleManager
impl UnwindSafe for RoleManager
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
source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::Abi
source§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi
, except that it may throw and never
return in the case of Err
.