pub struct TestCaseConfigBuilder<S: State = Empty> { /* private fields */ }Expand description
Use builder syntax to set the inputs and finish with build_internal().
Implementations§
Source§impl<S: State> TestCaseConfigBuilder<S>
impl<S: State> TestCaseConfigBuilder<S>
Sourcepub fn settings(self, value: Settings) -> TestCaseConfigBuilder<SetSettings<S>>where
S::Settings: IsUnset,
pub fn settings(self, value: Settings) -> TestCaseConfigBuilder<SetSettings<S>>where
S::Settings: IsUnset,
Sourcepub fn maybe_settings(
self,
value: Option<Settings>,
) -> TestCaseConfigBuilder<SetSettings<S>>where
S::Settings: IsUnset,
pub fn maybe_settings(
self,
value: Option<Settings>,
) -> TestCaseConfigBuilder<SetSettings<S>>where
S::Settings: IsUnset,
Sourcepub fn description(
self,
value: impl Into<String>,
) -> TestCaseConfigBuilder<SetDescription<S>>where
S::Description: IsUnset,
pub fn description(
self,
value: impl Into<String>,
) -> TestCaseConfigBuilder<SetDescription<S>>where
S::Description: IsUnset,
Optional (Some / Option setters). The description of the test case. If not provided, will be extracted from the name of the current thread, which is based on the test case name.
This is particularly useful when using insta together with rstest.
See: https://insta.rs/docs/patterns/
§Examples
§TestCase description for rstest cases
#[cfg(test)]
mod tests {
use insta::assert_snapshot;
use rstest::{fixture, rstest};
use roadster::testing::snapshot::TestCase;
#[fixture]
fn case() -> TestCase {
Default::default()
}
#[rstest]
#[case(0)] // _case.description == case_1
#[case::foo(0)] // _case.description == foo
fn test(_case: TestCase, #[case] num: u32) {
// Snapshot file name will have suffix of `@{_case.description}`, e.g. `@case_1`
assert_snapshot!(num);
}
}§TestCase with manually set description
#[cfg(test)]
mod tests {
use insta::assert_snapshot;
use roadster::testing::snapshot::{TestCase, TestCaseConfig};
#[test]
fn test() {
let _case = TestCaseConfig::builder().description("Custom description").build();
// Snapshot file name will have suffix of `@Custom description`
assert_snapshot!("snapshot_value");
}
}Sourcepub fn maybe_description(
self,
value: Option<impl Into<String>>,
) -> TestCaseConfigBuilder<SetDescription<S>>where
S::Description: IsUnset,
pub fn maybe_description(
self,
value: Option<impl Into<String>>,
) -> TestCaseConfigBuilder<SetDescription<S>>where
S::Description: IsUnset,
Optional (Some / Option setters). The description of the test case. If not provided, will be extracted from the name of the current thread, which is based on the test case name.
This is particularly useful when using insta together with rstest.
See: https://insta.rs/docs/patterns/
§Examples
§TestCase description for rstest cases
#[cfg(test)]
mod tests {
use insta::assert_snapshot;
use rstest::{fixture, rstest};
use roadster::testing::snapshot::TestCase;
#[fixture]
fn case() -> TestCase {
Default::default()
}
#[rstest]
#[case(0)] // _case.description == case_1
#[case::foo(0)] // _case.description == foo
fn test(_case: TestCase, #[case] num: u32) {
// Snapshot file name will have suffix of `@{_case.description}`, e.g. `@case_1`
assert_snapshot!(num);
}
}§TestCase with manually set description
#[cfg(test)]
mod tests {
use insta::assert_snapshot;
use roadster::testing::snapshot::{TestCase, TestCaseConfig};
#[test]
fn test() {
let _case = TestCaseConfig::builder().description("Custom description").build();
// Snapshot file name will have suffix of `@Custom description`
assert_snapshot!("snapshot_value");
}
}Sourcepub fn set_suffix(self, value: bool) -> TestCaseConfigBuilder<SetSetSuffix<S>>where
S::SetSuffix: IsUnset,
pub fn set_suffix(self, value: bool) -> TestCaseConfigBuilder<SetSetSuffix<S>>where
S::SetSuffix: IsUnset,
Optional (Some / Option setters).
Default: true.
Whether to set the description as the suffix of the snapshot file.
It is particularly useful to set this to true when using insta together with rstest.
See: https://insta.rs/docs/patterns/
Sourcepub fn maybe_set_suffix(
self,
value: Option<bool>,
) -> TestCaseConfigBuilder<SetSetSuffix<S>>where
S::SetSuffix: IsUnset,
pub fn maybe_set_suffix(
self,
value: Option<bool>,
) -> TestCaseConfigBuilder<SetSetSuffix<S>>where
S::SetSuffix: IsUnset,
Optional (Some / Option setters).
Default: true.
Whether to set the description as the suffix of the snapshot file.
It is particularly useful to set this to true when using insta together with rstest.
See: https://insta.rs/docs/patterns/
Sourcepub fn redact_uuid(self, value: bool) -> TestCaseConfigBuilder<SetRedactUuid<S>>where
S::RedactUuid: IsUnset,
pub fn redact_uuid(self, value: bool) -> TestCaseConfigBuilder<SetRedactUuid<S>>where
S::RedactUuid: IsUnset,
Sourcepub fn maybe_redact_uuid(
self,
value: Option<bool>,
) -> TestCaseConfigBuilder<SetRedactUuid<S>>where
S::RedactUuid: IsUnset,
pub fn maybe_redact_uuid(
self,
value: Option<bool>,
) -> TestCaseConfigBuilder<SetRedactUuid<S>>where
S::RedactUuid: IsUnset,
Sourcepub fn redact_auth_tokens(
self,
value: bool,
) -> TestCaseConfigBuilder<SetRedactAuthTokens<S>>where
S::RedactAuthTokens: IsUnset,
pub fn redact_auth_tokens(
self,
value: bool,
) -> TestCaseConfigBuilder<SetRedactAuthTokens<S>>where
S::RedactAuthTokens: IsUnset,
Sourcepub fn maybe_redact_auth_tokens(
self,
value: Option<bool>,
) -> TestCaseConfigBuilder<SetRedactAuthTokens<S>>where
S::RedactAuthTokens: IsUnset,
pub fn maybe_redact_auth_tokens(
self,
value: Option<bool>,
) -> TestCaseConfigBuilder<SetRedactAuthTokens<S>>where
S::RedactAuthTokens: IsUnset,
Sourcepub fn redact_postgres_uri(
self,
value: bool,
) -> TestCaseConfigBuilder<SetRedactPostgresUri<S>>where
S::RedactPostgresUri: IsUnset,
pub fn redact_postgres_uri(
self,
value: bool,
) -> TestCaseConfigBuilder<SetRedactPostgresUri<S>>where
S::RedactPostgresUri: IsUnset,
Sourcepub fn maybe_redact_postgres_uri(
self,
value: Option<bool>,
) -> TestCaseConfigBuilder<SetRedactPostgresUri<S>>where
S::RedactPostgresUri: IsUnset,
pub fn maybe_redact_postgres_uri(
self,
value: Option<bool>,
) -> TestCaseConfigBuilder<SetRedactPostgresUri<S>>where
S::RedactPostgresUri: IsUnset,
Sourcepub fn redact_mysql_uri(
self,
value: bool,
) -> TestCaseConfigBuilder<SetRedactMysqlUri<S>>where
S::RedactMysqlUri: IsUnset,
pub fn redact_mysql_uri(
self,
value: bool,
) -> TestCaseConfigBuilder<SetRedactMysqlUri<S>>where
S::RedactMysqlUri: IsUnset,
Sourcepub fn maybe_redact_mysql_uri(
self,
value: Option<bool>,
) -> TestCaseConfigBuilder<SetRedactMysqlUri<S>>where
S::RedactMysqlUri: IsUnset,
pub fn maybe_redact_mysql_uri(
self,
value: Option<bool>,
) -> TestCaseConfigBuilder<SetRedactMysqlUri<S>>where
S::RedactMysqlUri: IsUnset,
Sourcepub fn redact_redis_uri(
self,
value: bool,
) -> TestCaseConfigBuilder<SetRedactRedisUri<S>>where
S::RedactRedisUri: IsUnset,
pub fn redact_redis_uri(
self,
value: bool,
) -> TestCaseConfigBuilder<SetRedactRedisUri<S>>where
S::RedactRedisUri: IsUnset,
Sourcepub fn maybe_redact_redis_uri(
self,
value: Option<bool>,
) -> TestCaseConfigBuilder<SetRedactRedisUri<S>>where
S::RedactRedisUri: IsUnset,
pub fn maybe_redact_redis_uri(
self,
value: Option<bool>,
) -> TestCaseConfigBuilder<SetRedactRedisUri<S>>where
S::RedactRedisUri: IsUnset,
Sourcepub fn redact_smtp_uri(
self,
value: bool,
) -> TestCaseConfigBuilder<SetRedactSmtpUri<S>>where
S::RedactSmtpUri: IsUnset,
pub fn redact_smtp_uri(
self,
value: bool,
) -> TestCaseConfigBuilder<SetRedactSmtpUri<S>>where
S::RedactSmtpUri: IsUnset,
Sourcepub fn maybe_redact_smtp_uri(
self,
value: Option<bool>,
) -> TestCaseConfigBuilder<SetRedactSmtpUri<S>>where
S::RedactSmtpUri: IsUnset,
pub fn maybe_redact_smtp_uri(
self,
value: Option<bool>,
) -> TestCaseConfigBuilder<SetRedactSmtpUri<S>>where
S::RedactSmtpUri: IsUnset,
Sourcepub fn redact_timestamp(
self,
value: bool,
) -> TestCaseConfigBuilder<SetRedactTimestamp<S>>where
S::RedactTimestamp: IsUnset,
pub fn redact_timestamp(
self,
value: bool,
) -> TestCaseConfigBuilder<SetRedactTimestamp<S>>where
S::RedactTimestamp: IsUnset,
Sourcepub fn maybe_redact_timestamp(
self,
value: Option<bool>,
) -> TestCaseConfigBuilder<SetRedactTimestamp<S>>where
S::RedactTimestamp: IsUnset,
pub fn maybe_redact_timestamp(
self,
value: Option<bool>,
) -> TestCaseConfigBuilder<SetRedactTimestamp<S>>where
S::RedactTimestamp: IsUnset,
Sourcepub fn bind_scope(self, value: bool) -> TestCaseConfigBuilder<SetBindScope<S>>where
S::BindScope: IsUnset,
pub fn bind_scope(self, value: bool) -> TestCaseConfigBuilder<SetBindScope<S>>where
S::BindScope: IsUnset,
Optional (Some / Option setters).
Default: true.
Whether to automatically bind the Settings to the current scope. If true, the settings
will be automatically applied for the test in which the TestCase was built. If false,
the settings will only be applied after manually calling Settings::bind_to_scope, or
placing all relevant snapshot assertions inside a Settings::bind call.
§Examples
§Auto bind to scope
#[cfg(test)]
mod tests {
use insta::assert_snapshot;
use roadster::testing::snapshot::{TestCase, TestCaseConfig};
#[test]
fn test() {
let _case = TestCaseConfig::builder().description("Custom description").build();
// Snapshot file name will have suffix of `@Custom description`
assert_snapshot!("snapshot_value");
}
}§Manually bind Settings scope
#[cfg(test)]
mod tests {
use insta::assert_snapshot;
use roadster::testing::snapshot::{TestCase, TestCaseConfig};
#[test]
fn test() {
let case = TestCaseConfig::builder().bind_scope(false).build();
// This snapshot will not have a suffix
assert_snapshot!("snapshot_value");
case.settings.bind(|| {
// This snapshot will have suffix `@test` (extracted from the curren thread name)
assert_snapshot!("snapshot_value_2");
});
}
}Sourcepub fn maybe_bind_scope(
self,
value: Option<bool>,
) -> TestCaseConfigBuilder<SetBindScope<S>>where
S::BindScope: IsUnset,
pub fn maybe_bind_scope(
self,
value: Option<bool>,
) -> TestCaseConfigBuilder<SetBindScope<S>>where
S::BindScope: IsUnset,
Optional (Some / Option setters).
Default: true.
Whether to automatically bind the Settings to the current scope. If true, the settings
will be automatically applied for the test in which the TestCase was built. If false,
the settings will only be applied after manually calling Settings::bind_to_scope, or
placing all relevant snapshot assertions inside a Settings::bind call.
§Examples
§Auto bind to scope
#[cfg(test)]
mod tests {
use insta::assert_snapshot;
use roadster::testing::snapshot::{TestCase, TestCaseConfig};
#[test]
fn test() {
let _case = TestCaseConfig::builder().description("Custom description").build();
// Snapshot file name will have suffix of `@Custom description`
assert_snapshot!("snapshot_value");
}
}§Manually bind Settings scope
#[cfg(test)]
mod tests {
use insta::assert_snapshot;
use roadster::testing::snapshot::{TestCase, TestCaseConfig};
#[test]
fn test() {
let case = TestCaseConfig::builder().bind_scope(false).build();
// This snapshot will not have a suffix
assert_snapshot!("snapshot_value");
case.settings.bind(|| {
// This snapshot will have suffix `@test` (extracted from the curren thread name)
assert_snapshot!("snapshot_value_2");
});
}
}Auto Trait Implementations§
impl<S = Empty> !RefUnwindSafe for TestCaseConfigBuilder<S>
impl<S = Empty> !UnwindSafe for TestCaseConfigBuilder<S>
impl<S> Freeze for TestCaseConfigBuilder<S>
impl<S> Send for TestCaseConfigBuilder<S>
impl<S> Sync for TestCaseConfigBuilder<S>
impl<S> Unpin for TestCaseConfigBuilder<S>
impl<S> UnsafeUnpin for TestCaseConfigBuilder<S>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> 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 moreSource§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>
T in a tonic::RequestSource§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
type Err = Infallible
fn into_result(self) -> Result<T, <T as IntoResult<T>>::Err>
Source§impl<T> IntoSql for T
impl<T> IntoSql for T
Source§fn into_sql<T>(self) -> Self::Expression
fn into_sql<T>(self) -> Self::Expression
self to an expression for Diesel’s query builder. Read moreSource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
&self to an expression for Diesel’s query builder. Read moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T, Conn> RunQueryDsl<Conn> for T
impl<T, Conn> RunQueryDsl<Conn> for T
Source§fn execute<'conn, 'query>(
self,
conn: &'conn mut Conn,
) -> <Conn as AsyncConnection>::ExecuteFuture<'conn, 'query>
fn execute<'conn, 'query>( self, conn: &'conn mut Conn, ) -> <Conn as AsyncConnection>::ExecuteFuture<'conn, 'query>
Source§fn load<'query, 'conn, U>(
self,
conn: &'conn mut Conn,
) -> AndThen<Self::LoadFuture<'conn>, TryCollect<Self::Stream<'conn>, Vec<U>>, fn(Self::Stream<'conn>) -> TryCollect<Self::Stream<'conn>, Vec<U>>>
fn load<'query, 'conn, U>( self, conn: &'conn mut Conn, ) -> AndThen<Self::LoadFuture<'conn>, TryCollect<Self::Stream<'conn>, Vec<U>>, fn(Self::Stream<'conn>) -> TryCollect<Self::Stream<'conn>, Vec<U>>>
Source§fn load_stream<'conn, 'query, U>(
self,
conn: &'conn mut Conn,
) -> Self::LoadFuture<'conn>where
Conn: AsyncConnection,
U: 'conn,
Self: LoadQuery<'query, Conn, U> + 'query,
fn load_stream<'conn, 'query, U>(
self,
conn: &'conn mut Conn,
) -> Self::LoadFuture<'conn>where
Conn: AsyncConnection,
U: 'conn,
Self: LoadQuery<'query, Conn, U> + 'query,
Source§fn get_result<'query, 'conn, U>(
self,
conn: &'conn mut Conn,
) -> AndThen<Self::LoadFuture<'conn>, Map<StreamFuture<Pin<Box<Self::Stream<'conn>>>>, fn((Option<Result<U, Error>>, Pin<Box<Self::Stream<'conn>>>)) -> Result<U, Error>>, fn(Self::Stream<'conn>) -> Map<StreamFuture<Pin<Box<Self::Stream<'conn>>>>, fn((Option<Result<U, Error>>, Pin<Box<Self::Stream<'conn>>>)) -> Result<U, Error>>>
fn get_result<'query, 'conn, U>( self, conn: &'conn mut Conn, ) -> AndThen<Self::LoadFuture<'conn>, Map<StreamFuture<Pin<Box<Self::Stream<'conn>>>>, fn((Option<Result<U, Error>>, Pin<Box<Self::Stream<'conn>>>)) -> Result<U, Error>>, fn(Self::Stream<'conn>) -> Map<StreamFuture<Pin<Box<Self::Stream<'conn>>>>, fn((Option<Result<U, Error>>, Pin<Box<Self::Stream<'conn>>>)) -> Result<U, Error>>>
Source§fn get_results<'query, 'conn, U>(
self,
conn: &'conn mut Conn,
) -> AndThen<Self::LoadFuture<'conn>, TryCollect<Self::Stream<'conn>, Vec<U>>, fn(Self::Stream<'conn>) -> TryCollect<Self::Stream<'conn>, Vec<U>>>
fn get_results<'query, 'conn, U>( self, conn: &'conn mut Conn, ) -> AndThen<Self::LoadFuture<'conn>, TryCollect<Self::Stream<'conn>, Vec<U>>, fn(Self::Stream<'conn>) -> TryCollect<Self::Stream<'conn>, Vec<U>>>
Vec with the affected rows. Read moreSource§fn first<'query, 'conn, U>(
self,
conn: &'conn mut Conn,
) -> AndThen<<Self::Output as LoadQuery<'query, Conn, U>>::LoadFuture<'conn>, Map<StreamFuture<Pin<Box<<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>>>>, fn((Option<Result<U, Error>>, Pin<Box<<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>>>)) -> Result<U, Error>>, fn(<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>) -> Map<StreamFuture<Pin<Box<<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>>>>, fn((Option<Result<U, Error>>, Pin<Box<<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>>>)) -> Result<U, Error>>>
fn first<'query, 'conn, U>( self, conn: &'conn mut Conn, ) -> AndThen<<Self::Output as LoadQuery<'query, Conn, U>>::LoadFuture<'conn>, Map<StreamFuture<Pin<Box<<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>>>>, fn((Option<Result<U, Error>>, Pin<Box<<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>>>)) -> Result<U, Error>>, fn(<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>) -> Map<StreamFuture<Pin<Box<<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>>>>, fn((Option<Result<U, Error>>, Pin<Box<<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>>>)) -> Result<U, Error>>>
Source§impl<T> ServiceExt for T
impl<T> ServiceExt for T
Source§fn compression(self) -> Compression<Self>where
Self: Sized,
fn compression(self) -> Compression<Self>where
Self: Sized,
Source§fn decompression(self) -> Decompression<Self>where
Self: Sized,
fn decompression(self) -> Decompression<Self>where
Self: Sized,
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,
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,
Source§fn follow_redirects(self) -> FollowRedirect<Self>where
Self: Sized,
fn follow_redirects(self) -> FollowRedirect<Self>where
Self: Sized,
Source§fn sensitive_headers(
self,
headers: impl IntoIterator<Item = HeaderName>,
) -> SetSensitiveRequestHeaders<SetSensitiveResponseHeaders<Self>>where
Self: Sized,
fn sensitive_headers(
self,
headers: impl IntoIterator<Item = HeaderName>,
) -> SetSensitiveRequestHeaders<SetSensitiveResponseHeaders<Self>>where
Self: Sized,
Source§fn sensitive_request_headers(
self,
headers: impl IntoIterator<Item = HeaderName>,
) -> SetSensitiveRequestHeaders<Self>where
Self: Sized,
fn sensitive_request_headers(
self,
headers: impl IntoIterator<Item = HeaderName>,
) -> SetSensitiveRequestHeaders<Self>where
Self: Sized,
Source§fn sensitive_response_headers(
self,
headers: impl IntoIterator<Item = HeaderName>,
) -> SetSensitiveResponseHeaders<Self>where
Self: Sized,
fn sensitive_response_headers(
self,
headers: impl IntoIterator<Item = HeaderName>,
) -> SetSensitiveResponseHeaders<Self>where
Self: Sized,
Source§fn override_request_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetRequestHeader<Self, M>where
Self: Sized,
fn override_request_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetRequestHeader<Self, M>where
Self: Sized,
Source§fn append_request_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetRequestHeader<Self, M>where
Self: Sized,
fn append_request_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetRequestHeader<Self, M>where
Self: Sized,
Source§fn insert_request_header_if_not_present<M>(
self,
header_name: HeaderName,
make: M,
) -> SetRequestHeader<Self, M>where
Self: Sized,
fn insert_request_header_if_not_present<M>(
self,
header_name: HeaderName,
make: M,
) -> SetRequestHeader<Self, M>where
Self: Sized,
Source§fn override_response_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetResponseHeader<Self, M>where
Self: Sized,
fn override_response_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetResponseHeader<Self, M>where
Self: Sized,
Source§fn append_response_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetResponseHeader<Self, M>where
Self: Sized,
fn append_response_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetResponseHeader<Self, M>where
Self: Sized,
Source§fn insert_response_header_if_not_present<M>(
self,
header_name: HeaderName,
make: M,
) -> SetResponseHeader<Self, M>where
Self: Sized,
fn insert_response_header_if_not_present<M>(
self,
header_name: HeaderName,
make: M,
) -> SetResponseHeader<Self, M>where
Self: Sized,
Source§fn set_request_id<M>(
self,
header_name: HeaderName,
make_request_id: M,
) -> SetRequestId<Self, M>where
Self: Sized,
M: MakeRequestId,
fn set_request_id<M>(
self,
header_name: HeaderName,
make_request_id: M,
) -> SetRequestId<Self, M>where
Self: Sized,
M: MakeRequestId,
Source§fn set_x_request_id<M>(self, make_request_id: M) -> SetRequestId<Self, M>where
Self: Sized,
M: MakeRequestId,
fn set_x_request_id<M>(self, make_request_id: M) -> SetRequestId<Self, M>where
Self: Sized,
M: MakeRequestId,
x-request-id as the header name. Read moreSource§fn propagate_request_id(
self,
header_name: HeaderName,
) -> PropagateRequestId<Self>where
Self: Sized,
fn propagate_request_id(
self,
header_name: HeaderName,
) -> PropagateRequestId<Self>where
Self: Sized,
Source§fn propagate_x_request_id(self) -> PropagateRequestId<Self>where
Self: Sized,
fn propagate_x_request_id(self) -> PropagateRequestId<Self>where
Self: Sized,
x-request-id as the header name. Read moreSource§fn catch_panic(self) -> CatchPanic<Self, DefaultResponseForPanic>where
Self: Sized,
fn catch_panic(self) -> CatchPanic<Self, DefaultResponseForPanic>where
Self: Sized,
500 Internal Server responses. Read moreSource§fn request_body_limit(self, limit: usize) -> RequestBodyLimit<Self>where
Self: Sized,
fn request_body_limit(self, limit: usize) -> RequestBodyLimit<Self>where
Self: Sized,
413 Payload Too Large responses. Read more