Struct mz_sql::catalog::EnvironmentId
source · pub struct EnvironmentId {
cloud_provider: CloudProvider,
cloud_provider_region: String,
organization_id: Uuid,
ordinal: u64,
}
Expand description
Identifies an environment.
Outside of tests, an environment ID can be constructed only from a string of the following form:
<CLOUD PROVIDER>-<CLOUD PROVIDER REGION>-<ORGANIZATION ID>-<ORDINAL>
The fields have the following formats:
- The cloud provider consists of one or more alphanumeric characters.
- The cloud provider region consists of one or more alphanumeric or hyphen characters.
- The organization ID is a UUID in its canonical text format.
- The ordinal is a decimal number with between one and eight digits.
There is no way to construct an environment ID from parts, to ensure that
the Display
representation is parseable according to the above rules.
Fields§
§cloud_provider: CloudProvider
§cloud_provider_region: String
§organization_id: Uuid
§ordinal: u64
Implementations§
source§impl EnvironmentId
impl EnvironmentId
sourcepub fn for_tests() -> EnvironmentId
pub fn for_tests() -> EnvironmentId
Creates a dummy EnvironmentId
for use in tests.
sourcepub fn cloud_provider(&self) -> &CloudProvider
pub fn cloud_provider(&self) -> &CloudProvider
Returns the cloud provider associated with this environment ID.
sourcepub fn cloud_provider_region(&self) -> &str
pub fn cloud_provider_region(&self) -> &str
Returns the cloud provider region associated with this environment ID.
sourcepub fn organization_id(&self) -> Uuid
pub fn organization_id(&self) -> Uuid
Returns the organization ID associated with this environment ID.
Trait Implementations§
source§impl Clone for EnvironmentId
impl Clone for EnvironmentId
source§fn clone(&self) -> EnvironmentId
fn clone(&self) -> EnvironmentId
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for EnvironmentId
impl Debug for EnvironmentId
source§impl Display for EnvironmentId
impl Display for EnvironmentId
source§impl FromStr for EnvironmentId
impl FromStr for EnvironmentId
§type Err = InvalidEnvironmentIdError
type Err = InvalidEnvironmentIdError
The associated error which can be returned from parsing.
source§fn from_str(s: &str) -> Result<EnvironmentId, InvalidEnvironmentIdError>
fn from_str(s: &str) -> Result<EnvironmentId, InvalidEnvironmentIdError>
Parses a string
s
to return a value of this type. Read moresource§impl PartialEq<EnvironmentId> for EnvironmentId
impl PartialEq<EnvironmentId> for EnvironmentId
source§fn eq(&self, other: &EnvironmentId) -> bool
fn eq(&self, other: &EnvironmentId) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for EnvironmentId
Auto Trait Implementations§
impl RefUnwindSafe for EnvironmentId
impl Send for EnvironmentId
impl Sync for EnvironmentId
impl Unpin for EnvironmentId
impl UnwindSafe for EnvironmentId
Blanket Implementations§
source§impl<T> DisplayExt for Twhere
T: Display,
impl<T> DisplayExt for Twhere
T: Display,
source§fn to_string_alt(&self) -> String
fn to_string_alt(&self) -> String
Formats an object with the “alternative” format (
{:#}
) and returns it.source§impl<T> FutureExt for T
impl<T> FutureExt for T
source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request
source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<P, R> ProtoType<R> for Pwhere
R: RustType<P>,
impl<P, R> ProtoType<R> for Pwhere
R: RustType<P>,
source§fn into_rust(self) -> Result<R, TryFromProtoError>
fn into_rust(self) -> Result<R, TryFromProtoError>
See
RustType::from_proto
.source§fn from_rust(rust: &R) -> P
fn from_rust(rust: &R) -> P
See
RustType::into_proto
.