#[non_exhaustive]pub struct Video<'a> {
pub title: Title<'a>,
pub sources: Vec<Source<'a>>,
pub metadata: BlockMetadata<'a>,
pub location: Location,
}Expand description
A Video represents a video block in a document.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.title: Title<'a>§sources: Vec<Source<'a>>§metadata: BlockMetadata<'a>§location: LocationImplementations§
Source§impl<'a> Video<'a>
impl<'a> Video<'a>
Sourcepub fn new(sources: Vec<Source<'a>>, location: Location) -> Self
pub fn new(sources: Vec<Source<'a>>, location: Location) -> Self
Create a new video with the given sources and location.
Sourcepub fn with_title(self, title: Title<'a>) -> Self
pub fn with_title(self, title: Title<'a>) -> Self
Set the title.
Sourcepub fn with_metadata(self, metadata: BlockMetadata<'a>) -> Self
pub fn with_metadata(self, metadata: BlockMetadata<'a>) -> Self
Set the metadata.
Trait Implementations§
impl<'a> StructuralPartialEq for Video<'a>
Auto Trait Implementations§
impl<'a> Freeze for Video<'a>
impl<'a> RefUnwindSafe for Video<'a>
impl<'a> Send for Video<'a>
impl<'a> Sync for Video<'a>
impl<'a> Unpin for Video<'a>
impl<'a> UnsafeUnpin for Video<'a>
impl<'a> UnwindSafe for Video<'a>
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