pub struct FileUpload<'a, 'b> {
pub off: u64,
pub data: &'a [u8],
pub name: &'b str,
pub len: Option<u64>,
}Expand description
File Upload command
Fields§
§off: u64offset to start/continue upload at
data: &'a [u8]chunk of data to write to the file
name: &'b strabsolute path to a file
len: Option<u64>length of file, this field is only mandatory when “off” is 0
Trait Implementations§
Source§impl<'a, 'b> Clone for FileUpload<'a, 'b>
impl<'a, 'b> Clone for FileUpload<'a, 'b>
Source§fn clone(&self) -> FileUpload<'a, 'b>
fn clone(&self) -> FileUpload<'a, 'b>
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<'a, 'b> Debug for FileUpload<'a, 'b>
impl<'a, 'b> Debug for FileUpload<'a, 'b>
Source§impl McuMgrCommand for FileUpload<'_, '_>
impl McuMgrCommand for FileUpload<'_, '_>
Source§type Payload = FileUpload<'_, '_>
type Payload = FileUpload<'_, '_>
the data payload type
Source§type Response = FileUploadResponse
type Response = FileUploadResponse
the response type of the command
Source§fn is_write_operation(&self) -> bool
fn is_write_operation(&self) -> bool
whether this command is a read or write operation
Source§fn command_id(&self) -> u8
fn command_id(&self) -> u8
the command ID
Source§impl<'a, 'b> PartialEq for FileUpload<'a, 'b>
impl<'a, 'b> PartialEq for FileUpload<'a, 'b>
Source§fn eq(&self, other: &FileUpload<'a, 'b>) -> bool
fn eq(&self, other: &FileUpload<'a, 'b>) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl<'a, 'b> Serialize for FileUpload<'a, 'b>
impl<'a, 'b> Serialize for FileUpload<'a, 'b>
impl<'a, 'b> Eq for FileUpload<'a, 'b>
impl<'a, 'b> StructuralPartialEq for FileUpload<'a, 'b>
Auto Trait Implementations§
impl<'a, 'b> Freeze for FileUpload<'a, 'b>
impl<'a, 'b> RefUnwindSafe for FileUpload<'a, 'b>
impl<'a, 'b> Send for FileUpload<'a, 'b>
impl<'a, 'b> Sync for FileUpload<'a, 'b>
impl<'a, 'b> Unpin for FileUpload<'a, 'b>
impl<'a, 'b> UnsafeUnpin for FileUpload<'a, 'b>
impl<'a, 'b> UnwindSafe for FileUpload<'a, 'b>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more