pub enum Audiences {
AsSet(HashSet<String>),
AsString(String),
}
Expand description
Depending on applications, the audiences
property may be either a set or a
string. We support both.
Variants§
Implementations§
source§impl Audiences
impl Audiences
sourcepub fn contains(&self, allowed_audiences: &HashSet<String>) -> bool
pub fn contains(&self, allowed_audiences: &HashSet<String>) -> bool
Return true
if the audiences include any of the allowed_audiences
entries
sourcepub fn into_string(self) -> Result<String, Error>
pub fn into_string(self) -> Result<String, Error>
Get the audiences as a string. If it was originally serialized as a set, it can be only converted to a string if it contains at most one element.
Trait Implementations§
impl Eq for Audiences
impl StructuralPartialEq for Audiences
Auto Trait Implementations§
impl Freeze for Audiences
impl RefUnwindSafe for Audiences
impl Send for Audiences
impl Sync for Audiences
impl Unpin for Audiences
impl UnwindSafe for Audiences
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)