AcmeFormat

Trait AcmeFormat 

Source
pub trait AcmeFormat {
    // Required method
    fn fmt<W: Write>(&self, f: &mut IndentWriter<'_, W>) -> Result;

    // Provided methods
    fn fmt_indented<W: Write>(&self, f: &mut IndentWriter<'_, W>) -> Result { ... }
    fn fmt_indented_skip_first<W: Write>(
        &self,
        f: &mut IndentWriter<'_, W>,
    ) -> Result { ... }
    fn formatted(&self) -> AcmeFormatted<'_, Self> { ... }
}
Expand description

Format trait for showing data in the style of RFC 8885

Data should be formatted as an HTTP request with a pretty-printed JSON body, using base64encode() to represent base-64 encoded strings.

Required Methods§

Source

fn fmt<W: Write>(&self, f: &mut IndentWriter<'_, W>) -> Result

Write this format at the current indentation.

Provided Methods§

Source

fn fmt_indented<W: Write>(&self, f: &mut IndentWriter<'_, W>) -> Result

Write this format at an indented level one greater than the current level.

After this method completes, the indentation level is left unchanged.

Source

fn fmt_indented_skip_first<W: Write>( &self, f: &mut IndentWriter<'_, W>, ) -> Result

Write this format at an indented level one greater than the current level, but don’t indent the first line.

Source

fn formatted(&self) -> AcmeFormatted<'_, Self>

Return a formatting proxy which will use the ACME format when used with std::fmt::Display.

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<'r, T> AcmeFormat for FormatSignedRequest<'r, T>
where T: Serialize,

Source§

impl<KI> AcmeFormat for ProtectedHeader<KI>
where KI: Serialize,

Source§

impl<P, KI> AcmeFormat for UnsignedToken<P, KI>
where P: Serialize, KI: Debug + Serialize,

Source§

impl<P, KI, S> AcmeFormat for SignedToken<P, KI, S>
where P: Serialize, KI: Debug + Serialize, S: AsRef<[u8]>,

Source§

impl<T> AcmeFormat for Request<T>
where T: Serialize,

Source§

impl<T> AcmeFormat for Response<T>
where T: Encode,

Source§

impl<T> AcmeFormat for Base64Data<T>
where T: AsRef<[u8]>,

Source§

impl<T> AcmeFormat for Base64JSON<T>
where T: Serialize,