charon_lib::pretty::fmt_with_ctx

Trait FmtWithCtx

source
pub trait FmtWithCtx<C> {
    // Provided methods
    fn fmt_with_ctx(&self, ctx: &C) -> String { ... }
    fn fmt_with_ctx_and_indent(&self, _tab: &str, _ctx: &C) -> String { ... }
    fn with_ctx<'a>(&'a self, ctx: &'a C) -> impl Display + 'a { ... }
}
Expand description

Format the AST type as a string.

Provided Methods§

source

fn fmt_with_ctx(&self, ctx: &C) -> String

source

fn fmt_with_ctx_and_indent(&self, _tab: &str, _ctx: &C) -> String

source

fn with_ctx<'a>(&'a self, ctx: &'a C) -> impl Display + 'a

Returns a struct that implements Display. This allows the following:

    println!("{}", self.with_ctx(ctx));

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

source§

impl<C> FmtWithCtx<C> for FunDecl
where C: for<'a> SetGenerics<'a>, for<'a, 'a, 'b> <C as SetGenerics<'a>>::C: AstFormatter + SetLocals<'b>, for<'a, 'b> <<C as SetGenerics<'a>>::C as SetLocals<'b>>::C: AstFormatter,

source§

impl<C> FmtWithCtx<C> for GlobalDecl
where C: AstFormatter + for<'a> SetLocals<'a>, for<'a> <C as SetGenerics<'a>>::C: AstFormatter, for<'a, 'b, 'a, 'b, 'c> <<C as SetGenerics<'a>>::C as SetLocals<'b>>::C: AstFormatter,

source§

impl<C: AstFormatter> FmtWithCtx<C> for CastKind

source§

impl<C: AstFormatter> FmtWithCtx<C> for NullOp

source§

impl<C: AstFormatter> FmtWithCtx<C> for Operand

source§

impl<C: AstFormatter> FmtWithCtx<C> for RawConstantExpr

source§

impl<C: AstFormatter> FmtWithCtx<C> for Rvalue

source§

impl<C: AstFormatter> FmtWithCtx<C> for UnOp

source§

impl<C: AstFormatter> FmtWithCtx<C> for AbortKind

source§

impl<C: AstFormatter> FmtWithCtx<C> for Body

source§

impl<C: AstFormatter> FmtWithCtx<C> for FnOperand

source§

impl<C: AstFormatter> FmtWithCtx<C> for AnyTransItem<'_>

source§

impl<C: AstFormatter> FmtWithCtx<C> for ImplElem

source§

impl<C: AstFormatter> FmtWithCtx<C> for PathElem

source§

impl<C: AstFormatter> FmtWithCtx<C> for ConstGeneric

source§

impl<C: AstFormatter> FmtWithCtx<C> for Region

source§

impl<C: AstFormatter> FmtWithCtx<C> for TraitRefKind

source§

impl<C: AstFormatter> FmtWithCtx<C> for TypeId

source§

impl<C: AstFormatter> FmtWithCtx<C> for DeclarationGroup

source§

impl<C: AstFormatter> FmtWithCtx<C> for ConstantExpr

source§

impl<C: AstFormatter> FmtWithCtx<C> for FnPtr

source§

impl<C: AstFormatter> FmtWithCtx<C> for Place

source§

impl<C: AstFormatter> FmtWithCtx<C> for Assert

source§

impl<C: AstFormatter> FmtWithCtx<C> for GlobalDeclRef

source§

impl<C: AstFormatter> FmtWithCtx<C> for TraitDecl

source§

impl<C: AstFormatter> FmtWithCtx<C> for TraitImpl

source§

impl<C: AstFormatter> FmtWithCtx<C> for Block

source§

impl<C: AstFormatter> FmtWithCtx<C> for charon_lib::ast::llbc_ast::Statement

source§

impl<C: AstFormatter> FmtWithCtx<C> for Name

source§

impl<C: AstFormatter> FmtWithCtx<C> for ExistentialPredicate

source§

impl<C: AstFormatter> FmtWithCtx<C> for Field

source§

impl<C: AstFormatter> FmtWithCtx<C> for FunSig

source§

impl<C: AstFormatter> FmtWithCtx<C> for GenericArgs

source§

impl<C: AstFormatter> FmtWithCtx<C> for GenericParams

source§

impl<C: AstFormatter> FmtWithCtx<C> for TraitClause

source§

impl<C: AstFormatter> FmtWithCtx<C> for TraitDeclRef

source§

impl<C: AstFormatter> FmtWithCtx<C> for TraitRef

source§

impl<C: AstFormatter> FmtWithCtx<C> for TraitTypeConstraint

source§

impl<C: AstFormatter> FmtWithCtx<C> for Ty

source§

impl<C: AstFormatter> FmtWithCtx<C> for TypeDecl

source§

impl<C: AstFormatter> FmtWithCtx<C> for Variant

source§

impl<C: AstFormatter> FmtWithCtx<C> for BlockData

source§

impl<C: AstFormatter> FmtWithCtx<C> for charon_lib::ast::ullbc_ast::Statement

source§

impl<C: AstFormatter> FmtWithCtx<C> for Terminator

source§

impl<C: AstFormatter> FmtWithCtx<C> for PolyTraitDeclRef

source§

impl<C: AstFormatter, T, U> FmtWithCtx<C> for OutlivesPred<T, U>
where T: FmtWithCtx<C>, U: FmtWithCtx<C>,

source§

impl<Id: Copy, C: AstFormatter + Formatter<Id>> FmtWithCtx<C> for GDeclarationGroup<Id>

source§

impl<T, C> FmtWithCtx<C> for GExprBody<T>
where C: for<'a> SetLocals<'a>, for<'a, 'a, 'b> <C as SetLocals<'a>>::C: AstFormatter + Formatter<&'b T>,