Struct scratchstack_aws_principal::Service
source · [−]pub struct Service { /* private fields */ }
Expand description
Details about a service.
Implementations
sourceimpl Service
impl Service
sourcepub fn new(
service_name: &str,
region: Option<String>,
dns_suffix: &str
) -> Result<Self, PrincipalError>
pub fn new(
service_name: &str,
region: Option<String>,
dns_suffix: &str
) -> Result<Self, PrincipalError>
Create a Service object representing an AWS(-ish) service.
Arguments
service_name
: The name of the service. This must meet the following requirements or a PrincipalError::InvalidService error will be returned:- The name must contain between 1 and 32 characters.
- The name must be composed to ASCII alphanumeric characters or one of
, - . = @ _
.
region
: The region the service is running in. If None, the service is global.dns_suffix
: The DNS suffix of the service. This is usually amazonaws.com.
If all of the requirements are met, a Service object is returned. Otherwise, a PrincipalError error is returned.
pub fn service_name(&self) -> &str
pub fn region(&self) -> Option<&str>
pub fn dns_suffix(&self) -> &str
Trait Implementations
sourceimpl From<Service> for PrincipalIdentity
impl From<Service> for PrincipalIdentity
sourceimpl Ord for Service
impl Ord for Service
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialOrd<Service> for Service
impl PartialOrd<Service> for Service
sourcefn partial_cmp(&self, other: &Service) -> Option<Ordering>
fn partial_cmp(&self, other: &Service) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for Service
impl StructuralEq for Service
impl StructuralPartialEq for Service
Auto Trait Implementations
impl RefUnwindSafe for Service
impl Send for Service
impl Sync for Service
impl Unpin for Service
impl UnwindSafe for Service
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more