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

source

pub fn generation_valid(&self, live_ptr: LivePtr) -> bool

source

pub fn ptr_to_node(&self, live_ptr: LivePtr) -> &LiveNode

source

pub fn file_name_to_file_id(&self, file_name: &str) -> Option<LiveFileId>

source

pub fn file_id_to_file_name(&self, file_id: LiveFileId) -> &str

source

pub fn file_id_to_cargo_manifest_path(&self, file_id: LiveFileId) -> String

source

pub fn crate_name_to_cargo_manifest_path( &self, crate_name: &str ) -> Option<String>

source

pub fn ptr_to_doc_node(&self, live_ptr: LivePtr) -> (&LiveExpanded, &LiveNode)

source

pub fn ptr_to_doc(&self, live_ptr: LivePtr) -> &LiveExpanded

source

pub fn file_id_to_file(&self, file_id: LiveFileId) -> &LiveFile

source

pub fn file_id_to_file_mut(&mut self, file_id: LiveFileId) -> &mut LiveFile

source

pub fn file_id_index_to_live_ptr( &self, file_id: LiveFileId, index: usize ) -> LivePtr

source

pub fn ptr_to_nodes_index(&self, live_ptr: LivePtr) -> (&[LiveNode], usize)

source

pub fn path_str_to_file_id(&self, path: &str) -> Option<LiveFileId>

source

pub fn token_id_to_origin_doc(&self, token_id: LiveTokenId) -> &LiveOriginal

source

pub fn token_id_to_token(&self, token_id: LiveTokenId) -> &TokenWithSpan

source

pub fn token_id_to_expanded_doc(&self, token_id: LiveTokenId) -> &LiveExpanded

source

pub fn module_id_to_file_id( &self, module_id: LiveModuleId ) -> Option<LiveFileId>

source

pub fn file_id_to_module_id(&self, file_id: LiveFileId) -> Option<LiveModuleId>

source

pub fn live_node_as_string(&self, node: &LiveNode) -> Option<String>

source

pub fn get_node_prefix(&self, origin: LiveNodeOrigin) -> Option<LiveId>

source

pub fn module_id_to_expanded_nodes( &self, module_id: LiveModuleId ) -> Option<&[LiveNode]>

source

pub fn module_id_and_name_to_ptr( &self, module_id: LiveModuleId, name: LiveId ) -> Option<LivePtr>

source

pub fn find_module_id_name( &self, item: LiveId, module_id: LiveModuleId ) -> Option<LiveScopeTarget>

source

pub fn find_scope_target( &self, item: LiveId, nodes: &[LiveNode] ) -> Option<LiveScopeTarget>

source

pub fn find_scope_target_one_level_or_global( &self, item: LiveId, index: usize, nodes: &[LiveNode] ) -> Option<LiveScopeTarget>

source

pub fn find_scope_ptr_via_expand_index( &self, file_id: LiveFileId, index: usize, item: LiveId ) -> Option<LivePtr>

source

pub fn live_error_to_live_file_error( &self, live_error: LiveError ) -> LiveFileError

source

pub fn token_id_to_span(&self, token_id: LiveTokenId) -> TextSpan

source

pub fn tokenize_from_str( source: &str, start_pos: TextPos, file_id: LiveFileId ) -> Result<Vec<TokenWithSpan>, LiveError>

source

pub fn tokenize_from_str_live_design( source: &str, start_pos: TextPos, file_id: LiveFileId, negative: Option<&mut Vec<TokenWithLen>> ) -> Result<Vec<TokenWithSpan>, LiveError>

source

pub fn process_file_changes( &mut self, changes: Vec<LiveFileChange>, errors: &mut Vec<LiveError> )

source

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>

source

pub fn expand_all_documents(&mut self, errors: &mut Vec<LiveError>)

Trait Implementations§

source§

impl Default for LiveRegistry

source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere 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, U> TryFrom<U> for Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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.