pub struct CodeWriter { /* private fields */ }Expand description
代码生成器
Implementations§
Source§impl CodeWriter
impl CodeWriter
Sourcepub fn write_with_span(&mut self, text: &str, span: Span)
pub fn write_with_span(&mut self, text: &str, span: Span)
写入文本并记录源位置映射
Sourcepub fn write_line(&mut self, text: &str)
pub fn write_line(&mut self, text: &str)
写入一行文本
Sourcepub fn write_line_with_span(&mut self, text: &str, span: Span)
pub fn write_line_with_span(&mut self, text: &str, span: Span)
写入一行文本并记录源位置映射
Sourcepub fn append(&mut self, other: CodeWriter)
pub fn append(&mut self, other: CodeWriter)
追加另一个代码生成器的内容
Trait Implementations§
Source§impl Clone for CodeWriter
impl Clone for CodeWriter
Source§fn clone(&self) -> CodeWriter
fn clone(&self) -> CodeWriter
Returns a duplicate 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 CodeWriter
impl Debug for CodeWriter
Source§impl Default for CodeWriter
impl Default for CodeWriter
Source§fn default() -> CodeWriter
fn default() -> CodeWriter
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CodeWriter
impl RefUnwindSafe for CodeWriter
impl Send for CodeWriter
impl Sync for CodeWriter
impl Unpin for CodeWriter
impl UnsafeUnpin for CodeWriter
impl UnwindSafe for CodeWriter
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