Skip to main content

CodeGraphNavigatorSession

Struct CodeGraphNavigatorSession 

Source
pub struct CodeGraphNavigatorSession { /* private fields */ }

Implementations§

Source§

impl CodeGraphNavigatorSession

Source

pub fn new(graph: CodeGraphNavigator) -> CodeGraphNavigatorSession

Source

pub fn context(&self) -> &CodeGraphContextSession

Source

pub fn session_id(&self) -> &str

Source

pub fn parent_session_id(&self) -> Option<&str>

Source

pub fn mutation_log(&self) -> &[CodeGraphSessionMutation]

Source

pub fn event_log(&self) -> &[CodeGraphSessionEvent]

Source

pub fn subscribe<F>(&mut self, observer: F)
where F: Fn(&CodeGraphSessionEvent) + Send + Sync + 'static,

Source

pub fn selected_block_ids(&self) -> Vec<BlockId>

Source

pub fn summary(&self) -> CodeGraphContextSummary

Source

pub fn fork(&self) -> CodeGraphNavigatorSession

Source

pub fn seed_overview( &mut self, max_depth: Option<usize>, ) -> CodeGraphContextUpdate

Source

pub fn focus( &mut self, selector: Option<&str>, ) -> Result<CodeGraphContextUpdate, Error>

Source

pub fn select( &mut self, selector: &str, detail_level: CodeGraphDetailLevel, ) -> Result<CodeGraphContextUpdate, Error>

Source

pub fn expand( &mut self, selector: &str, mode: CodeGraphExpandMode, traversal: &CodeGraphTraversalConfig, ) -> Result<CodeGraphContextUpdate, Error>

Source

pub fn hydrate_source( &mut self, selector: &str, padding: usize, ) -> Result<CodeGraphContextUpdate, Error>

Source

pub fn hydrate_source_with_budget( &mut self, selector: &str, padding: usize, budget: Option<CodeGraphOperationBudget>, ) -> Result<CodeGraphContextUpdate, Error>

Source

pub fn collapse( &mut self, selector: &str, include_descendants: bool, ) -> Result<CodeGraphContextUpdate, Error>

Source

pub fn pin( &mut self, selector: &str, pinned: bool, ) -> Result<CodeGraphContextUpdate, Error>

Source

pub fn prune(&mut self, max_selected: Option<usize>) -> CodeGraphContextUpdate

Source

pub fn export( &self, render: &CodeGraphRenderConfig, export: &CodeGraphExportConfig, ) -> CodeGraphContextExport

Source

pub fn render_prompt(&self, render: &CodeGraphRenderConfig) -> String

Source

pub fn find_nodes( &self, query: &CodeGraphFindQuery, ) -> Result<Vec<CodeGraphNodeSummary>, Error>

Source

pub fn explain_selector( &self, selector: &str, ) -> CodeGraphSelectorResolutionExplanation

Source

pub fn why_selected( &self, selector: &str, ) -> Result<CodeGraphSelectionExplanation, Error>

Source

pub fn explain_export_omission( &self, selector: &str, render: &CodeGraphRenderConfig, export: &CodeGraphExportConfig, ) -> Result<CodeGraphExportOmissionExplanation, Error>

Source

pub fn why_pruned( &self, selector: &str, ) -> Result<CodeGraphPruneExplanation, Error>

Source

pub fn diff(&self, other: &CodeGraphNavigatorSession) -> CodeGraphSessionDiff

Source

pub fn recommendations(&self, top: usize) -> Vec<CodeGraphRecommendation>

Source

pub fn estimate_expand( &self, selector: &str, mode: CodeGraphExpandMode, traversal: &CodeGraphTraversalConfig, ) -> Result<CodeGraphMutationEstimate, Error>

Source

pub fn estimate_hydrate( &self, selector: &str, padding: usize, budget: Option<CodeGraphOperationBudget>, ) -> Result<CodeGraphMutationEstimate, Error>

Source

pub fn path_between( &self, start_selector: &str, end_selector: &str, max_hops: usize, ) -> Result<Option<CodeGraphPathResult>, Error>

Source

pub fn to_persisted(&self) -> Result<CodeGraphPersistedSession, Error>

Source

pub fn to_json(&self) -> Result<String, Error>

Source

pub fn save(&mut self, path: impl AsRef<Path>) -> Result<(), Error>

Trait Implementations§

Source§

impl Clone for CodeGraphNavigatorSession

Source§

fn clone(&self) -> CodeGraphNavigatorSession

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CodeGraphNavigatorSession

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more