pub struct Attachment { /* private fields */ }Expand description
A file in an AttachmentStrip.
Implementations§
Source§impl Attachment
impl Attachment
Sourcepub fn size(self, bytes: u64) -> Self
pub fn size(self, bytes: u64) -> Self
Its size in bytes, which is shown in the units people read.
Sourcepub fn icon(self, icon: IconName) -> Self
pub fn icon(self, icon: IconName) -> Self
The icon before its name (IconName::File by default).
Sourcepub fn send_as(
self,
options: impl IntoIterator<Item = impl Into<String>>,
chosen: usize,
on_choose: impl Fn(usize) + 'static,
) -> Self
pub fn send_as( self, options: impl IntoIterator<Item = impl Into<String>>, chosen: usize, on_choose: impl Fn(usize) + 'static, ) -> Self
The ways this file can be sent, such as a photo or a document, with chosen selected.
on_choose gets the index of another one. With fewer than two there is nothing to
ask, and the row does not ask.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Attachment
impl !Send for Attachment
impl !Sync for Attachment
impl !UnwindSafe for Attachment
impl Freeze for Attachment
impl Unpin for Attachment
impl UnsafeUnpin for Attachment
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