pub struct ParseACL { /* private fields */ }
Expand description
Represents a Parse Access Control List (ACL).
ACLs are used to control permissions for reading and writing ParseObjects. Permissions can be granted to the public, individual users (by user ID), or roles.
Implementations§
Source§impl ParseACL
impl ParseACL
Sourcepub fn set_public_read_access(&mut self, allowed: bool)
pub fn set_public_read_access(&mut self, allowed: bool)
Sourcepub fn set_public_write_access(&mut self, allowed: bool)
pub fn set_public_write_access(&mut self, allowed: bool)
Sourcepub fn set_user_read_access(&mut self, user_id: &str, allowed: bool)
pub fn set_user_read_access(&mut self, user_id: &str, allowed: bool)
Sets read access for a specific user ID.
§Arguments
user_id
: The object ID of the user.allowed
:true
to allow read access for this user,false
to disallow.
Sourcepub fn set_user_write_access(&mut self, user_id: &str, allowed: bool)
pub fn set_user_write_access(&mut self, user_id: &str, allowed: bool)
Sets write access for a specific user ID.
§Arguments
user_id
: The object ID of the user.allowed
:true
to allow write access for this user,false
to disallow.
Sourcepub fn set_role_read_access(&mut self, role_name: &str, allowed: bool)
pub fn set_role_read_access(&mut self, role_name: &str, allowed: bool)
Sets read access for a specific role.
§Arguments
role_name
: The name of the role (e.g., “Administrators”).allowed
:true
to allow read access for this role,false
to disallow.
Sourcepub fn set_role_write_access(&mut self, role_name: &str, allowed: bool)
pub fn set_role_write_access(&mut self, role_name: &str, allowed: bool)
Sets write access for a specific role.
§Arguments
role_name
: The name of the role (e.g., “Administrators”).allowed
:true
to allow write access for this role,false
to disallow.
Sourcepub fn get_public_read_access(&self) -> bool
pub fn get_public_read_access(&self) -> bool
Gets whether the public is allowed to read this object.
Sourcepub fn get_public_write_access(&self) -> bool
pub fn get_public_write_access(&self) -> bool
Gets whether the public is allowed to write this object.
Sourcepub fn get_user_read_access(&self, user_id: &str) -> bool
pub fn get_user_read_access(&self, user_id: &str) -> bool
Gets whether the given user is allowed to read this object.
Sourcepub fn get_user_write_access(&self, user_id: &str) -> bool
pub fn get_user_write_access(&self, user_id: &str) -> bool
Gets whether the given user is allowed to write this object.
Sourcepub fn get_role_read_access(&self, role_name: &str) -> bool
pub fn get_role_read_access(&self, role_name: &str) -> bool
Gets whether users belonging to the given role are allowed to read this object.
Sourcepub fn get_role_write_access(&self, role_name: &str) -> bool
pub fn get_role_write_access(&self, role_name: &str) -> bool
Gets whether users belonging to the given role are allowed to write this object.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ParseACL
impl<'de> Deserialize<'de> for ParseACL
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 ParseACL
Auto Trait Implementations§
impl Freeze for ParseACL
impl RefUnwindSafe for ParseACL
impl Send for ParseACL
impl Sync for ParseACL
impl Unpin for ParseACL
impl UnwindSafe for ParseACL
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