pub struct CodeGraphContextSession {
pub selected: HashMap<BlockId, CodeGraphContextNode>,
pub focus: Option<BlockId>,
pub prune_policy: CodeGraphPrunePolicy,
pub history: Vec<String>,
}Fields§
§selected: HashMap<BlockId, CodeGraphContextNode>§focus: Option<BlockId>§prune_policy: CodeGraphPrunePolicy§history: Vec<String>Implementations§
Source§impl CodeGraphContextSession
impl CodeGraphContextSession
pub fn new() -> CodeGraphContextSession
pub fn selected_block_ids(&self) -> Vec<BlockId>
pub fn summary(&self, doc: &Document) -> CodeGraphContextSummary
pub fn clear(&mut self)
pub fn set_prune_policy(&mut self, policy: CodeGraphPrunePolicy)
pub fn set_focus( &mut self, doc: &Document, block_id: Option<BlockId>, ) -> CodeGraphContextUpdate
pub fn select_block( &mut self, doc: &Document, block_id: BlockId, detail_level: CodeGraphDetailLevel, ) -> CodeGraphContextUpdate
pub fn remove_block(&mut self, block_id: BlockId) -> CodeGraphContextUpdate
pub fn pin(&mut self, block_id: BlockId, pinned: bool) -> CodeGraphContextUpdate
pub fn seed_overview(&mut self, doc: &Document) -> CodeGraphContextUpdate
pub fn seed_overview_with_depth( &mut self, doc: &Document, max_depth: Option<usize>, ) -> CodeGraphContextUpdate
pub fn expand_file( &mut self, doc: &Document, file_id: BlockId, ) -> CodeGraphContextUpdate
pub fn expand_file_with_depth( &mut self, doc: &Document, file_id: BlockId, depth: usize, ) -> CodeGraphContextUpdate
pub fn expand_file_with_config( &mut self, doc: &Document, file_id: BlockId, traversal: &CodeGraphTraversalConfig, ) -> CodeGraphContextUpdate
pub fn expand_dependencies( &mut self, doc: &Document, block_id: BlockId, relation_filter: Option<&str>, ) -> CodeGraphContextUpdate
pub fn expand_dependencies_with_filters( &mut self, doc: &Document, block_id: BlockId, relation_filters: Option<&HashSet<String>>, depth: usize, ) -> CodeGraphContextUpdate
pub fn expand_dependencies_with_config( &mut self, doc: &Document, block_id: BlockId, traversal: &CodeGraphTraversalConfig, ) -> CodeGraphContextUpdate
pub fn expand_dependents( &mut self, doc: &Document, block_id: BlockId, relation_filter: Option<&str>, ) -> CodeGraphContextUpdate
pub fn expand_dependents_with_filters( &mut self, doc: &Document, block_id: BlockId, relation_filters: Option<&HashSet<String>>, depth: usize, ) -> CodeGraphContextUpdate
pub fn expand_dependents_with_config( &mut self, doc: &Document, block_id: BlockId, traversal: &CodeGraphTraversalConfig, ) -> CodeGraphContextUpdate
pub fn collapse( &mut self, doc: &Document, block_id: BlockId, include_descendants: bool, ) -> CodeGraphContextUpdate
pub fn hydrate_source( &mut self, doc: &Document, block_id: BlockId, padding: usize, ) -> CodeGraphContextUpdate
pub fn hydrate_source_with_budget( &mut self, doc: &Document, block_id: BlockId, padding: usize, budget: Option<&CodeGraphOperationBudget>, ) -> CodeGraphContextUpdate
pub fn prune( &mut self, doc: &Document, max_selected: Option<usize>, ) -> CodeGraphContextUpdate
pub fn render_for_prompt( &self, doc: &Document, config: &CodeGraphRenderConfig, ) -> String
pub fn export( &self, doc: &Document, config: &CodeGraphRenderConfig, ) -> CodeGraphContextExport
pub fn export_with_config( &self, doc: &Document, config: &CodeGraphRenderConfig, export_config: &CodeGraphExportConfig, ) -> CodeGraphContextExport
Trait Implementations§
Source§impl Clone for CodeGraphContextSession
impl Clone for CodeGraphContextSession
Source§fn clone(&self) -> CodeGraphContextSession
fn clone(&self) -> CodeGraphContextSession
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CodeGraphContextSession
impl Debug for CodeGraphContextSession
Source§impl Default for CodeGraphContextSession
impl Default for CodeGraphContextSession
Source§fn default() -> CodeGraphContextSession
fn default() -> CodeGraphContextSession
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for CodeGraphContextSession
impl<'de> Deserialize<'de> for CodeGraphContextSession
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<CodeGraphContextSession, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CodeGraphContextSession, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for CodeGraphContextSession
impl Serialize for CodeGraphContextSession
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for CodeGraphContextSession
impl RefUnwindSafe for CodeGraphContextSession
impl Send for CodeGraphContextSession
impl Sync for CodeGraphContextSession
impl Unpin for CodeGraphContextSession
impl UnsafeUnpin for CodeGraphContextSession
impl UnwindSafe for CodeGraphContextSession
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