#[non_exhaustive]pub struct Video {
pub title: Title,
pub sources: Vec<Source>,
pub metadata: BlockMetadata,
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§sources: Vec<Source>§metadata: BlockMetadata§location: LocationImplementations§
Source§impl Video
impl Video
Sourcepub fn new(sources: Vec<Source>, location: Location) -> Self
pub fn new(sources: Vec<Source>, location: Location) -> Self
Create a new video with the given sources and location.
Sourcepub fn with_title(self, title: Title) -> Self
pub fn with_title(self, title: Title) -> Self
Set the title.
Sourcepub fn with_metadata(self, metadata: BlockMetadata) -> Self
pub fn with_metadata(self, metadata: BlockMetadata) -> Self
Set the metadata.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Video
impl<'de> Deserialize<'de> for Video
Source§fn deserialize<D>(deserializer: D) -> Result<Video, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Video, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Video
Auto Trait Implementations§
impl Freeze for Video
impl RefUnwindSafe for Video
impl Send for Video
impl Sync for Video
impl Unpin for Video
impl UnwindSafe for Video
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