pub struct Device {
pub id: Option<String>,
pub is_active: bool,
pub is_private_session: bool,
pub is_restricted: bool,
pub name: String,
pub type: String,
pub volume_percent: Option<u32>,
pub supports_volume: bool,
}Expand description
A device.
Fields§
§id: Option<String>The device ID. It is unique and may be persistent, but persistence is not guaranteed, so it shouldn’t be cached for long periods.
is_active: boolWhether or not the device is currently active.
is_private_session: boolWhether or not the device is in a private playback session.
is_restricted: boolWhether or not the device is currently restricted. If true, the Web API commands won’t be accepted by the device.
name: StringThe human-readable name for the device.
type: StringThe type of the device (e.g. computer, smartphone, speaker).
volume_percent: Option<u32>The current volume percentage.
supports_volume: boolWhether or not the device allows setting the volume.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Device
impl<'de> Deserialize<'de> for Device
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
impl StructuralPartialEq for Device
Auto Trait Implementations§
impl Freeze for Device
impl RefUnwindSafe for Device
impl Send for Device
impl Sync for Device
impl Unpin for Device
impl UnsafeUnpin for Device
impl UnwindSafe for Device
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