pub struct Video { /* private fields */ }Expand description
Video message type. Automatic preview generation from video files is unsupported; set a preview
explicitly or the default placeholder is used. Your app can generate video previews by calling
the external ffmpeg process or similar.
Implementations§
Source§impl Video
impl Video
pub fn new(path: impl AsRef<Path>, duration: Duration) -> 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 Video
impl From<CryptoFile> for Video
Source§fn from(source: CryptoFile) -> Self
fn from(source: CryptoFile) -> Self
Converts to this type from the input type.
Source§impl MessageLike for Video
impl MessageLike for Video
type Kind = PreviewableKind
fn into_builder_parts(self) -> (ComposedMessage, PreviewableKind)
Auto Trait Implementations§
impl Freeze for Video
impl RefUnwindSafe for Video
impl Send for Video
impl Sync for Video
impl Unpin for Video
impl UnsafeUnpin for Video
impl UnwindSafe for Video
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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