pub struct DirectoryEntry {
pub name: String,
pub kind: String,
pub size: u64,
}Expand description
One entry of a AgentRequest::ListDirectory result.
Deliberately small: a name, what it is, and a size. A caller discovering a tree wants to know where to recurse and what is worth downloading, and anything richer invites the listing being used as a stat cache.
Fields§
§name: StringEntry name, not a path: no separators, relative to the directory listed.
kind: String"file", "dir", "symlink", or "other" for sockets, devices and
fifos, which a caller can see but should not try to download.
size: u64Size in bytes. Zero for anything that is not a regular file.
Trait Implementations§
Source§impl Clone for DirectoryEntry
impl Clone for DirectoryEntry
Source§impl Debug for DirectoryEntry
impl Debug for DirectoryEntry
Source§impl<'de> Deserialize<'de> for DirectoryEntry
impl<'de> Deserialize<'de> for DirectoryEntry
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for DirectoryEntry
Source§impl PartialEq for DirectoryEntry
impl PartialEq for DirectoryEntry
Source§impl Serialize for DirectoryEntry
impl Serialize for DirectoryEntry
impl StructuralPartialEq for DirectoryEntry
Auto Trait Implementations§
impl Freeze for DirectoryEntry
impl RefUnwindSafe for DirectoryEntry
impl Send for DirectoryEntry
impl Sync for DirectoryEntry
impl Unpin for DirectoryEntry
impl UnsafeUnpin for DirectoryEntry
impl UnwindSafe for DirectoryEntry
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