pub struct YoutubeEmbed {
pub url: YoutubeUrl,
pub start_at: Option<u32>,
pub end_at: Option<u32>,
pub captions: bool,
pub muted: bool,
pub autoplay: bool,
pub done_action: Option<DoneAction>,
}
Expand description
YouTube host embed
Fields§
§url: YoutubeUrl
url of the YouTube embed
start_at: Option<u32>
start at second
end_at: Option<u32>
end at second
captions: bool
show captions
muted: bool
play with sound
autoplay: bool
autoplay
done_action: Option<DoneAction>
what to do when done
Implementations§
Source§impl YoutubeEmbed
impl YoutubeEmbed
Sourcepub fn url(self, value: YoutubeUrl) -> Self
pub fn url(self, value: YoutubeUrl) -> Self
Sets the url
field of this struct.
Sourcepub fn done_action(self, value: Option<DoneAction>) -> Self
pub fn done_action(self, value: Option<DoneAction>) -> Self
Sets the done_action
field of this struct.
Source§impl YoutubeEmbed
impl YoutubeEmbed
Sourcepub fn new(url: YoutubeUrl) -> Self
pub fn new(url: YoutubeUrl) -> Self
creates a new YoutubeEmbed
Trait Implementations§
Source§impl Clone for YoutubeEmbed
impl Clone for YoutubeEmbed
Source§fn clone(&self) -> YoutubeEmbed
fn clone(&self) -> YoutubeEmbed
Returns a copy of the value. Read more
1.0.0 · 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 YoutubeEmbed
impl Debug for YoutubeEmbed
Source§impl<'de> Deserialize<'de> for YoutubeEmbed
impl<'de> Deserialize<'de> for YoutubeEmbed
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
Source§impl PartialEq for YoutubeEmbed
impl PartialEq for YoutubeEmbed
Source§impl Serialize for YoutubeEmbed
impl Serialize for YoutubeEmbed
impl StructuralPartialEq for YoutubeEmbed
Auto Trait Implementations§
impl Freeze for YoutubeEmbed
impl RefUnwindSafe for YoutubeEmbed
impl Send for YoutubeEmbed
impl Sync for YoutubeEmbed
impl Unpin for YoutubeEmbed
impl UnwindSafe for YoutubeEmbed
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