[][src]Enum livesplit_core::CachedImageId

pub enum CachedImageId {
    Uncached,
    NoImage,
    Image(usize),
}

With a Cached Image ID you can track image changes. It starts with an uncached state and then gets updated with the images provided to it. It can be reset at any point in order to force a change to be detected.

Variants

Uncached

The initial uncached state.

NoImage

The last image observed either was missing or contained no data.

Image(usize)

The last image had actual data and the ID stored here.

Methods

impl CachedImageId[src]

pub fn update_with<'i>(&mut self, image: Option<&'i Image>) -> Option<&'i str>[src]

Updates the cached image ID based on the optional image provided to this method. If a change is observed the Data URL representing the image's data is returned. An empty string is returned when a transition to no image or no image data is observed.

pub fn reset(&mut self)[src]

Resets the state of the cached image ID to uncached.

Trait Implementations

impl Copy for CachedImageId[src]

impl PartialEq<CachedImageId> for CachedImageId[src]

impl Clone for CachedImageId[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Default for CachedImageId[src]

Auto Trait Implementations

Blanket Implementations

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.

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

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

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

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
    D: AdaptFrom<S, Swp, Dwp, T>,
    Dwp: WhitePoint,
    Swp: WhitePoint,
    T: Component + Float
[src]

fn adapt_into(self) -> D[src]

Convert the source color to the destination color using the bradford method by default Read more

impl<T> SetParameter for T

fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
    T: Parameter<Self>, 

Sets value as a parameter of self.