#[non_exhaustive]pub struct Audio {
pub title: Title,
pub source: Source,
pub metadata: BlockMetadata,
pub location: Location,
}Expand description
An Audio represents an audio 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§source: Source§metadata: BlockMetadata§location: LocationImplementations§
Source§impl Audio
impl Audio
Sourcepub fn new(source: Source, location: Location) -> Self
pub fn new(source: Source, location: Location) -> Self
Create a new audio with the given source 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 Audio
impl<'de> Deserialize<'de> for Audio
Source§fn deserialize<D>(deserializer: D) -> Result<Audio, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Audio, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Audio
Auto Trait Implementations§
impl Freeze for Audio
impl RefUnwindSafe for Audio
impl Send for Audio
impl Sync for Audio
impl Unpin for Audio
impl UnwindSafe for Audio
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