pub struct ImageInput { /* private fields */ }Expand description
One image attached to an Item.
Implementations§
Source§impl ImageInput
impl ImageInput
Sourcepub fn bytes(data: impl Into<Vec<u8>>) -> Self
pub fn bytes(data: impl Into<Vec<u8>>) -> Self
An image that is already encoded. The format is detected from its magic bytes.
Sourcepub fn path(path: impl Into<PathBuf>) -> Self
pub fn path(path: impl Into<PathBuf>) -> Self
An encoded image read from disk when the request is sent.
Sourcepub fn decoded(image: DynamicImage) -> Self
pub fn decoded(image: DynamicImage) -> Self
Decoded pixels, re-encoded as JPEG when the request is sent.
Trait Implementations§
Source§impl Clone for ImageInput
impl Clone for ImageInput
Source§fn clone(&self) -> ImageInput
fn clone(&self) -> ImageInput
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ImageInput
impl Debug for ImageInput
Source§impl PartialEq for ImageInput
impl PartialEq for ImageInput
impl StructuralPartialEq for ImageInput
Auto Trait Implementations§
impl Freeze for ImageInput
impl RefUnwindSafe for ImageInput
impl Send for ImageInput
impl Sync for ImageInput
impl Unpin for ImageInput
impl UnsafeUnpin for ImageInput
impl UnwindSafe for ImageInput
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