pub struct ImageEmbedding {
pub values: Vec<u8>,
}Fields§
§values: Vec<u8>Implementations§
Source§impl ImageEmbedding
impl ImageEmbedding
pub fn ideal_image_size(_w: usize, _h: usize) -> (usize, usize)
Sourcepub fn encode(image: ColorImage) -> Self
pub fn encode(image: ColorImage) -> Self
Compute image embedding.
Only accepts image of ideal_image_size.
Sourcepub fn decode(&self) -> ColorImage
pub fn decode(&self) -> ColorImage
Reconstruct original input image
pub fn values_1st(&self) -> [u8; 12]
pub fn values_2nd(&self) -> &[u8] ⓘ
pub fn load(values: Vec<u8>) -> ImageEmbedding
Auto Trait Implementations§
impl Freeze for ImageEmbedding
impl RefUnwindSafe for ImageEmbedding
impl Send for ImageEmbedding
impl Sync for ImageEmbedding
impl Unpin for ImageEmbedding
impl UnwindSafe for ImageEmbedding
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more