pub struct CleanResult {
pub clean_text: String,
pub has_tracking_pixel: bool,
pub is_template_heavy: bool,
pub link_count: usize,
pub image_count: usize,
pub text_to_html_ratio: f32,
}Expand description
Result of clean_email_html.
The cleaned text plus signals the caller can fold into a spam / importance score.
Fields§
§clean_text: StringPlain text rendering of the cleaned HTML (tracking removed, footer chrome stripped, paragraphs preserved).
has_tracking_pixel: booltrue when at least one tracking pixel was detected and stripped.
is_template_heavy: booltrue when the HTML looked like a marketing template (heavy on
inline styles, hidden divs, table-based layout).
link_count: usizeNumber of <a> tags in the original HTML.
image_count: usizeNumber of <img> tags in the original HTML.
text_to_html_ratio: f32Ratio of plain-text bytes to total HTML bytes — useful for spotting emails that are mostly chrome.
Auto Trait Implementations§
impl Freeze for CleanResult
impl RefUnwindSafe for CleanResult
impl Send for CleanResult
impl Sync for CleanResult
impl Unpin for CleanResult
impl UnsafeUnpin for CleanResult
impl UnwindSafe for CleanResult
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
Mutably borrows from an owned value. Read more