pub struct JsonLdProfileSet { /* private fields */ }
Expand description
Set of JSON-Ld profiles.
use oxjsonld::{JsonLdProfile, JsonLdProfileSet};
let mut profile_set = JsonLdProfileSet::empty();
profile_set |= JsonLdProfile::Expanded;
profile_set |= JsonLdProfile::Streaming;
assert!(profile_set.contains(JsonLdProfile::Streaming));
assert_eq!(
profile_set.into_iter().collect::<Vec<_>>(),
vec![JsonLdProfile::Expanded, JsonLdProfile::Streaming]
);
Implementations§
Source§impl JsonLdProfileSet
impl JsonLdProfileSet
pub const fn empty() -> JsonLdProfileSet
pub const fn from_profile(profile: JsonLdProfile) -> JsonLdProfileSet
Sourcepub const fn contains(self, profile: JsonLdProfile) -> bool
pub const fn contains(self, profile: JsonLdProfile) -> bool
Checks if this profile list contains the given profile.
Trait Implementations§
Source§impl BitOr<JsonLdProfile> for JsonLdProfileSet
impl BitOr<JsonLdProfile> for JsonLdProfileSet
Source§type Output = JsonLdProfileSet
type Output = JsonLdProfileSet
The resulting type after applying the
|
operator.Source§fn bitor(self, rhs: JsonLdProfile) -> JsonLdProfileSet
fn bitor(self, rhs: JsonLdProfile) -> JsonLdProfileSet
Performs the
|
operation. Read moreSource§impl BitOr<JsonLdProfileSet> for JsonLdProfile
impl BitOr<JsonLdProfileSet> for JsonLdProfile
Source§type Output = JsonLdProfileSet
type Output = JsonLdProfileSet
The resulting type after applying the
|
operator.Source§fn bitor(self, rhs: JsonLdProfileSet) -> JsonLdProfileSet
fn bitor(self, rhs: JsonLdProfileSet) -> JsonLdProfileSet
Performs the
|
operation. Read moreSource§impl BitOr for JsonLdProfileSet
impl BitOr for JsonLdProfileSet
Source§type Output = JsonLdProfileSet
type Output = JsonLdProfileSet
The resulting type after applying the
|
operator.Source§fn bitor(self, rhs: JsonLdProfileSet) -> JsonLdProfileSet
fn bitor(self, rhs: JsonLdProfileSet) -> JsonLdProfileSet
Performs the
|
operation. Read moreSource§impl BitOrAssign<JsonLdProfile> for JsonLdProfileSet
impl BitOrAssign<JsonLdProfile> for JsonLdProfileSet
Source§fn bitor_assign(&mut self, rhs: JsonLdProfile)
fn bitor_assign(&mut self, rhs: JsonLdProfile)
Performs the
|=
operation. Read moreSource§impl BitOrAssign for JsonLdProfileSet
impl BitOrAssign for JsonLdProfileSet
Source§fn bitor_assign(&mut self, rhs: JsonLdProfileSet)
fn bitor_assign(&mut self, rhs: JsonLdProfileSet)
Performs the
|=
operation. Read moreSource§impl Clone for JsonLdProfileSet
impl Clone for JsonLdProfileSet
Source§fn clone(&self) -> JsonLdProfileSet
fn clone(&self) -> JsonLdProfileSet
Returns a copy 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 JsonLdProfileSet
impl Debug for JsonLdProfileSet
Source§impl Default for JsonLdProfileSet
impl Default for JsonLdProfileSet
Source§fn default() -> JsonLdProfileSet
fn default() -> JsonLdProfileSet
Returns the “default value” for a type. Read more
Source§impl From<JsonLdProfile> for JsonLdProfileSet
impl From<JsonLdProfile> for JsonLdProfileSet
Source§fn from(profile: JsonLdProfile) -> JsonLdProfileSet
fn from(profile: JsonLdProfile) -> JsonLdProfileSet
Converts to this type from the input type.
Source§impl Hash for JsonLdProfileSet
impl Hash for JsonLdProfileSet
Source§impl IntoIterator for JsonLdProfileSet
impl IntoIterator for JsonLdProfileSet
Source§impl PartialEq for JsonLdProfileSet
impl PartialEq for JsonLdProfileSet
impl Copy for JsonLdProfileSet
impl Eq for JsonLdProfileSet
impl StructuralPartialEq for JsonLdProfileSet
Auto Trait Implementations§
impl Freeze for JsonLdProfileSet
impl RefUnwindSafe for JsonLdProfileSet
impl Send for JsonLdProfileSet
impl Sync for JsonLdProfileSet
impl Unpin for JsonLdProfileSet
impl UnwindSafe for JsonLdProfileSet
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