pub enum ValueSequenceConstraint<T> {
Bare(Vec<T>),
Constraint(ResolvedValueSequenceConstraint<T>),
}
Expand description
A bare value or constraint specifying a sequence of accepted values.
§W3C Spec Compliance
There exists no direct corresponding type in the
W3C “Media Capture and Streams” spec,
since the ValueConstraint<T>
type aims to be a generalization over
multiple types in the spec.
Rust | W3C |
---|---|
ValueSequenceConstraint<String> | ConstrainDOMString |
Variants§
Bare(Vec<T>)
A bare-valued media track constraint.
Constraint(ResolvedValueSequenceConstraint<T>)
A fully-qualified media track constraint.
Implementations§
Source§impl<T> ValueSequenceConstraint<T>where
T: Clone,
impl<T> ValueSequenceConstraint<T>where
T: Clone,
Sourcepub fn to_resolved(
&self,
strategy: MediaTrackConstraintResolutionStrategy,
) -> ResolvedValueSequenceConstraint<T>
pub fn to_resolved( &self, strategy: MediaTrackConstraintResolutionStrategy, ) -> ResolvedValueSequenceConstraint<T>
Returns a resolved representation of the constraint with bare values resolved to fully-qualified constraints.
Sourcepub fn into_resolved(
self,
strategy: MediaTrackConstraintResolutionStrategy,
) -> ResolvedValueSequenceConstraint<T>
pub fn into_resolved( self, strategy: MediaTrackConstraintResolutionStrategy, ) -> ResolvedValueSequenceConstraint<T>
Consumes the constraint, returning a resolved representation of the constraint with bare values resolved to fully-qualified constraints.
Trait Implementations§
Source§impl<T: Clone> Clone for ValueSequenceConstraint<T>
impl<T: Clone> Clone for ValueSequenceConstraint<T>
Source§fn clone(&self) -> ValueSequenceConstraint<T>
fn clone(&self) -> ValueSequenceConstraint<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<T: Debug> Debug for ValueSequenceConstraint<T>
impl<T: Debug> Debug for ValueSequenceConstraint<T>
Source§impl<T> Default for ValueSequenceConstraint<T>
impl<T> Default for ValueSequenceConstraint<T>
Source§impl<'de, T> Deserialize<'de> for ValueSequenceConstraint<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for ValueSequenceConstraint<T>where
T: Deserialize<'de>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<T> From<ResolvedValueSequenceConstraint<T>> for ValueSequenceConstraint<T>
impl<T> From<ResolvedValueSequenceConstraint<T>> for ValueSequenceConstraint<T>
Source§fn from(constraint: ResolvedValueSequenceConstraint<T>) -> Self
fn from(constraint: ResolvedValueSequenceConstraint<T>) -> Self
Converts to this type from the input type.
Source§impl<T> From<T> for ValueSequenceConstraint<T>
impl<T> From<T> for ValueSequenceConstraint<T>
Source§impl From<ValueSequenceConstraint<String>> for MediaTrackConstraint
impl From<ValueSequenceConstraint<String>> for MediaTrackConstraint
Source§fn from(constraint: ValueSequenceConstraint<String>) -> Self
fn from(constraint: ValueSequenceConstraint<String>) -> Self
Converts to this type from the input type.
Source§impl<T> From<Vec<T>> for ValueSequenceConstraint<T>
impl<T> From<Vec<T>> for ValueSequenceConstraint<T>
Source§impl<T: PartialEq> PartialEq for ValueSequenceConstraint<T>
impl<T: PartialEq> PartialEq for ValueSequenceConstraint<T>
Source§impl<T> Serialize for ValueSequenceConstraint<T>where
T: Serialize,
impl<T> Serialize for ValueSequenceConstraint<T>where
T: Serialize,
impl<T: Eq> Eq for ValueSequenceConstraint<T>
impl<T> StructuralPartialEq for ValueSequenceConstraint<T>
Auto Trait Implementations§
impl<T> Freeze for ValueSequenceConstraint<T>
impl<T> RefUnwindSafe for ValueSequenceConstraint<T>where
T: RefUnwindSafe,
impl<T> Send for ValueSequenceConstraint<T>where
T: Send,
impl<T> Sync for ValueSequenceConstraint<T>where
T: Sync,
impl<T> Unpin for ValueSequenceConstraint<T>where
T: Unpin,
impl<T> UnwindSafe for ValueSequenceConstraint<T>where
T: UnwindSafe,
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§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.