pub struct SharedFile { /* private fields */ }Expand description
A file attachment in a share payload.
Implementations§
Sourcepub fn from_path<P: AsRef<Path>>(path: P) -> Self
pub fn from_path<P: AsRef<Path>>(path: P) -> Self
Creates a file attachment from a filesystem path.
Sourcepub fn from_uri(uri: impl Into<String>) -> Self
pub fn from_uri(uri: impl Into<String>) -> Self
Creates a file attachment from a platform file/content URI.
Sourcepub fn set_mime_type(self, mime_type: impl Into<String>) -> Self
pub fn set_mime_type(self, mime_type: impl Into<String>) -> Self
Sets an explicit MIME type hint for this file attachment.
Trait Implementations§
Auto Trait Implementations§
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