Trait LinkFormatter

Source
pub trait LinkFormatter:
    Debug
    + Send
    + Sync {
    // Required methods
    fn validate_link(&self, url: &str) -> Option<()>;
    fn normalize_link(&self, url: &str) -> String;
    fn normalize_link_text(&self, url: &str) -> String;
}

Required Methods§

Validate the link url, return Some(()) if it is allowed and None if it is a security risk.

Encode link url to a machine-readable format, which includes url-encoding, punycode, etc.

Decode link url to a human-readable format.

Implementors§