pub enum RwsEnv {
Dev,
Test,
Prod,
}Available on non-WebAssembly only.
Expand description
The environment kind named by RWS_ENV.
Variants§
Dev
RWS_ENV=dev (or development): a developer’s machine.
Test
RWS_ENV=test: an automated test run.
Prod
RWS_ENV=prod (or production), unset, or anything else.
Implementations§
Source§impl RwsEnv
impl RwsEnv
Sourcepub const VAR: &'static str = "RWS_ENV"
pub const VAR: &'static str = "RWS_ENV"
The environment variable read by RwsEnv::current.
Sourcepub fn current() -> RwsEnv
pub fn current() -> RwsEnv
RWS_ENV as it is now; unset or unrecognised is RwsEnv::Prod,
so nothing is opened up by a typo.
Sourcepub fn parse(value: &str) -> Option<RwsEnv>
pub fn parse(value: &str) -> Option<RwsEnv>
dev/development, test, prod/production (case-insensitive,
surrounding spaces ignored); None for anything else.
Sourcepub fn is_dev(self) -> bool
pub fn is_dev(self) -> bool
true for RwsEnv::Dev.
Trait Implementations§
impl Copy for RwsEnv
impl Eq for RwsEnv
impl StructuralPartialEq for RwsEnv
Auto Trait Implementations§
impl Freeze for RwsEnv
impl RefUnwindSafe for RwsEnv
impl Send for RwsEnv
impl Sync for RwsEnv
impl Unpin for RwsEnv
impl UnsafeUnpin for RwsEnv
impl UnwindSafe for RwsEnv
Blanket Implementations§
Source§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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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> 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> ⓘ
Converts
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> ⓘ
Converts
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> ServiceExt for T
impl<T> ServiceExt for T
Source§fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
Available on crate feature
map-response-body only.Apply a transformation to the response body. Read more
Source§fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
Available on crate feature
trace only.High level tracing that classifies responses using HTTP status codes. Read more
Source§fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
Available on crate feature
trace only.High level tracing that classifies responses using gRPC headers. Read more