Enum show_image::Image[][src]

pub enum Image {
    Box(BoxImage),
    Arc(ArcImage),
    BoxDyn(Box<dyn AsImageView + Send>),
    ArcDyn(Arc<dyn AsImageView + Sync + Send>),
    Invalid(ImageDataError),
}

Owning image that can be sent to another thread.

The image is backed by either a Box or Arc. It can either directly own the data or through a [dyn AsImageView].

Variants

An image backed by a Box<[u8]>.

An image backed by an Arc<[u8]>.

BoxDyn(Box<dyn AsImageView + Send>)

An image backed by a Box<dyn AsImageView>.

ArcDyn(Arc<dyn AsImageView + Sync + Send>)

An image backed by an Arc<dyn AsImageView>.

An invalid image that will always fail the conversion to ImageView.

Implementations

impl Image[src]

pub fn as_image_view(&self) -> Result<ImageView<'_>, ImageDataError>[src]

Get a non-owning view of the image data.

Trait Implementations

impl AsImageView for Image[src]

impl Clone for Image[src]

impl From<&'_ DrawTarget> for Image[src]

This is supported on crate feature raqote only.

impl From<&'_ ImageView<'_>> for Image[src]

impl<T> From<Arc<T>> for Image where
    T: AsImageView + Send + Sync + 'static, 
[src]

impl From<Arc<dyn AsImageView + 'static + Send + Sync>> for Image[src]

impl From<ArcImage> for Image[src]

impl<T> From<Box<T, Global>> for Image where
    T: AsImageView + Send + 'static, 
[src]

impl From<Box<dyn AsImageView + 'static + Send, Global>> for Image[src]

impl From<BoxImage> for Image[src]

impl From<DrawTarget> for Image[src]

This is supported on crate feature raqote only.

impl From<DynamicImage> for Image[src]

This is supported on crate feature image only.

impl From<Image<'_>> for Image[src]

This is supported on crate feature raqote only.

impl<P> From<ImageBuffer<P, Vec<u8, Global>>> for Image where
    P: Pixel<Subpixel = u8> + 'static, 
[src]

This is supported on crate feature image only.

impl From<ImageView<'_>> for Image[src]

impl<'a> From<Result<TensorImage<'a>, ImageDataError>> for Image[src]

This is supported on crate feature tch only.

impl<'a> From<TensorImage<'a>> for Image[src]

This is supported on crate feature tch only.

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> From<T> for T[src]

impl<T> Instrument for T[src]

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

impl<T> Pointable for T

type Init = T

The type for initializers.

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