pub struct FileOutput {
pub url: String,
pub filename: Option<String>,
pub content_type: Option<String>,
pub size: Option<u64>,
}
Expand description
Represents a file output from a model.
Fields§
§url: String
The URL to download the file
filename: Option<String>
Optional filename
content_type: Option<String>
Optional content type
size: Option<u64>
Optional file size in bytes
Implementations§
Source§impl FileOutput
impl FileOutput
Sourcepub fn with_filename(self, filename: impl Into<String>) -> Self
pub fn with_filename(self, filename: impl Into<String>) -> Self
Set the filename
Sourcepub fn with_content_type(self, content_type: impl Into<String>) -> Self
pub fn with_content_type(self, content_type: impl Into<String>) -> Self
Set the content type
Trait Implementations§
Source§impl Clone for FileOutput
impl Clone for FileOutput
Source§fn clone(&self) -> FileOutput
fn clone(&self) -> FileOutput
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for FileOutput
impl Debug for FileOutput
Source§impl<'de> Deserialize<'de> for FileOutput
impl<'de> Deserialize<'de> for FileOutput
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&str> for FileOutput
impl From<&str> for FileOutput
Source§impl From<String> for FileOutput
impl From<String> for FileOutput
Auto Trait Implementations§
impl Freeze for FileOutput
impl RefUnwindSafe for FileOutput
impl Send for FileOutput
impl Sync for FileOutput
impl Unpin for FileOutput
impl UnwindSafe for FileOutput
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