pub struct RenderContext {
pub player: String,
pub player_bus_name: String,
pub status: Option<String>,
pub status_icon: Option<String>,
pub volume: Option<f64>,
pub metadata: MediaMetadata,
}Expand description
A struct containing all variables available for template rendering, including player state and media metadata.
Fields§
§player: String§player_bus_name: String§status: Option<String>§status_icon: Option<String>§volume: Option<f64>§metadata: MediaMetadataImplementations§
Source§impl RenderContext
impl RenderContext
pub fn new(player: &Player, metadata: MediaMetadata) -> Self
Trait Implementations§
Source§impl Clone for RenderContext
impl Clone for RenderContext
Source§fn clone(&self) -> RenderContext
fn clone(&self) -> RenderContext
Returns a duplicate 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 RenderContext
impl Debug for RenderContext
Auto Trait Implementations§
impl Freeze for RenderContext
impl RefUnwindSafe for RenderContext
impl Send for RenderContext
impl Sync for RenderContext
impl Unpin for RenderContext
impl UnwindSafe for RenderContext
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