Struct vfs_https::HttpsFSBuilder[][src]

pub struct HttpsFSBuilder { /* fields omitted */ }

Helper struct for building HttpsFS structs

Implementations

impl HttpsFSBuilder[src]

pub fn new(domain: &str) -> Self[src]

Creates a new builder for a HttpsFS.

Takes a domain name to which the HttpsFS will connect.

pub fn set_port(self, port: u16) -> Self[src]

Set the port, to which the HttpsFS will connect.

Default is 443.

pub fn set_domain(self, domain: &str) -> Self[src]

Overwrites the domain name, which was set while creating the builder.

pub fn add_root_certificate(self, cert: &str) -> Self[src]

Adds an additional root certificate.

If a self signed certificate is used during, the development, than the certificate has to be added with this call, otherwise the HttpsFS fails to connect to the crate::HttpsFSServer.

pub fn set_credential_provider(
    self,
    c_provider: fn(realm: &str) -> (String, String)
) -> Self
[src]

If the crate::HttpsFSServer request a authentication, than this function will be called to get the credentials. The first value of the returned tuple is the user name and the second value is the password.

pub fn build(self) -> HttpsFSResult<HttpsFS>[src]

Generates a HttpsFS with the set configuration

Error

Returns an error, if the credential provider was not set.

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> Instrument 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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,