Skip to main content

ResourceContainer

Trait ResourceContainer 

Source
pub trait ResourceContainer {
    type ItemType;

    // Required methods
    fn total(&self) -> u32;
    fn items(self) -> Vec<Self::ItemType>;
}
Expand description

Trait for containers that hold Last.fm resources (tracks, artists, etc.)

Required Associated Types§

Source

type ItemType

The type of items contained in this resource

Required Methods§

Source

fn total(&self) -> u32

Get the total number of items available

Source

fn items(self) -> Vec<Self::ItemType>

Extract the items from this container

Implementors§