Skip to main content

Redactor

Trait Redactor 

Source
pub trait Redactor:
    Send
    + Sync
    + Debug {
    // Required method
    fn redact<'a>(&self, text: &'a str) -> Cow<'a, str>;

    // Provided method
    fn is_empty(&self) -> bool { ... }
}
Expand description

Something that rewrites text before it leaves the runtime.

Required Methods§

Source

fn redact<'a>(&self, text: &'a str) -> Cow<'a, str>

Borrowed when nothing changed.

Provided Methods§

Source

fn is_empty(&self) -> bool

Whether a call can ever change anything. A host with nothing to hide answers true and the runtime skips the walk.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§