SExprFormatter

Struct SExprFormatter 

Source
pub struct SExprFormatter<'a> { /* private fields */ }

Implementations§

Source§

impl<'a> SExprFormatter<'a>

Source

pub fn new(source: &'a [u8]) -> Self

Source

pub fn finish(self) -> String

Trait Implementations§

Source§

impl<'a, 'ast> Visitor<'ast> for SExprFormatter<'a>

Source§

fn visit_program(&mut self, program: &'ast Program<'ast>)

Source§

fn visit_stmt(&mut self, stmt: StmtId<'ast>)

Source§

fn visit_expr(&mut self, expr: ExprId<'ast>)

Source§

fn visit_name(&mut self, name: &Name<'ast>)

Source§

fn visit_case(&mut self, case: &'ast Case<'ast>)

Source§

fn visit_catch(&mut self, catch: &'ast Catch<'ast>)

Source§

fn visit_param(&mut self, param: &'ast Param<'ast>)

Source§

fn visit_type(&mut self, ty: &'ast Type<'ast>)

Source§

fn visit_class_member(&mut self, member: &'ast ClassMember<'ast>)

Source§

fn visit_arg(&mut self, arg: &'ast Arg<'ast>)

Source§

fn visit_array_item(&mut self, item: &'ast ArrayItem<'ast>)

Source§

fn visit_match_arm(&mut self, arm: &'ast MatchArm<'ast>)

Source§

fn visit_closure_use(&mut self, u: &'ast ClosureUse<'ast>)

Source§

fn visit_trait_adaptation(&mut self, adaptation: &'ast TraitAdaptation<'ast>)

Source§

fn visit_trait_method_ref(&mut self, method: &'ast TraitMethodRef<'ast>)

Source§

fn visit_attribute_group(&mut self, group: &'ast AttributeGroup<'ast>)

Source§

fn visit_attribute(&mut self, attribute: &'ast Attribute<'ast>)

Source§

fn visit_static_var(&mut self, var: &'ast StaticVar<'ast>)

Source§

fn visit_use_item(&mut self, use_item: &'ast UseItem<'ast>)

Source§

fn visit_class_const(&mut self, c: &'ast ClassConst<'ast>)

Source§

fn visit_declare_item(&mut self, declare: &'ast DeclareItem<'ast>)

Source§

fn visit_property_entry(&mut self, entry: &'ast PropertyEntry<'ast>)

Source§

fn visit_parse_error(&mut self, error: &'ast ParseError)

Source§

fn visit_property_hook(&mut self, hook: &'ast PropertyHook<'ast>)

Source§

fn visit_property_hook_body(&mut self, body: &'ast PropertyHookBody<'ast>)

Auto Trait Implementations§

§

impl<'a> Freeze for SExprFormatter<'a>

§

impl<'a> RefUnwindSafe for SExprFormatter<'a>

§

impl<'a> Send for SExprFormatter<'a>

§

impl<'a> Sync for SExprFormatter<'a>

§

impl<'a> Unpin for SExprFormatter<'a>

§

impl<'a> UnwindSafe for SExprFormatter<'a>

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.