pub struct Media { /* private fields */ }Available on macOS and crate feature
media only.Implementations§
Source§impl Media
impl Media
pub fn new(parent: impl AsContainer) -> Result<Self>
pub fn is_visible(&self) -> Result<bool>
pub fn set_visible(&mut self, v: bool) -> Result<()>
pub fn is_enabled(&self) -> Result<bool>
pub fn set_enabled(&mut self, v: bool) -> Result<()>
pub fn loc(&self) -> Result<Point>
pub fn set_loc(&mut self, p: Point) -> Result<()>
pub fn size(&self) -> Result<Size>
pub fn set_size(&mut self, v: Size) -> Result<()>
pub fn tooltip(&self) -> Result<String>
pub fn set_tooltip(&mut self, s: impl AsRef<str>) -> Result<()>
pub fn url(&self) -> Result<String>
pub async fn load(&mut self, url: impl AsRef<str>) -> Result<()>
pub fn play(&mut self) -> Result<()>
pub fn pause(&mut self) -> Result<()>
pub fn full_time(&self) -> Result<Option<Duration>>
pub fn current_time(&self) -> Result<Duration>
pub fn set_current_time(&mut self, t: Duration) -> Result<()>
pub fn volume(&self) -> Result<f64>
pub fn set_volume(&mut self, v: f64) -> Result<()>
pub fn is_muted(&self) -> Result<bool>
pub fn set_muted(&mut self, v: bool) -> Result<()>
pub fn is_looped(&self) -> Result<bool>
pub fn set_looped(&mut self, v: bool) -> Result<()>
pub fn playback_rate(&self) -> Result<f64>
pub fn set_playback_rate(&mut self, v: f64) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Media
impl !Send for Media
impl !Sync for Media
impl !UnwindSafe for Media
impl Freeze for Media
impl Unpin for Media
impl UnsafeUnpin for Media
Blanket Implementations§
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
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