Struct acme_gateways::Gateway
source · pub struct Gateway {
pub cnf: GatewayConfig,
}Fields§
§cnf: GatewayConfigImplementations§
source§impl Gateway
impl Gateway
sourcepub fn new(creds: GatewayCreds, region: S3Region) -> Self
pub fn new(creds: GatewayCreds, region: S3Region) -> Self
sourcepub fn credentials(&self) -> Credentials
pub fn credentials(&self) -> Credentials
Examples found in repository?
src/gateway.rs (line 37)
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
pub fn bucket(&self, name: &str) -> Result<Bucket, S3Error> {
Bucket::new(name, self.region(), self.credentials())
}
}
impl From<&S3Region> for Gateway {
fn from(value: &S3Region) -> Self {
Self::new(Default::default(), value.clone())
}
}
impl From<&Gateway> for Credentials {
fn from(value: &Gateway) -> Self {
value.credentials()
}sourcepub fn region(&self) -> Region
pub fn region(&self) -> Region
Examples found in repository?
src/gateway.rs (line 37)
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
pub fn bucket(&self, name: &str) -> Result<Bucket, S3Error> {
Bucket::new(name, self.region(), self.credentials())
}
}
impl From<&S3Region> for Gateway {
fn from(value: &S3Region) -> Self {
Self::new(Default::default(), value.clone())
}
}
impl From<&Gateway> for Credentials {
fn from(value: &Gateway) -> Self {
value.credentials()
}
}
impl From<&Gateway> for Region {
fn from(value: &Gateway) -> Self {
value.region()
}Trait Implementations§
source§impl<'de> Deserialize<'de> for Gateway
impl<'de> Deserialize<'de> for Gateway
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Gateway
impl StructuralEq for Gateway
impl StructuralPartialEq for Gateway
Auto Trait Implementations§
impl RefUnwindSafe for Gateway
impl Send for Gateway
impl Sync for Gateway
impl Unpin for Gateway
impl UnwindSafe for Gateway
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.