Struct openssh_sftp_protocol::file_attrs::FileAttrs
source · [−]pub struct FileAttrs { /* private fields */ }
Implementations
sourceimpl FileAttrs
impl FileAttrs
pub const fn new() -> Self
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
sourceimpl<'de> Deserialize<'de> for FileAttrs
impl<'de> Deserialize<'de> for FileAttrs
sourcefn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. 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 T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more