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 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for OuterHtmlResult
impl Debug for OuterHtmlResult
Source§impl Display for OuterHtmlResult
impl Display for OuterHtmlResult
Source§impl PartialEq for OuterHtmlResult
impl PartialEq for OuterHtmlResult
Source§impl Serialize for OuterHtmlResult
impl Serialize for OuterHtmlResult
impl Eq for OuterHtmlResult
impl StructuralPartialEq for OuterHtmlResult
Auto Trait Implementations§
impl Freeze for OuterHtmlResult
impl RefUnwindSafe for OuterHtmlResult
impl Send for OuterHtmlResult
impl Sync for OuterHtmlResult
impl Unpin for OuterHtmlResult
impl UnsafeUnpin for OuterHtmlResult
impl UnwindSafe for OuterHtmlResult
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.