Struct makepad_live_compiler::live_document::LiveOriginal
source · [−]pub struct LiveOriginal {
pub nodes: Vec<LiveNode>,
pub edit_info: Vec<LiveNode>,
pub strings: Vec<char>,
pub tokens: Vec<TokenWithSpan>,
}
Fields
nodes: Vec<LiveNode>
edit_info: Vec<LiveNode>
strings: Vec<char>
tokens: Vec<TokenWithSpan>
Implementations
sourceimpl LiveOriginal
impl LiveOriginal
pub fn new() -> Self
pub fn resolve_ptr(&self, index: usize) -> &LiveNode
pub fn get_tokens(
&self,
token_start: usize,
token_count: usize
) -> &[TokenWithSpan]
pub fn find_token_by_pos(&self, pos: TextPos) -> Option<usize>
pub fn get_string(
&self,
string_start: usize,
string_count: usize,
out: &mut String
)
pub fn token_id_to_span(&self, token_id: LiveTokenId) -> TextSpan
Trait Implementations
sourceimpl Default for LiveOriginal
impl Default for LiveOriginal
sourcefn default() -> LiveOriginal
fn default() -> LiveOriginal
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for LiveOriginal
impl !Send for LiveOriginal
impl !Sync for LiveOriginal
impl Unpin for LiveOriginal
impl UnwindSafe for LiveOriginal
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