[][src]Struct gmi2html::GeminiConverter

pub struct GeminiConverter<'a> { /* fields omitted */ }

Implementations

impl<'a> GeminiConverter<'a>[src]

pub fn new(gmi_text: &'a str) -> Self[src]

Initialize the builder with default configuration values.

pub fn proxy_url(&mut self, proxy_url: &'a str) -> &mut Self[src]

Replace gemini:// in URLS with this prefix for proxying, i.e. over HTTP. Requires trailing slash.

pub fn inline_images(&mut self, option: bool) -> &mut Self[src]

Render relative-path images in-line. Default false. Beware that this can expose you to security issues if you're not careful (e.g. malicious SVG)

pub fn allowed_schemes(&mut self, allowed: &'a [&'a str]) -> &mut Self[src]

Applied before proxy_url.

pub fn to_html(&self) -> String[src]

Convert Gemini text to HTML.

Auto Trait Implementations

impl<'a> RefUnwindSafe for GeminiConverter<'a>

impl<'a> Send for GeminiConverter<'a>

impl<'a> Sync for GeminiConverter<'a>

impl<'a> Unpin for GeminiConverter<'a>

impl<'a> UnwindSafe for GeminiConverter<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.