pub struct Image { /* private fields */ }Expand description
Image message type. With the multimedia feature, auto-transcodes the source file into a
thumbnail on resolve when no explicit preview is set. Without it, the gray placeholder is used.
With native_crypto feature can auto-transcode thumbnails even from the encrypted source files
Implementations§
Source§impl Image
impl Image
pub fn new(path: impl AsRef<Path>) -> Self
pub fn with_caption(self, caption: impl Into<String>) -> Self
pub fn with_preview(self, preview: ImagePreview) -> Self
pub fn with_crypto_args(self, args: CryptoFileArgs) -> Self
Trait Implementations§
Source§impl From<CryptoFile> for Image
impl From<CryptoFile> for Image
Source§fn from(source: CryptoFile) -> Self
fn from(source: CryptoFile) -> Self
Converts to this type from the input type.
Source§impl MessageLike for Image
impl MessageLike for Image
type Kind = PreviewableKind
fn into_builder_parts(self) -> (ComposedMessage, PreviewableKind)
Auto Trait Implementations§
impl Freeze for Image
impl RefUnwindSafe for Image
impl Send for Image
impl Sync for Image
impl Unpin for Image
impl UnsafeUnpin 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