[−][src]Struct c2rust_transpile::c_ast::Printer
Methods
impl<W: Write> Printer<W>
[src]
pub fn new(writer: W) -> Printer<W>
[src]
pub fn pad(&mut self) -> Result<()>
[src]
Assuming the cursor is at the beginning of a line, print out whitespace to reach the indent
stored in the Printer
.
pub fn newline(&mut self) -> Result<()>
[src]
Print out a new line and pad to the right indent stored in the Printer
.
pub fn parenthesize<F: FnMut(&mut Self) -> Result<()>>(
&mut self,
print_parens: bool,
action: F
) -> Result<()>
[src]
&mut self,
print_parens: bool,
action: F
) -> Result<()>
Pass in an action that will be optionally wrapped in parentheses
pub fn print(&mut self, context: &TypedAstContext) -> Result<()>
[src]
pub fn print_expr(
&mut self,
expr_id: CExprId,
context: &TypedAstContext
) -> Result<()>
[src]
&mut self,
expr_id: CExprId,
context: &TypedAstContext
) -> Result<()>
pub fn print_expr_prec(
&mut self,
_precedence: i32,
expr_id: CExprId,
context: &TypedAstContext
) -> Result<()>
[src]
&mut self,
_precedence: i32,
expr_id: CExprId,
context: &TypedAstContext
) -> Result<()>
pub fn print_unop(
&mut self,
op: &UnOp,
_context: &TypedAstContext
) -> Result<()>
[src]
&mut self,
op: &UnOp,
_context: &TypedAstContext
) -> Result<()>
pub fn print_binop(
&mut self,
op: &BinOp,
_context: &TypedAstContext
) -> Result<()>
[src]
&mut self,
op: &BinOp,
_context: &TypedAstContext
) -> Result<()>
pub fn print_lit(
&mut self,
lit: &CLiteral,
_context: &TypedAstContext
) -> Result<()>
[src]
&mut self,
lit: &CLiteral,
_context: &TypedAstContext
) -> Result<()>
pub fn print_stmt(
&mut self,
stmt_id: CStmtId,
newline: bool,
pad: bool,
context: &TypedAstContext
) -> Result<()>
[src]
&mut self,
stmt_id: CStmtId,
newline: bool,
pad: bool,
context: &TypedAstContext
) -> Result<()>
pub fn print_decl(
&mut self,
decl_id: CDeclId,
newline: bool,
pad: bool,
context: &TypedAstContext
) -> Result<()>
[src]
&mut self,
decl_id: CDeclId,
newline: bool,
pad: bool,
context: &TypedAstContext
) -> Result<()>
pub fn print_decl_name(
&mut self,
decl_id: CDeclId,
context: &TypedAstContext
) -> Result<()>
[src]
&mut self,
decl_id: CDeclId,
context: &TypedAstContext
) -> Result<()>
pub fn print_type(
&mut self,
type_id: CTypeId,
ident: Option<&str>,
context: &TypedAstContext
) -> Result<()>
[src]
&mut self,
type_id: CTypeId,
ident: Option<&str>,
context: &TypedAstContext
) -> Result<()>
pub fn print_qtype(
&mut self,
type_id: CQualTypeId,
ident: Option<&str>,
context: &TypedAstContext
) -> Result<()>
[src]
&mut self,
type_id: CQualTypeId,
ident: Option<&str>,
context: &TypedAstContext
) -> Result<()>
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<E> SpecializationError for E
[src]
default fn not_found<S, T>(
trait_name: &'static str,
method_name: &'static str
) -> E where
T: ?Sized,
[src]
trait_name: &'static str,
method_name: &'static str
) -> E where
T: ?Sized,
impl<T> Erased for T
[src]
impl<T> Send for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Sync for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Make for T
[src]
impl<T> MaybeResult for T
[src]
impl<'a, T> Captures for T where
T: ?Sized,
[src]
T: ?Sized,