[][src]Enum texture_synthesis::ImageSource

pub enum ImageSource<'a> {
    Memory(&'a [u8]),
    Path(&'a Path),
    Image(DynamicImage),
}

Helper type used to define the source of ImageSource's data

Variants

Memory(&'a [u8])

A raw buffer of image data, see image::load_from_memory for details on what is supported

Path(&'a Path)

The path to an image to load from disk. The image format is inferred from the file extension, see image::open for details

An already loaded image that is passed directly to the generator

Methods

impl<'a> ImageSource<'a>[src]

pub fn from_path(path: &'a Path) -> Self[src]

Trait Implementations

impl<'a> From<DynamicImage> for ImageSource<'a>[src]

impl<'a, S> From<&'a S> for ImageSource<'a> where
    S: AsRef<Path> + 'a, 
[src]

impl<'a> Clone for ImageSource<'a>[src]

Auto Trait Implementations

impl<'a> Send for ImageSource<'a>

impl<'a> Sync for ImageSource<'a>

impl<'a> Unpin for ImageSource<'a>

impl<'a> UnwindSafe for ImageSource<'a>

impl<'a> RefUnwindSafe for ImageSource<'a>

Blanket Implementations

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

impl<T> From<T> for 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<V, T> VZip<V> for T where
    V: MultiLane<T>,