#[non_exhaustive]pub enum MediaSource {
Inline {
data_base64: String,
},
Url(String),
}Expand description
Media vocabulary a MediaResolver answers with, and the kind an
inline ceiling applies to.
The source data of a resolved media payload: inline base64 bytes or a
remote URL.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Inline
Inline media bytes represented as a base64-encoded string.
Url(String)
A remote media location addressed by URL.
When paired with a supported media type and protocol capability, a URL
with an http or https scheme and non-empty remainder renders
directly to the wire; any other URL, scheme, or unsupported media type
degrades to the deterministic text placeholder.
Trait Implementations§
Source§impl Clone for MediaSource
impl Clone for MediaSource
Source§fn clone(&self) -> MediaSource
fn clone(&self) -> MediaSource
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 MediaSource
impl Debug for MediaSource
impl Eq for MediaSource
Source§impl PartialEq for MediaSource
impl PartialEq for MediaSource
impl StructuralPartialEq for MediaSource
Auto Trait Implementations§
impl Forget for MediaSource
impl Freeze for MediaSource
impl Move for MediaSource
impl RefUnwindSafe for MediaSource
impl Send for MediaSource
impl Sync for MediaSource
impl Unpin for MediaSource
impl UnsafeUnpin for MediaSource
impl UnwindSafe for MediaSource
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