pub enum OuterHtmlResult {
Empty,
Content(String),
Failed {
backends: Vec<&'static str>,
},
}Expand description
Outcome of NodeHandle::outer_html_with_strategy.
The default String-returning NodeHandle::outer_html flattens this
into a Result<String> where Empty and Failed both surface as the
empty string — preserving the historical contract.
Derives Serialize so callers can include the outcome in structured
logs, metrics, or per-request reports. Deserialize is intentionally not
derived because the Failed::backends field holds &'static str
backend names — a deserialised value would need owned Strings and
would lose the typed backend taxonomy this enum encodes.
Variants§
Empty
The chosen strategy’s backends all returned an empty payload. This typically means the page is still rendering or the node has been detached since the handle was created.
Content(String)
Successfully serialised outer markup for the target node.
Failed
Every backend the strategy tried returned an error. The list names the backends in the order they were attempted so callers can build retry strategies or surface diagnostics.
Implementations§
Trait Implementations§
Source§impl Clone for OuterHtmlResult
impl Clone for OuterHtmlResult
Source§fn clone(&self) -> OuterHtmlResult
fn clone(&self) -> OuterHtmlResult
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more