pub struct NewObjectInfo {
pub filename: String,
pub size: u64,
pub format: Option<ObjectFormatCode>,
pub modified: Option<DateTime>,
}Expand description
Information needed to create a new object.
Fields§
§filename: StringFilename (max 254 characters, no /, , or null bytes)
size: u64File size in bytes (must match actual data sent)
format: Option<ObjectFormatCode>Object format (auto-detected from extension if None)
modified: Option<DateTime>Modification time
Implementations§
Source§impl NewObjectInfo
impl NewObjectInfo
Sourcepub fn file(filename: impl Into<String>, size: u64) -> Self
pub fn file(filename: impl Into<String>, size: u64) -> Self
Create info for a file. Format auto-detected from extension.
Sourcepub fn with_format(
filename: impl Into<String>,
size: u64,
format: ObjectFormatCode,
) -> Self
pub fn with_format( filename: impl Into<String>, size: u64, format: ObjectFormatCode, ) -> Self
Create info with explicit format.
Sourcepub fn with_modified(self, modified: DateTime) -> Self
pub fn with_modified(self, modified: DateTime) -> Self
Set modification time.
Trait Implementations§
Source§impl Clone for NewObjectInfo
impl Clone for NewObjectInfo
Source§fn clone(&self) -> NewObjectInfo
fn clone(&self) -> NewObjectInfo
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 moreAuto Trait Implementations§
impl Freeze for NewObjectInfo
impl RefUnwindSafe for NewObjectInfo
impl Send for NewObjectInfo
impl Sync for NewObjectInfo
impl Unpin for NewObjectInfo
impl UnsafeUnpin for NewObjectInfo
impl UnwindSafe for NewObjectInfo
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