Struct biome_json_formatter::JsonFormatLanguage
source · pub struct JsonFormatLanguage { /* private fields */ }Implementations§
source§impl JsonFormatLanguage
impl JsonFormatLanguage
pub fn new(options: JsonFormatOptions) -> Self
Trait Implementations§
source§impl Clone for JsonFormatLanguage
impl Clone for JsonFormatLanguage
source§fn clone(&self) -> JsonFormatLanguage
fn clone(&self) -> JsonFormatLanguage
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for JsonFormatLanguage
impl Debug for JsonFormatLanguage
source§impl Default for JsonFormatLanguage
impl Default for JsonFormatLanguage
source§fn default() -> JsonFormatLanguage
fn default() -> JsonFormatLanguage
Returns the “default value” for a type. Read more
source§impl FormatLanguage for JsonFormatLanguage
impl FormatLanguage for JsonFormatLanguage
type SyntaxLanguage = JsonLanguage
§type Context = JsonFormatContext
type Context = JsonFormatContext
The type of the formatting context
§type FormatRule = FormatJsonSyntaxNode
type FormatRule = FormatJsonSyntaxNode
The rule type that can format a SyntaxNode of this language
source§fn is_range_formatting_node(
&self,
node: &SyntaxNode<Self::SyntaxLanguage>
) -> bool
fn is_range_formatting_node( &self, node: &SyntaxNode<Self::SyntaxLanguage> ) -> bool
This is used to select appropriate “root nodes” for the
range formatting process: for instance in JavaScript the function returns
true for statement and declaration nodes, to ensure the entire statement
gets formatted instead of the smallest sub-expression that fits the range
source§fn options(&self) -> &<Self::Context as FormatContext>::Options
fn options(&self) -> &<Self::Context as FormatContext>::Options
Returns the formatting options
source§fn create_context(
self,
root: &JsonSyntaxNode,
source_map: Option<TransformSourceMap>
) -> Self::Context
fn create_context( self, root: &JsonSyntaxNode, source_map: Option<TransformSourceMap> ) -> Self::Context
source§fn transform(
&self,
_root: &SyntaxNode<Self::SyntaxLanguage>
) -> Option<(SyntaxNode<Self::SyntaxLanguage>, TransformSourceMap)>
fn transform( &self, _root: &SyntaxNode<Self::SyntaxLanguage> ) -> Option<(SyntaxNode<Self::SyntaxLanguage>, TransformSourceMap)>
Performs an optional pre-processing of the tree. This can be useful to remove nodes
that otherwise complicate formatting. Read more
Auto Trait Implementations§
impl Freeze for JsonFormatLanguage
impl RefUnwindSafe for JsonFormatLanguage
impl Send for JsonFormatLanguage
impl Sync for JsonFormatLanguage
impl Unpin for JsonFormatLanguage
impl UnwindSafe for JsonFormatLanguage
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