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§
source§impl 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§
source§impl AsImageView for Image
impl AsImageView for Image
source§fn as_image_view(&self) -> Result<ImageView<'_>, ImageDataError>
fn as_image_view(&self) -> Result<ImageView<'_>, ImageDataError>
Get an image view for the object.
source§impl From<&DrawTarget> for Image
Available on crate feature raqote
only.
impl From<&DrawTarget> for Image
Available on crate feature
raqote
only.source§fn from(other: &DrawTarget) -> Self
fn from(other: &DrawTarget) -> Self
Converts to this type from the input type.
source§impl From<DrawTarget> for Image
Available on crate feature raqote
only.
impl From<DrawTarget> for Image
Available on crate feature
raqote
only.source§fn from(other: DrawTarget) -> Self
fn from(other: DrawTarget) -> Self
Converts to this type from the input type.
source§impl From<DynamicImage> for Image
Available on crate feature image
only.
impl From<DynamicImage> for Image
Available on crate feature
image
only.source§fn from(other: DynamicImage) -> Self
fn from(other: DynamicImage) -> Self
Converts to this type from the input type.
source§impl<P, Container> From<ImageBuffer<P, Container>> for Image
Available on crate feature image
only.
impl<P, Container> From<ImageBuffer<P, Container>> for Image
Available on crate feature
image
only.source§fn from(other: ImageBuffer<P, Container>) -> Self
fn from(other: ImageBuffer<P, Container>) -> Self
Converts to this type from the input type.
source§impl<'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.source§fn from(other: Result<TensorImage<'a>, ImageDataError>) -> Self
fn from(other: Result<TensorImage<'a>, ImageDataError>) -> Self
Converts to this type from the input type.
source§impl<'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.source§fn from(other: TensorImage<'a>) -> Self
fn from(other: TensorImage<'a>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Image
impl !RefUnwindSafe for Image
impl Send for Image
impl !Sync for Image
impl Unpin for Image
impl !UnwindSafe for Image
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more