Skip to main content

SourceLine

Struct SourceLine 

Source
pub struct SourceLine {
    pub definition: Option<Weak<RefCell<Symbol>>>,
    pub references: Vec<Weak<RefCell<Symbol>>>,
    pub is_dirty: bool,
    pub line_offset: i32,
    pub is_origin: bool,
    pub data_bytes: Vec<u8>,
    pub relative_offset: i32,
    pub include_bytes_read: Option<usize>,
}

Fields§

§definition: Option<Weak<RefCell<Symbol>>>§references: Vec<Weak<RefCell<Symbol>>>§is_dirty: bool§line_offset: i32§is_origin: bool§data_bytes: Vec<u8>§relative_offset: i32§include_bytes_read: Option<usize>

Implementations§

Source§

impl SourceLine

Source

pub fn new() -> Self

Source

pub fn get_offset(&self) -> i32

Source

pub fn get_byte_count(&self) -> usize

Source

pub fn set_data(&mut self, data: &[u8]) -> i32

Source

pub fn get_data(&self) -> &[u8]

Source

pub fn set_offset(&mut self, byte_offset: i32, is_origin: bool)

Source

pub fn adjust_offset(&mut self, offset: i32)

Source

pub fn mark_dirty(&mut self, is_dirty: bool)

Source

pub fn is_dirty(&self) -> bool

Source

pub fn is_origin(&self) -> bool

Source

pub fn set_relative(&mut self, offset: i32)

Source

pub fn get_relative_offset(&self) -> i32

Source

pub fn reset_references(&mut self, self_ref: Weak<RefCell<SourceLine>>)

Source

pub fn add_reference(&mut self, symbol: Weak<RefCell<Symbol>>)

Source

pub fn set_include_bytes_read(&mut self, bytes: usize)

Source

pub fn set_definition( &mut self, symbol: Option<Weak<RefCell<Symbol>>>, self_ref: Weak<RefCell<SourceLine>>, )

Trait Implementations§

Source§

impl Debug for SourceLine

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where 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 T
where 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 T
where U: Into<T>,

Source§

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

Source§

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.