pub struct CreateFileOptions {
pub path: String,
pub size: u64,
pub isdir: i32,
pub block_list: Vec<String>,
pub uploadid: String,
pub rtype: i32,
pub local_ctime: Option<u64>,
pub local_mtime: Option<u64>,
}Expand description
Options for creating final file on server
Fields§
§path: StringRemote file path on Baidu NetDisk
size: u64File size in bytes
isdir: i32Is directory (0 for file, 1 for directory)
block_list: Vec<String>List of block MD5s
uploadid: StringUpload session ID from precreate
rtype: i32Conflict resolution type (1=overwrite, 2=rename, 3=new copy)
local_ctime: Option<u64>Optional local creation time (timestamp)
local_mtime: Option<u64>Optional local modification time (timestamp)
Implementations§
Source§impl CreateFileOptions
impl CreateFileOptions
Sourcepub fn new(
path: &str,
size: u64,
block_list: Vec<String>,
uploadid: &str,
) -> Self
pub fn new( path: &str, size: u64, block_list: Vec<String>, uploadid: &str, ) -> Self
Create new CreateFileOptions with basic required fields
Sourcepub fn rtype(self, rtype: i32) -> Self
pub fn rtype(self, rtype: i32) -> Self
Set conflict resolution type (1=overwrite, 2=rename, 3=new copy)
Sourcepub fn local_ctime(self, ctime: u64) -> Self
pub fn local_ctime(self, ctime: u64) -> Self
Set local creation time (timestamp)
Sourcepub fn local_mtime(self, mtime: u64) -> Self
pub fn local_mtime(self, mtime: u64) -> Self
Set local modification time (timestamp)
Trait Implementations§
Source§impl Clone for CreateFileOptions
impl Clone for CreateFileOptions
Source§fn clone(&self) -> CreateFileOptions
fn clone(&self) -> CreateFileOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CreateFileOptions
impl Debug for CreateFileOptions
Source§impl Default for CreateFileOptions
impl Default for CreateFileOptions
Source§fn default() -> CreateFileOptions
fn default() -> CreateFileOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CreateFileOptions
impl RefUnwindSafe for CreateFileOptions
impl Send for CreateFileOptions
impl Sync for CreateFileOptions
impl Unpin for CreateFileOptions
impl UnsafeUnpin for CreateFileOptions
impl UnwindSafe for CreateFileOptions
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