pub struct RightsSchemaBuilder { /* private fields */ }Expand description
Builds a RightsSchema.
Implementations§
Source§impl RightsSchemaBuilder
impl RightsSchemaBuilder
Sourcepub fn rights(self, names: impl IntoIterator<Item = impl Into<String>>) -> Self
pub fn rights(self, names: impl IntoIterator<Item = impl Into<String>>) -> Self
Defines several rights, in order.
Sourcepub fn alias(
self,
name: impl Into<String>,
members: impl IntoIterator<Item = impl Into<String>>,
) -> Self
pub fn alias( self, name: impl Into<String>, members: impl IntoIterator<Item = impl Into<String>>, ) -> Self
Defines an alias for rights and aliases defined before it.
Sourcepub fn cancel(self, name: impl Into<String>) -> Self
pub fn cancel(self, name: impl Into<String>) -> Self
Defines a name that grants nothing and cancels every grant where it is in force.
Sourcepub fn limits(self, limits: Limits) -> Self
pub fn limits(self, limits: Limits) -> Self
The bounds the schema is built within; only Limits::rights applies here.
Sourcepub fn build(self) -> Result<RightsSchema, AclError>
pub fn build(self) -> Result<RightsSchema, AclError>
Checks the names and builds the schema.
§Errors
AclError::InvalidName for an empty name or one holding a control character,
AclError::DuplicateName, AclError::UnknownRight for an alias member not defined
before it, AclError::TooManyRights past Limits::rights.
Trait Implementations§
Source§impl Clone for RightsSchemaBuilder
impl Clone for RightsSchemaBuilder
Source§impl Debug for RightsSchemaBuilder
impl Debug for RightsSchemaBuilder
Auto Trait Implementations§
impl Freeze for RightsSchemaBuilder
impl RefUnwindSafe for RightsSchemaBuilder
impl Send for RightsSchemaBuilder
impl Sync for RightsSchemaBuilder
impl Unpin for RightsSchemaBuilder
impl UnsafeUnpin for RightsSchemaBuilder
impl UnwindSafe for RightsSchemaBuilder
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