Enum show_image::Image
source · [−]pub enum Image {
Box(BoxImage),
Arc(ArcImage),
BoxDyn(Box<dyn AsImageView + Send>),
ArcDyn(Arc<dyn AsImageView + Sync + Send>),
Invalid(ImageDataError),
}
Expand description
Variants
Box(BoxImage)
An image backed by a Box<[u8]>
.
Arc(ArcImage)
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>
.
Invalid(ImageDataError)
An invalid image that will always fail the conversion to ImageView
.
Implementations
sourceimpl Image
impl Image
sourcepub fn as_image_view(&self) -> Result<ImageView<'_>, ImageDataError>
pub fn as_image_view(&self) -> Result<ImageView<'_>, ImageDataError>
Get a non-owning view of the image data.
Trait Implementations
sourceimpl AsImageView for Image
impl AsImageView for Image
sourcefn as_image_view(&self) -> Result<ImageView<'_>, ImageDataError>
fn as_image_view(&self) -> Result<ImageView<'_>, ImageDataError>
Get an image view for the object.
sourceimpl From<&'_ DrawTarget> for Image
Available on crate feature raqote
only.
impl From<&'_ DrawTarget> for Image
Available on crate feature
raqote
only.sourcefn from(other: &DrawTarget) -> Self
fn from(other: &DrawTarget) -> Self
Converts to this type from the input type.
sourceimpl From<Box<dyn AsImageView + Send + 'static, Global>> for Image
impl From<Box<dyn AsImageView + Send + 'static, Global>> for Image
sourcefn from(other: Box<dyn AsImageView + Send>) -> Self
fn from(other: Box<dyn AsImageView + Send>) -> Self
Converts to this type from the input type.
sourceimpl From<DrawTarget> for Image
Available on crate feature raqote
only.
impl From<DrawTarget> for Image
Available on crate feature
raqote
only.sourcefn from(other: DrawTarget) -> Self
fn from(other: DrawTarget) -> Self
Converts to this type from the input type.
sourceimpl From<DynamicImage> for Image
Available on crate feature image
only.
impl From<DynamicImage> for Image
Available on crate feature
image
only.sourcefn from(other: DynamicImage) -> Self
fn from(other: DynamicImage) -> Self
Converts to this type from the input type.
sourceimpl<P, Container> From<ImageBuffer<P, Container>> for Image where
P: Pixel<Subpixel = u8> + PixelWithColorType,
Container: Deref<Target = [u8]>,
Available on crate feature image
only.
impl<P, Container> From<ImageBuffer<P, Container>> for Image where
P: Pixel<Subpixel = u8> + PixelWithColorType,
Container: Deref<Target = [u8]>,
Available on crate feature
image
only.sourcefn from(other: ImageBuffer<P, Container>) -> Self
fn from(other: ImageBuffer<P, Container>) -> Self
Converts to this type from the input type.
sourceimpl<'a> From<Result<TensorImage<'a>, ImageDataError>> for Image
Available on crate feature tch
only.
impl<'a> From<Result<TensorImage<'a>, ImageDataError>> for Image
Available on crate feature
tch
only.sourcefn from(other: Result<TensorImage<'a>, ImageDataError>) -> Self
fn from(other: Result<TensorImage<'a>, ImageDataError>) -> Self
Converts to this type from the input type.
sourceimpl<'a> From<TensorImage<'a>> for Image
Available on crate feature tch
only.
impl<'a> From<TensorImage<'a>> for Image
Available on crate feature
tch
only.sourcefn from(other: TensorImage<'a>) -> Self
fn from(other: TensorImage<'a>) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl !RefUnwindSafe for Image
impl Send for Image
impl !Sync for Image
impl Unpin for Image
impl !UnwindSafe for Image
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more