pub struct Directory {
pub location: ResourceLocation,
pub entries: Arc<[DirectoryEntry]>,
pub visible: Arc<[usize]>,
pub filter: String,
pub summary: String,
pub state: ListingState,
pub stale: Option<String>,
pub view_revision: BufferRevision,
pub marked: OrdMap<EntryName, Observation>,
pub connection: Option<ConnectionLease>,
pub return_to: Option<JumpRecord>,
pub draft: Option<Draft>,
/* private fields */
}Fields§
§location: ResourceLocation§entries: Arc<[DirectoryEntry]>§visible: Arc<[usize]>§filter: String§summary: String§state: ListingState§stale: Option<String>§view_revision: BufferRevision§marked: OrdMap<EntryName, Observation>§connection: Option<ConnectionLease>§return_to: Option<JumpRecord>§draft: Option<Draft>Implementations§
Source§impl Directory
impl Directory
pub fn from_listing(listed: ListedDirectory) -> Self
pub fn new(snapshot: DirectorySnapshot) -> Self
Sourcepub fn text(&self) -> String
pub fn text(&self) -> String
Worker-side projection. Filenames are escaped for display, never decoded back into resources by navigation, marks or operation admission.
pub fn parent(&self) -> Option<ResourceLocation>
pub fn entry(&self, line: LineIndex) -> Option<&DirectoryEntry>
pub fn entry_location(&self, line: LineIndex) -> Option<ResourceLocation>
pub fn location_of(&self, entry: &DirectoryEntry) -> ResourceLocation
pub fn line_for(&self, location: &ResourceLocation) -> Option<LineIndex>
pub fn toggle_mark(&mut self, line: LineIndex) -> bool
pub fn validate(&self) -> bool
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Directory
impl<'de> Deserialize<'de> for Directory
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
Auto Trait Implementations§
impl !RefUnwindSafe for Directory
impl !UnwindSafe for Directory
impl Freeze for Directory
impl Send for Directory
impl Sync for Directory
impl Unpin for Directory
impl UnsafeUnpin for Directory
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