Struct source_map::Counter
source · pub struct Counter(/* private fields */);
Expand description
Used for getting byte count of the result when built into string without building the string
Implementations§
Trait Implementations§
source§impl ToString for Counter
impl ToString for Counter
fn push(&mut self, chr: char)
fn push_new_line(&mut self)
source§fn push_str(&mut self, string: &str)
fn push_str(&mut self, string: &str)
Use ToString::push_str_contains_new_line if
string
could contain new linessource§fn push_str_contains_new_line(&mut self, string: &str)
fn push_str_contains_new_line(&mut self, string: &str)
Used to push strings that may contain new lines
source§fn add_mapping(&mut self, _source_span: &Span)
fn add_mapping(&mut self, _source_span: &Span)
Adds a mapping of the from a original position in the source to the position in the current buffer
Auto Trait Implementations§
impl RefUnwindSafe for Counter
impl Send for Counter
impl Sync for Counter
impl Unpin for Counter
impl UnwindSafe for Counter
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more