pub struct FileAttrs { /* private fields */ }
Implementations
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>
pub fn get_filetype(&self) -> Option<FileType>
pub fn get_filetype(&self) -> Option<FileType>
filetype is only set by the sftp-server.
pub fn get_time(&self) -> Option<(UnixTimeStamp, UnixTimeStamp)>
pub fn get_time(&self) -> Option<(UnixTimeStamp, UnixTimeStamp)>
Return atime and mtime
Trait Implementations
impl<'de> Deserialize<'de> for FileAttrs
impl<'de> Deserialize<'de> for FileAttrs
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
impl Serialize for FileAttrs
impl Serialize for FileAttrs
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 RefUnwindSafe for FileAttrs
impl Send for FileAttrs
impl Sync for FileAttrs
impl Unpin for FileAttrs
impl UnwindSafe for FileAttrs
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more