pub struct LiveRegistry {
pub module_id_to_file_id: HashMap<LiveModuleId, LiveFileId>,
pub live_files: Vec<LiveFile>,
pub live_type_infos: HashMap<LiveType, LiveTypeInfo>,
pub main_module: Option<(LiveModuleId, LiveId)>,
pub components: LiveComponentRegistries,
pub package_root: Option<String>,
/* private fields */
}
Fields§
§module_id_to_file_id: HashMap<LiveModuleId, LiveFileId>
§live_files: Vec<LiveFile>
§live_type_infos: HashMap<LiveType, LiveTypeInfo>
§main_module: Option<(LiveModuleId, LiveId)>
§components: LiveComponentRegistries
§package_root: Option<String>
Implementations§
Source§impl LiveRegistry
impl LiveRegistry
pub fn generation_valid(&self, live_ptr: LivePtr) -> bool
pub fn ptr_to_node(&self, live_ptr: LivePtr) -> &LiveNode
pub fn file_name_to_file_id(&self, file_name: &str) -> Option<LiveFileId>
pub fn file_id_to_file_name(&self, file_id: LiveFileId) -> &str
pub fn file_id_to_cargo_manifest_path(&self, file_id: LiveFileId) -> String
pub fn crate_name_to_cargo_manifest_path( &self, crate_name: &str, ) -> Option<String>
pub fn ptr_to_doc_node(&self, live_ptr: LivePtr) -> (&LiveExpanded, &LiveNode)
pub fn ptr_to_doc(&self, live_ptr: LivePtr) -> &LiveExpanded
pub fn file_id_to_file(&self, file_id: LiveFileId) -> &LiveFile
pub fn file_id_to_file_mut(&mut self, file_id: LiveFileId) -> &mut LiveFile
pub fn file_id_index_to_live_ptr( &self, file_id: LiveFileId, index: usize, ) -> LivePtr
pub fn ptr_to_nodes_index(&self, live_ptr: LivePtr) -> (&[LiveNode], usize)
pub fn path_str_to_file_id(&self, path: &str) -> Option<LiveFileId>
pub fn token_id_to_origin_doc(&self, token_id: LiveTokenId) -> &LiveOriginal
pub fn token_id_to_token(&self, token_id: LiveTokenId) -> &TokenWithSpan
pub fn token_id_to_expanded_doc(&self, token_id: LiveTokenId) -> &LiveExpanded
pub fn module_id_to_file_id( &self, module_id: LiveModuleId, ) -> Option<LiveFileId>
pub fn file_id_to_module_id(&self, file_id: LiveFileId) -> Option<LiveModuleId>
pub fn live_node_as_string(&self, node: &LiveNode) -> Option<String>
pub fn get_node_prefix(&self, origin: LiveNodeOrigin) -> Option<LiveId>
pub fn module_id_to_expanded_nodes( &self, module_id: LiveModuleId, ) -> Option<&[LiveNode]>
pub fn module_id_and_name_to_ptr( &self, module_id: LiveModuleId, name: LiveId, ) -> Option<LivePtr>
pub fn find_module_id_name( &self, item: LiveId, module_id: LiveModuleId, ) -> Option<LiveScopeTarget>
pub fn find_scope_target( &self, item: LiveId, nodes: &[LiveNode], ) -> Option<LiveScopeTarget>
pub fn find_scope_target_one_level_or_global( &self, item: LiveId, index: usize, nodes: &[LiveNode], ) -> Option<LiveScopeTarget>
pub fn find_scope_ptr_via_expand_index( &self, file_id: LiveFileId, index: usize, item: LiveId, ) -> Option<LivePtr>
pub fn live_error_to_live_file_error( &self, live_error: LiveError, ) -> LiveFileError
pub fn token_id_to_span(&self, token_id: LiveTokenId) -> TextSpan
pub fn tokenize_from_str( source: &str, start_pos: TextPos, file_id: LiveFileId, ) -> Result<Vec<TokenWithSpan>, LiveError>
pub fn tokenize_from_str_live_design( source: &str, start_pos: TextPos, file_id: LiveFileId, negative: Option<&mut Vec<TokenWithLen>>, ) -> Result<Vec<TokenWithSpan>, LiveError>
pub fn process_file_changes( &mut self, changes: Vec<LiveFileChange>, errors: &mut Vec<LiveError>, )
pub fn register_live_file( &mut self, file_name: &str, cargo_manifest_path: &str, own_module_id: LiveModuleId, source: String, live_type_infos: Vec<LiveTypeInfo>, start_pos: TextPos, ) -> Result<LiveFileId, LiveFileError>
pub fn expand_all_documents(&mut self, errors: &mut Vec<LiveError>)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LiveRegistry
impl !RefUnwindSafe for LiveRegistry
impl !Send for LiveRegistry
impl !Sync for LiveRegistry
impl Unpin for LiveRegistry
impl !UnwindSafe for LiveRegistry
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