Struct makepad_live_compiler::live_registry::LiveRegistry
source · [−]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<LiveFileId>,
pub components: LiveComponentRegistries,
/* private fields */
}
Fields
module_id_to_file_id: HashMap<LiveModuleId, LiveFileId>
live_files: Vec<LiveFile>
live_type_infos: HashMap<LiveType, LiveTypeInfo>
main_module: Option<LiveFileId>
components: LiveComponentRegistries
Implementations
sourceimpl 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_id_to_file_name(&self, file_id: LiveFileId) -> &str
pub fn file_id_to_cargo_manifest_path(&self, file_id: LiveFileId) -> &str
pub fn crate_name_to_cargo_manifest_path(&self, crate_name: &str) -> Option<&str>
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_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 live_node_as_string(&self, node: &LiveNode) -> Option<String>
pub fn get_node_prefix(&self, origin: LiveNodeOrigin) -> Option<LiveId>
pub fn module_id_and_name_to_doc(
&self,
module_id: LiveModuleId,
name: LiveId
) -> Option<LiveDocNodes<'_>>
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_via_start(
&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>, Vec<char>), LiveError>
pub fn live_edit_file<'a, CB>(
&mut self,
file_name: &str,
range: TokenRange,
get_line: CB
) -> Result<Option<LiveEditEvent>, LiveError>where
CB: FnMut(usize) -> (&'a [char], &'a [TokenWithLen]),
pub fn process_next_originals_and_expand(
&mut self
) -> Result<(), 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 !RefUnwindSafe for LiveRegistry
impl !Send for LiveRegistry
impl !Sync for LiveRegistry
impl Unpin for LiveRegistry
impl !UnwindSafe for LiveRegistry
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more