Struct gemini_fetch::Page[][src]

pub struct Page {
    pub url: Url,
    pub header: Header,
    pub body: Option<String>,
}

Single Gemini page

See https://gemini.circumlunar.space/docs/specification.html for more information.

Fields

url: Url

Page's URL

header: Header

Page's single header

body: Option<String>

Page's optional body

Implementations

impl Page[src]

pub async fn fetch(
    url: &Url,
    tls_validation: Option<ServerTLSValidation>
) -> Result<Page>
[src]

Fetch the given Gemini link.

Does not follow redirects or other status codes.

pub async fn fetch_from(
    url: &Url,
    addr: SocketAddr,
    tls_validation: Option<ServerTLSValidation>
) -> Result<Page>
[src]

Fetch the given Gemini link from the specified socket address (e.g. a proxy).

Does not follow redirects or other status codes.

pub async fn fetch_and_handle_redirects(url: &Url) -> Result<Page>[src]

Fetch the given Gemini link while following redirects

Trait Implementations

impl Debug for Page[src]

Auto Trait Implementations

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.