pub struct RightsBuilder(/* private fields */);๐Deprecated since 0.4.0: Use FcntlRights directly
Expand description
Used to construct a new set of allowed file rights.
ยงExample
let rights = RightsBuilder::new()
.allow(Right::Read)
.allow(Right::Fexecve)
.finalize();Implementationsยง
Sourceยงimpl RightsBuilder
impl RightsBuilder
Sourcepub fn new() -> RightsBuilder
pub fn new() -> RightsBuilder
Initialize a new RightsBuilder which will deny all rights.
pub fn add(&mut self, right: Right) -> &mut RightsBuilder
๐Deprecated since 0.4.0: use RightsBuilder::allow instead
Sourcepub fn allow(&mut self, right: Right) -> &mut RightsBuilder
pub fn allow(&mut self, right: Right) -> &mut RightsBuilder
Add a new Right to the list of allowed rights.
Sourcepub fn finalize(&self) -> FileRights
pub fn finalize(&self) -> FileRights
Finish this Builder into a FileRights object.
pub fn remove(&mut self, right: Right) -> &mut RightsBuilder
๐Deprecated since 0.4.0: use RightsBuilder::deny instead
Sourcepub fn deny(&mut self, right: Right) -> &mut RightsBuilder
pub fn deny(&mut self, right: Right) -> &mut RightsBuilder
Remove another Right from the list of allowed rights.
Trait Implementationsยง
Sourceยงimpl Debug for RightsBuilder
impl Debug for RightsBuilder
Auto Trait Implementationsยง
impl Freeze for RightsBuilder
impl RefUnwindSafe for RightsBuilder
impl Send for RightsBuilder
impl Sync for RightsBuilder
impl Unpin for RightsBuilder
impl UnwindSafe for RightsBuilder
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