pub struct GcsConfig {
pub project_id: Option<String>,
pub endpoint: Option<String>,
pub user_project: Option<String>,
pub credential: Option<String>,
pub token: Option<String>,
pub allow_anonymous: bool,
pub disable_vm_metadata: bool,
pub disable_config_load: bool,
}Expand description
Google Cloud Storage configuration.
This struct contains all the configuration options for connecting to Google Cloud Storage.
Use the builder pattern via GcsConfig::builder() to construct instances.
Fields§
§project_id: Option<String>Google Cloud Project ID.
endpoint: Option<String>GCS service endpoint.
user_project: Option<String>User project for requester pays buckets.
credential: Option<String>Credentials JSON (base64 encoded).
token: Option<String>OAuth2 token.
allow_anonymous: boolAllow anonymous access.
disable_vm_metadata: boolDisable VM metadata.
disable_config_load: boolDisable config load.
Implementations§
Source§impl GcsConfig
impl GcsConfig
Sourcepub fn builder() -> GcsConfigBuilder<((), (), (), (), (), (), (), ())>
pub fn builder() -> GcsConfigBuilder<((), (), (), (), (), (), (), ())>
Create a builder for building GcsConfig.
On the builder, call .project_id(...)(optional), .endpoint(...)(optional), .user_project(...)(optional), .credential(...)(optional), .token(...)(optional), .allow_anonymous(...)(optional), .disable_vm_metadata(...)(optional), .disable_config_load(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of GcsConfig.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for GcsConfig
impl<'de> Deserialize<'de> for GcsConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl TryFrom<&StorageConfig> for GcsConfig
impl TryFrom<&StorageConfig> for GcsConfig
impl Eq for GcsConfig
impl StructuralPartialEq for GcsConfig
Auto Trait Implementations§
impl Freeze for GcsConfig
impl RefUnwindSafe for GcsConfig
impl Send for GcsConfig
impl Sync for GcsConfig
impl Unpin for GcsConfig
impl UnwindSafe for GcsConfig
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read moreSource§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: AsAny + ?Sized,
impl<T> Downcast for Twhere
T: AsAny + ?Sized,
§fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
Any.§fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
Any.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more