[−][src]Struct appstream::builders::VideoBuilder
A helper to build a Video
.
Example
use url::Url; use appstream::builders::VideoBuilder; let video = VideoBuilder::new(Url::parse("https://example.com/foobar/screencast.mkv").unwrap()) .width(1600) .height(900) .codec("av1") .build();
Fields
width: Option<u32>
The video width.
height: Option<u32>
The video height.
codec: Option<String>
The necesssary codec to play the video.
container: Option<String>
The video container. Possible values are Matroska(.mkv) or WebM.
url: Url
The video URL.
Implementations
impl VideoBuilder
[src]
pub fn new(url: Url) -> Self
[src]
pub fn width(self, width: u32) -> Self
[src]
Set the video width.
pub fn height(self, height: u32) -> Self
[src]
Set the video height.
pub fn container(self, container: &str) -> Self
[src]
The video container, either mkv
or webm
.
pub fn codec(self, codec: &str) -> Self
[src]
The video codec, either vp9
or av1
.
pub fn build(self) -> Video
[src]
Construct a Video.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for VideoBuilder
impl Send for VideoBuilder
impl Sync for VideoBuilder
impl Unpin for VideoBuilder
impl UnwindSafe for VideoBuilder
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,