Skip to main content

Redactor

Trait Redactor 

Source
pub trait Redactor {
    // Required method
    fn redact(&self, path: &Path, node: &Node) -> Option<Node>;
}
Expand description

Decides whether (and how) to replace a node before display.

Called for every node, parents first; a replacement is used as-is and its children are not visited. Redaction implements it; implement it yourself for other rules (by path, by value shape, …).

Required Methods§

Source

fn redact(&self, path: &Path, node: &Node) -> Option<Node>

The node to show instead of node, or None to keep it.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§