[][src]Struct mygpoclient::episode::EpisodeAction

pub struct EpisodeAction {
    pub podcast: Url,
    pub episode: Url,
    pub device: Option<String>,
    pub action: EpisodeActionType,
    pub timestamp: Option<NaiveDateTime>,
}

Episode-related event

Fields

podcast: Url

feed URL to the podcast feed the episode belongs to

episode: Url

media URL of the episode

device: Option<String>

device ID on which the action has taken place

action: EpisodeActionTypetimestamp: Option<NaiveDateTime>

UTC timestamp when the action took place

Implementations

impl EpisodeAction[src]

pub fn new_download(
    podcast: Url,
    episode: Url,
    timestamp: Option<NaiveDateTime>
) -> EpisodeAction
[src]

Create new Download event, so that other clients know where a file has already been downloaded.

pub fn new_delete(
    podcast: Url,
    episode: Url,
    timestamp: Option<NaiveDateTime>
) -> EpisodeAction
[src]

Create new Delete event so that other clients know where a previously downloaded file has been deleted.

pub fn new_new(
    podcast: Url,
    episode: Url,
    timestamp: Option<NaiveDateTime>
) -> EpisodeAction
[src]

Create new New event, to reset previous events. This state needs to be interpreted by receiving clients and does not delete any information on the webservice.

pub fn new_play_stop(
    podcast: Url,
    episode: Url,
    timestamp: Option<NaiveDateTime>,
    position: u32
) -> EpisodeAction
[src]

Create new Play event with position information (in seconds) so that other clients know where to start playback.

pub fn new_play(
    podcast: Url,
    episode: Url,
    timestamp: Option<NaiveDateTime>,
    position: u32,
    started: u32,
    total: u32
) -> EpisodeAction
[src]

Create new Play event with position, started and total information (in seconds) so that other clients know where to start playback.

Trait Implementations

impl Clone for EpisodeAction[src]

impl Debug for EpisodeAction[src]

impl<'de> Deserialize<'de> for EpisodeAction[src]

impl Eq for EpisodeAction[src]

impl Hash for EpisodeAction[src]

impl Ord for EpisodeAction[src]

impl PartialEq<EpisodeAction> for EpisodeAction[src]

impl PartialOrd<EpisodeAction> for EpisodeAction[src]

impl Serialize for EpisodeAction[src]

impl StructuralEq for EpisodeAction[src]

impl StructuralPartialEq for EpisodeAction[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.