pub enum VideoSource {
Asset {
path: String,
},
File {
path: String,
},
Network {
url: String,
},
}Expand description
Source of media for a Video widget.
The source is platform-neutral. Shells translate it into the native media
API they own: static and SSR targets emit HTML <video> sources, web uses
HtmlVideoElement, and native shells use their platform video backends.
Variants§
Asset
App-bundled asset path, relative to the app/project asset root.
File
Local filesystem path.
Network
Network URL. Backend support depends on the active shell and platform.
Implementations§
Trait Implementations§
Source§impl Clone for VideoSource
impl Clone for VideoSource
Source§fn clone(&self) -> VideoSource
fn clone(&self) -> VideoSource
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 VideoSource
impl Debug for VideoSource
Source§impl Default for VideoSource
impl Default for VideoSource
Source§impl<'de> Deserialize<'de> for VideoSource
impl<'de> Deserialize<'de> for VideoSource
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 VideoSource
Source§impl From<&str> for VideoSource
impl From<&str> for VideoSource
Source§impl From<String> for VideoSource
impl From<String> for VideoSource
Source§impl PartialEq for VideoSource
impl PartialEq for VideoSource
Source§impl Serialize for VideoSource
impl Serialize for VideoSource
impl StructuralPartialEq for VideoSource
Auto Trait Implementations§
impl Freeze for VideoSource
impl RefUnwindSafe for VideoSource
impl Send for VideoSource
impl Sync for VideoSource
impl Unpin for VideoSource
impl UnsafeUnpin for VideoSource
impl UnwindSafe for VideoSource
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.