pub struct FileAttrs { /* private fields */ }
Implementations§
Source§impl FileAttrs
impl FileAttrs
pub const fn new() -> FileAttrs
pub fn set_size(&mut self, size: u64)
pub fn set_id(&mut self, uid: u32, gid: u32)
pub fn set_permissions(&mut self, permissions: Permissions)
pub fn set_time(&mut self, atime: UnixTimeStamp, mtime: UnixTimeStamp)
pub fn get_size(&self) -> Option<u64>
pub fn get_permissions(&self) -> Option<Permissions>
Sourcepub fn get_filetype(&self) -> Option<FileType>
pub fn get_filetype(&self) -> Option<FileType>
filetype is only set by the sftp-server.
Sourcepub fn get_time(&self) -> Option<(UnixTimeStamp, UnixTimeStamp)>
pub fn get_time(&self) -> Option<(UnixTimeStamp, UnixTimeStamp)>
Return atime and mtime
Trait Implementations§
Source§impl<'de> Deserialize<'de> for FileAttrs
impl<'de> Deserialize<'de> for FileAttrs
Source§fn deserialize<D>(
deserializer: D,
) -> Result<FileAttrs, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<FileAttrs, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for FileAttrs
impl Serialize for FileAttrs
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Copy for FileAttrs
impl Eq for FileAttrs
Auto Trait Implementations§
impl Freeze for FileAttrs
impl RefUnwindSafe for FileAttrs
impl Send for FileAttrs
impl Sync for FileAttrs
impl Unpin for FileAttrs
impl UnwindSafe for FileAttrs
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)