sway_ir::pretty

Trait DebugWithContext

Source
pub trait DebugWithContext {
    // Required method
    fn fmt_with_context(
        &self,
        formatter: &mut Formatter<'_>,
        context: &Context<'_>,
    ) -> Result;

    // Provided method
    fn with_context<'a, 'c, 'eng>(
        &'a self,
        context: &'c Context<'eng>,
    ) -> WithContext<'a, 'c, 'eng, Self> { ... }
}

Required Methods§

Source

fn fmt_with_context( &self, formatter: &mut Formatter<'_>, context: &Context<'_>, ) -> Result

Provided Methods§

Source

fn with_context<'a, 'c, 'eng>( &'a self, context: &'c Context<'eng>, ) -> WithContext<'a, 'c, 'eng, Self>

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.

Implementations on Foreign Types§

Source§

impl DebugWithContext for ()

Source§

fn fmt_with_context( &self, formatter: &mut Formatter<'_>, context: &Context<'_>, ) -> Result

Source§

impl<'t, T> DebugWithContext for &'t T
where T: Debug,

Source§

fn fmt_with_context( &self, formatter: &mut Formatter<'_>, _context: &Context<'_>, ) -> Result

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> DebugWithContext for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)

Source§

fn fmt_with_context( &self, formatter: &mut Formatter<'_>, context: &Context<'_>, ) -> Result

Source§

impl<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> DebugWithContext for (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)

Source§

fn fmt_with_context( &self, formatter: &mut Formatter<'_>, context: &Context<'_>, ) -> Result

Source§

impl<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> DebugWithContext for (T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)

Source§

fn fmt_with_context( &self, formatter: &mut Formatter<'_>, context: &Context<'_>, ) -> Result

Source§

impl<T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> DebugWithContext for (T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)

Source§

fn fmt_with_context( &self, formatter: &mut Formatter<'_>, context: &Context<'_>, ) -> Result

Source§

impl<T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> DebugWithContext for (T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)

Source§

fn fmt_with_context( &self, formatter: &mut Formatter<'_>, context: &Context<'_>, ) -> Result

Source§

impl<T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> DebugWithContext for (T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)

Source§

fn fmt_with_context( &self, formatter: &mut Formatter<'_>, context: &Context<'_>, ) -> Result

Source§

impl<T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> DebugWithContext for (T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)

Source§

fn fmt_with_context( &self, formatter: &mut Formatter<'_>, context: &Context<'_>, ) -> Result

Source§

impl<T7, T8, T9, T10, T11, T12, T13, T14, T15> DebugWithContext for (T7, T8, T9, T10, T11, T12, T13, T14, T15)

Source§

fn fmt_with_context( &self, formatter: &mut Formatter<'_>, context: &Context<'_>, ) -> Result

Source§

impl<T8, T9, T10, T11, T12, T13, T14, T15> DebugWithContext for (T8, T9, T10, T11, T12, T13, T14, T15)

Source§

fn fmt_with_context( &self, formatter: &mut Formatter<'_>, context: &Context<'_>, ) -> Result

Source§

impl<T9, T10, T11, T12, T13, T14, T15> DebugWithContext for (T9, T10, T11, T12, T13, T14, T15)

Source§

fn fmt_with_context( &self, formatter: &mut Formatter<'_>, context: &Context<'_>, ) -> Result

Source§

impl<T10, T11, T12, T13, T14, T15> DebugWithContext for (T10, T11, T12, T13, T14, T15)

Source§

fn fmt_with_context( &self, formatter: &mut Formatter<'_>, context: &Context<'_>, ) -> Result

Source§

impl<T11, T12, T13, T14, T15> DebugWithContext for (T11, T12, T13, T14, T15)

Source§

fn fmt_with_context( &self, formatter: &mut Formatter<'_>, context: &Context<'_>, ) -> Result

Source§

impl<T12, T13, T14, T15> DebugWithContext for (T12, T13, T14, T15)

Source§

fn fmt_with_context( &self, formatter: &mut Formatter<'_>, context: &Context<'_>, ) -> Result

Source§

impl<T13, T14, T15> DebugWithContext for (T13, T14, T15)

Source§

fn fmt_with_context( &self, formatter: &mut Formatter<'_>, context: &Context<'_>, ) -> Result

Source§

impl<T14, T15> DebugWithContext for (T14, T15)

Source§

fn fmt_with_context( &self, formatter: &mut Formatter<'_>, context: &Context<'_>, ) -> Result

Source§

impl<T15> DebugWithContext for (T15,)
where T15: DebugWithContext,

Source§

fn fmt_with_context( &self, formatter: &mut Formatter<'_>, context: &Context<'_>, ) -> Result

Source§

impl<T> DebugWithContext for Option<T>

Source§

fn fmt_with_context( &self, formatter: &mut Formatter<'_>, context: &Context<'_>, ) -> Result

Source§

impl<T> DebugWithContext for [T]

Source§

fn fmt_with_context( &self, formatter: &mut Formatter<'_>, context: &Context<'_>, ) -> Result

Source§

impl<T> DebugWithContext for Vec<T>

Source§

fn fmt_with_context( &self, formatter: &mut Formatter<'_>, context: &Context<'_>, ) -> Result

Implementors§