Struct biome_formatter::Printed
source · pub struct Printed { /* private fields */ }
Implementations§
source§impl Printed
impl Printed
pub fn new( code: String, range: Option<TextRange>, sourcemap: Vec<SourceMarker>, verbatim_source: Vec<TextRange> ) -> Self
sourcepub fn range(&self) -> Option<TextRange>
pub fn range(&self) -> Option<TextRange>
Range of the input source file covered by this formatted code, or None if the entire file is covered in this instance
sourcepub fn sourcemap(&self) -> &[SourceMarker]
pub fn sourcemap(&self) -> &[SourceMarker]
Returns a list of SourceMarker mapping byte positions in the output string to the input source code. It’s not guaranteed that the markers are sorted by source position.
sourcepub fn into_sourcemap(self) -> Vec<SourceMarker>
pub fn into_sourcemap(self) -> Vec<SourceMarker>
Returns a list of SourceMarker mapping byte positions in the output string to the input source code, consuming the result
sourcepub fn take_sourcemap(&mut self) -> Vec<SourceMarker>
pub fn take_sourcemap(&mut self) -> Vec<SourceMarker>
Takes the list of SourceMarker mapping byte positions in the output string to the input source code.
sourcepub fn verbatim(&self) -> impl Iterator<Item = (TextRange, &str)>
pub fn verbatim(&self) -> impl Iterator<Item = (TextRange, &str)>
The text in the formatted code that has been formatted as verbatim.
sourcepub fn verbatim_ranges(&self) -> &[TextRange]
pub fn verbatim_ranges(&self) -> &[TextRange]
Ranges of the formatted code that have been formatted as verbatim.
sourcepub fn take_verbatim_ranges(&mut self) -> Vec<TextRange>
pub fn take_verbatim_ranges(&mut self) -> Vec<TextRange>
Takes the ranges of nodes that have been formatted as verbatim, replacing them with an empty list.
Trait Implementations§
source§impl PartialEq for Printed
impl PartialEq for Printed
impl Eq for Printed
impl StructuralPartialEq for Printed
Auto Trait Implementations§
impl Freeze for Printed
impl RefUnwindSafe for Printed
impl Send for Printed
impl Sync for Printed
impl Unpin for Printed
impl UnwindSafe for Printed
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
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.