pub struct Authorizations { /* private fields */ }Implementations§
Source§impl Authorizations
impl Authorizations
Sourcepub fn of(authorizations: &[String]) -> Self
pub fn of(authorizations: &[String]) -> Self
Creates a new Authorizations instance.
§Arguments
authorizations: A vector of authorizations.
returns: Authorizations
§Examples
use std::collections::HashSet;
use accumulo_access::Authorizations;
let authorizations = Authorizations::of(&["label1".to_string(), "label5".to_string()]);
let expected = HashSet::from_iter(vec!["label1".to_string(), "label5".to_string()]);
assert_eq!(authorizations.to_set(), expected);pub fn contains(&self, auth: &str) -> bool
pub fn to_set(&self) -> HashSet<String>
Trait Implementations§
Source§impl Clone for Authorizations
impl Clone for Authorizations
Source§fn clone(&self) -> Authorizations
fn clone(&self) -> Authorizations
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Authorizations
impl Debug for Authorizations
Source§impl PartialEq for Authorizations
impl PartialEq for Authorizations
impl StructuralPartialEq for Authorizations
Auto Trait Implementations§
impl Freeze for Authorizations
impl RefUnwindSafe for Authorizations
impl Send for Authorizations
impl Sync for Authorizations
impl Unpin for Authorizations
impl UnwindSafe for Authorizations
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