pub(crate) fn format(
        &self,
        value: &Value,
        out: &mut String,
        buf: &mut String,
        caller: impl ProtocolCaller,
    ) -> Result<(), VmError> {
        match self.format_type {
            Type::Display => self.format_display(value, out, buf, caller)?,
            Type::Debug => self.format_debug(value, out, buf, caller)?,
            Type::UpperHex => self.format_upper_hex(value, out, buf)?,
            Type::LowerHex => self.format_lower_hex(value, out, buf)?,
            Type::Binary => self.format_binary(value, out, buf)?,
            Type::Pointer => self.format_pointer(value, out, buf)?,
        }

        Ok(())
    }
/// Format the given value to the out buffer `out`, using `buf` for
/// intermediate work if necessary.
Format the given value to the out buffer `out`, using `buf` for
intermediate work if necessary.
Format the given value to the out buffer ` out ` using ` buf ` for intermediate work if necessary .
pub(crate) fn format(
        &self,
        value: &Value,
        out: &mut String,
        buf: &mut String,
        caller: impl ProtocolCaller,
    ) -> Result<(), VmError> {
        match self.format_type {
            Type::Display => self.format_display(value, out, buf, caller)?,
            Type::Debug => self.format_debug(value, out, buf, caller)?,
            Type::UpperHex => self.format_upper_hex(value, out, buf)?,
            Type::LowerHex => self.format_lower_hex(value, out, buf)?,
            Type::Binary => self.format_binary(value, out, buf)?,
            Type::Pointer => self.format_pointer(value, out, buf)?,
        }
        Ok(())
    }
pub ( crate ) fn format ( & self , value : & Value , out : & mut String , buf : & mut String , caller : impl ProtocolCaller , ) -> Result < ( ) , VmError > { match self . format_type { Type :: Display => self . format_display ( value , out , buf , caller ) ? , Type :: Debug => self . format_debug ( value , out , buf , caller ) ? , Type :: UpperHex => self . format_upper_hex ( value , out , buf ) ? , Type :: LowerHex => self . format_lower_hex ( value , out , buf ) ? , Type :: Binary => self . format_binary ( value , out , buf ) ? , Type :: Pointer => self . format_pointer ( value , out , buf ) ? , } Ok ( ( ) ) }
Format the given value to the out buffer `out`, using `buf` for
intermediate work if necessary.
Format the given value to the out buffer ` out ` using ` buf ` for intermediate work if necessary .
&self
value
&Value
out
&mut String
buf
&mut String
caller
impl ProtocolCaller
&self
value
&Value
out
&mut String
buf
&mut String
caller
impl ProtocolCaller