pub struct Container {
pub name: String,
pub container_id: String,
pub playable: bool,
pub image_url: Option<Url>,
pub media_id: Option<String>,
}Expand description
Information about a generic music container.
Fields§
§name: StringName of the container.
container_id: StringID of the container.
playable: boolIs the container directly playable?
image_url: Option<Url>URL to an image representing the container, if it exists.
If this is None, it may be able to be retrieved via the
GetAlbumMetadata command.
media_id: Option<String>Media ID of this container, if it’s playable.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Container
impl<'de> Deserialize<'de> for Container
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 MediaContainerBase for Container
impl MediaContainerBase for Container
Source§fn container_id(&self) -> &str
fn container_id(&self) -> &str
Get the container ID of this media item.
Source§fn into_media_container(self) -> MediaContainerwhere
Self: Sized,
fn into_media_container(self) -> MediaContainerwhere
Self: Sized,
Convert this specific media container into the MediaContainer enumeration.
Source§fn as_media_container_ref(&self) -> MediaContainerRef<'_>
fn as_media_container_ref(&self) -> MediaContainerRef<'_>
Retrieve a reference to this media item as a MediaContainerRef.
Source§impl MediaItemBase for Container
impl MediaItemBase for Container
Source§fn into_media_item(self) -> MediaItemwhere
Self: Sized,
fn into_media_item(self) -> MediaItemwhere
Self: Sized,
Convert this specific media item into the MediaItem enumeration.
Source§fn as_media_item_ref(&self) -> MediaItemRef<'_>
fn as_media_item_ref(&self) -> MediaItemRef<'_>
Retrieve a reference to this media item as a MediaItemRef.
Source§fn try_into_media_container(self) -> Result<MediaContainer, Self>where
Self: Sized,
fn try_into_media_container(self) -> Result<MediaContainer, Self>where
Self: Sized,
Attempt to convert this specific media item into the MediaContainer enumeration. Read more
Source§fn try_as_media_container_ref(&self) -> Option<MediaContainerRef<'_>>
fn try_as_media_container_ref(&self) -> Option<MediaContainerRef<'_>>
Attempt to retrieve a reference to this media item as a MediaContainerRef. Read more
Source§impl TryFrom<Container> for MediaContainer
impl TryFrom<Container> for MediaContainer
Source§impl TryFrom<MediaContainer> for Container
impl TryFrom<MediaContainer> for Container
Source§type Error = TryFromMediaItemError
type Error = TryFromMediaItemError
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl Freeze for Container
impl RefUnwindSafe for Container
impl Send for Container
impl Sync for Container
impl Unpin for Container
impl UnsafeUnpin for Container
impl UnwindSafe for Container
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