Trait unftp_sbe_gcs::ServerExt
source · pub trait ServerExt {
// Provided method
fn with_gcs<Str, AuthHow>(
bucket: Str,
root: PathBuf,
auth: AuthHow
) -> Server<CloudStorage, DefaultUser>
where Str: Into<String>,
AuthHow: Into<AuthMethod> { ... }
}
Expand description
Extension trait purely for construction convenience.
Provided Methods§
sourcefn with_gcs<Str, AuthHow>(
bucket: Str,
root: PathBuf,
auth: AuthHow
) -> Server<CloudStorage, DefaultUser>
fn with_gcs<Str, AuthHow>( bucket: Str, root: PathBuf, auth: AuthHow ) -> Server<CloudStorage, DefaultUser>
Creates a new Server
with a GCS storage back-end
Example
use libunftp::Server;
use unftp_sbe_gcs::{ServerExt, options::AuthMethod};
use std::path::PathBuf;
let server = Server::with_gcs("my-bucket", PathBuf::from("/unftp"), AuthMethod::WorkloadIdentity(None));
Object Safety§
This trait is not object safe.