pub struct EmitOptions {
pub mode: EmitMode,
pub newline: Newline,
pub indent_width: u8,
}Expand description
Immutable printing options.
Fields§
§mode: EmitModeThe surface to print.
newline: NewlineThe structural newline sequence.
indent_width: u8The number of spaces per indentation level.
Implementations§
Source§impl EmitOptions
impl EmitOptions
Sourcepub const fn javascript() -> Self
pub const fn javascript() -> Self
Default JavaScript options (LF newlines, four-space indentation).
Sourcepub const fn declaration() -> Self
pub const fn declaration() -> Self
Default declaration options (LF newlines, four-space indentation).
Sourcepub const fn with_newline(self, newline: Newline) -> Self
pub const fn with_newline(self, newline: Newline) -> Self
Returns a copy using newline for structural line breaks.
Sourcepub const fn with_indent_width(self, indent_width: u8) -> Self
pub const fn with_indent_width(self, indent_width: u8) -> Self
Returns a copy using indent_width spaces per level.
Trait Implementations§
Source§impl Clone for EmitOptions
impl Clone for EmitOptions
Source§fn clone(&self) -> EmitOptions
fn clone(&self) -> EmitOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for EmitOptions
Source§impl Debug for EmitOptions
impl Debug for EmitOptions
Source§impl Default for EmitOptions
impl Default for EmitOptions
impl Eq for EmitOptions
Source§impl Hash for EmitOptions
impl Hash for EmitOptions
Source§impl PartialEq for EmitOptions
impl PartialEq for EmitOptions
impl StructuralPartialEq for EmitOptions
Auto Trait Implementations§
impl Freeze for EmitOptions
impl RefUnwindSafe for EmitOptions
impl Send for EmitOptions
impl Sync for EmitOptions
impl Unpin for EmitOptions
impl UnsafeUnpin for EmitOptions
impl UnwindSafe for EmitOptions
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