#[non_exhaustive]pub struct FileInputSource {
pub mime_type: String,
pub content: Bytes,
pub display_name: String,
/* private fields */
}Expand description
An inlined file.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.mime_type: StringRequired. The file’s mime type.
content: BytesRequired. The file’s byte contents.
display_name: StringRequired. The file’s display name.
Implementations§
Source§impl FileInputSource
impl FileInputSource
pub fn new() -> Self
Sourcepub fn set_mime_type<T: Into<String>>(self, v: T) -> Self
pub fn set_mime_type<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_content<T: Into<Bytes>>(self, v: T) -> Self
pub fn set_content<T: Into<Bytes>>(self, v: T) -> Self
Sourcepub fn set_display_name<T: Into<String>>(self, v: T) -> Self
pub fn set_display_name<T: Into<String>>(self, v: T) -> Self
Sets the value of display_name.
§Example
ⓘ
let x = FileInputSource::new().set_display_name("example");Trait Implementations§
Source§impl Clone for FileInputSource
impl Clone for FileInputSource
Source§fn clone(&self) -> FileInputSource
fn clone(&self) -> FileInputSource
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 FileInputSource
impl Debug for FileInputSource
Source§impl Default for FileInputSource
impl Default for FileInputSource
Source§fn default() -> FileInputSource
fn default() -> FileInputSource
Returns the “default value” for a type. Read more
Source§impl Message for FileInputSource
impl Message for FileInputSource
Source§impl PartialEq for FileInputSource
impl PartialEq for FileInputSource
impl StructuralPartialEq for FileInputSource
Auto Trait Implementations§
impl !Freeze for FileInputSource
impl RefUnwindSafe for FileInputSource
impl Send for FileInputSource
impl Sync for FileInputSource
impl Unpin for FileInputSource
impl UnsafeUnpin for FileInputSource
impl UnwindSafe for FileInputSource
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