Skip to main content

ReadonlySession

Trait ReadonlySession 

Source
pub trait ReadonlySession {
Show 15 methods // Required methods fn cwd(&self) -> &Path; fn session_id(&self) -> &str; fn session_file(&self) -> Option<&Path>; fn header(&self) -> &SessionHeader; fn session_name(&self) -> Option<String>; fn leaf_id(&self) -> Option<&EntryId>; fn entry(&self, id: &EntryId) -> Option<&SessionEntry>; fn children(&self, parent: Option<&EntryId>) -> Vec<&SessionEntry>; fn label(&self, id: &EntryId) -> Option<&str>; fn branch(&self, from: Option<&EntryId>) -> Vec<&SessionEntry>; fn entries(&self) -> &[SessionEntry]; fn tree(&self) -> Vec<SessionTreeNode>; fn build_context_entries(&self) -> Vec<SessionEntry>; fn build_session_projection(&self) -> SessionProjection; fn build_session_context(&self) -> SessionContext;
}
Expand description

Read-only view handed to extensions (extension-api §5.2).

Required Methods§

Source

fn cwd(&self) -> &Path

Session cwd.

Source

fn session_id(&self) -> &str

Session id.

Source

fn session_file(&self) -> Option<&Path>

Session file, when persisted.

Source

fn header(&self) -> &SessionHeader

Header.

Source

fn session_name(&self) -> Option<String>

Latest session name.

Source

fn leaf_id(&self) -> Option<&EntryId>

Current leaf.

Source

fn entry(&self, id: &EntryId) -> Option<&SessionEntry>

Entry by id.

Source

fn children(&self, parent: Option<&EntryId>) -> Vec<&SessionEntry>

Children in file order.

Source

fn label(&self, id: &EntryId) -> Option<&str>

Current label of an entry.

Source

fn branch(&self, from: Option<&EntryId>) -> Vec<&SessionEntry>

Root → from (default leaf).

Source

fn entries(&self) -> &[SessionEntry]

All entries in file order.

Source

fn tree(&self) -> Vec<SessionTreeNode>

Tree view.

Source

fn build_context_entries(&self) -> Vec<SessionEntry>

Context-selected entries at the leaf.

Source

fn build_session_projection(&self) -> SessionProjection

Projection at the leaf.

Source

fn build_session_context(&self) -> SessionContext

Context at the leaf.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§