pub struct MediaValue {
pub kind: MediaKind,
pub source: MediaSource,
}Expand description
A media field value. Carries the MediaSource (where the bytes
come from) and a duplicate kind discriminator so consumers can
switch on the modality without inspecting the source.
Fields§
§kind: MediaKindModality this value represents.
source: MediaSourceWhere the bytes come from.
Trait Implementations§
Source§impl Clone for MediaValue
impl Clone for MediaValue
Source§fn clone(&self) -> MediaValue
fn clone(&self) -> MediaValue
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 MediaValue
impl Debug for MediaValue
Source§impl<'de> Deserialize<'de> for MediaValue
impl<'de> Deserialize<'de> for MediaValue
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
impl Eq for MediaValue
Source§impl PartialEq for MediaValue
impl PartialEq for MediaValue
Source§impl Serialize for MediaValue
impl Serialize for MediaValue
impl StructuralPartialEq for MediaValue
Auto Trait Implementations§
impl Freeze for MediaValue
impl RefUnwindSafe for MediaValue
impl Send for MediaValue
impl Sync for MediaValue
impl Unpin for MediaValue
impl UnsafeUnpin for MediaValue
impl UnwindSafe for MediaValue
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