Struct source_map::ToStringer[][src]

pub struct ToStringer<'a>(_, _);

A structure with a buffer and optional corresponding SourceMap

Implementations

impl<'a> ToStringer<'a>[src]

pub fn with_source_map(
    buf: &'a mut String,
    source_map: &'a mut SourceMap
) -> Self
[src]

pub fn without_source_map(buf: &'a mut String) -> Self[src]

impl ToStringer<'_>[src]

pub fn push(&mut self, chr: char)[src]

pub fn push_new_line(&mut self)[src]

pub fn push_str(&mut self, slice: &str)[src]

pub fn push_str_contains_new_line(&mut self, slice: &str)[src]

Used to push slices that may contain new lines

pub fn add_mapping(
    &mut self,
    original_line: usize,
    original_column: usize,
    source_id: SourceId
)
[src]

Adds a mapping of the from a original position in the source to the position in the current buffer

Auto Trait Implementations

impl<'a> RefUnwindSafe for ToStringer<'a>

impl<'a> Send for ToStringer<'a>

impl<'a> Sync for ToStringer<'a>

impl<'a> Unpin for ToStringer<'a>

impl<'a> !UnwindSafe for ToStringer<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.