pub struct Service {
keypair: Box<Ed25519KeyPair>,
verify_keys: VerifyKeys,
minimum_valid: Duration,
services: Arc<OnceServices>,
db: Data,
}Expand description
Manages the local signing identity and cached remote verification keys.
Cached keys are retained by key ID without enforcing valid_until_ts on
reads. Missing keys can be acquired from remote origins or trusted notaries.
Fields§
§keypair: Box<Ed25519KeyPair>§verify_keys: VerifyKeys§minimum_valid: Duration§services: Arc<OnceServices>§db: DataImplementations§
Source§impl Service
impl Service
Sourcepub async fn acquire_events_pubkeys<'a, I>(&self, events: I)
pub async fn acquire_events_pubkeys<'a, I>(&self, events: I)
Acquires the signing keys referenced by a collection of raw events.
Signature maps are grouped and deduplicated before acquisition. Events with malformed JSON or unreadable signature fields are silently skipped.
Source§impl Service
impl Service
Sourcepub async fn acquire_pubkeys<'a, S, K>(&self, batch: S)
pub async fn acquire_pubkeys<'a, S, K>(&self, batch: S)
Best-effort acquires a batch of server signing keys into the local cache.
Local storage is checked first, then origins and trusted notaries are tried according to configuration. The method returns no status; keys still missing after all allowed sources are logged.
Source§impl Service
impl Service
async fn acquire_origin( &self, origin: OwnedServerName, key_ids: Vec<OwnedServerSigningKeyId>, timeout: Instant, ) -> (OwnedServerName, Vec<OwnedServerSigningKeyId>)
Source§impl Service
impl Service
async fn acquire_notary_result( &self, missing: &mut BTreeMap<OwnedServerName, Vec<OwnedServerSigningKeyId>>, server_keys: ServerSigningKeys, )
Source§impl Service
impl Service
Sourcepub async fn get_event_keys(
&self,
object: &CanonicalJsonObject,
version: &RoomVersionRules,
) -> Result<PubKeyMap>
pub async fn get_event_keys( &self, object: &CanonicalJsonObject, version: &RoomVersionRules, ) -> Result<PubKeyMap>
Resolves the public keys required to verify an event.
Invalid signature metadata returns an error. Fetch failures for individual keys are omitted, so a successful result can still be a partial key map.
Source§impl Service
impl Service
Sourcepub async fn get_pubkeys<'a, S, K>(&self, batch: S) -> PubKeyMap
pub async fn get_pubkeys<'a, S, K>(&self, batch: S) -> PubKeyMap
Resolves public-key sets for a batch of servers and key IDs.
Every requested server is inserted, even when its key set is empty.
Individual key errors are suppressed by Self::get_pubkeys_for.
Source§impl Service
impl Service
Sourcepub async fn get_pubkeys_for<'a, I>(
&self,
origin: &ServerName,
key_ids: I,
) -> PubKeys
pub async fn get_pubkeys_for<'a, I>( &self, origin: &ServerName, key_ids: I, ) -> PubKeys
Resolves the requested public keys for one server.
Keys that cannot be loaded or fetched are omitted, making the returned set intentionally partial rather than failing the whole request.
Source§impl Service
impl Service
Sourcepub async fn get_verify_key(
&self,
origin: &ServerName,
key_id: &ServerSigningKeyId,
) -> Result<VerifyKey>
pub async fn get_verify_key( &self, origin: &ServerName, key_id: &ServerSigningKeyId, ) -> Result<VerifyKey>
Retrieves one current or retired verify key for a server.
The cache is checked first. Trusted notaries and the origin are then queried in configured order, with origin requests disabled in notary-only mode.
Source§impl Service
impl Service
async fn get_verify_key_from_notaries( &self, origin: &ServerName, key_id: &ServerSigningKeyId, ) -> Result<VerifyKey>
Source§impl Service
impl Service
async fn get_verify_key_from_origin( &self, origin: &ServerName, key_id: &ServerSigningKeyId, ) -> Result<VerifyKey>
Source§impl Service
impl Service
Sourcepub(super) async fn batch_notary_request<'a, S, K>(
&self,
notary: &ServerName,
batch: S,
) -> Result<Vec<ServerSigningKeys>>
pub(super) async fn batch_notary_request<'a, S, K>( &self, notary: &ServerName, batch: S, ) -> Result<Vec<ServerSigningKeys>>
Requests a batch of signing-key documents from one trusted notary.
The request is split by configured batch size and concurrency. Malformed individual documents are skipped, while a failed batch aborts the operation.
Source§impl Service
impl Service
Sourcepub async fn notary_request(
&self,
notary: &ServerName,
target: &ServerName,
) -> Result<impl Iterator<Item = ServerSigningKeys> + Clone + Debug + Send + use<>>
pub async fn notary_request( &self, notary: &ServerName, target: &ServerName, ) -> Result<impl Iterator<Item = ServerSigningKeys> + Clone + Debug + Send + use<>>
Requests signing-key documents for one target from a trusted notary.
The query requires the configured minimum validity horizon. Malformed documents in an otherwise successful response are omitted from the iterator.
Source§impl Service
impl Service
Sourcepub async fn server_request(
&self,
target: &ServerName,
) -> Result<ServerSigningKeys>
pub async fn server_request( &self, target: &ServerName, ) -> Result<ServerSigningKeys>
Requests the current signing-key document directly from its origin server.
The response must deserialize and name the requested target; a mismatched
server_name is rejected as a bad server response.
Source§impl Service
impl Service
Sourcepub fn gen_id_hash_and_sign_event(
&self,
object: &mut CanonicalJsonObject,
room_version_id: &RoomVersionId,
) -> Result<OwnedEventId>
pub fn gen_id_hash_and_sign_event( &self, object: &mut CanonicalJsonObject, room_version_id: &RoomVersionId, ) -> Result<OwnedEventId>
Generates an event ID, content hash, and local signature in place.
Any existing event_id is removed first. Legacy room versions generate and
insert the ID before signing; newer versions derive it after signing and then
insert it into the returned object.
Source§impl Service
impl Service
Sourcefn gen_id_hash_and_sign_event_v1(
&self,
object: &mut CanonicalJsonObject,
room_version_id: &RoomVersionId,
) -> Result<OwnedEventId>
fn gen_id_hash_and_sign_event_v1( &self, object: &mut CanonicalJsonObject, room_version_id: &RoomVersionId, ) -> Result<OwnedEventId>
Generates and inserts an event ID before signing a legacy-format event.
The explicit ID participates in the content hash and signature for room versions whose event format requires it.
Source§impl Service
impl Service
Sourcefn gen_id_hash_and_sign_event_v3(
&self,
object: &mut CanonicalJsonObject,
room_version_id: &RoomVersionId,
) -> Result<OwnedEventId>
fn gen_id_hash_and_sign_event_v3( &self, object: &mut CanonicalJsonObject, room_version_id: &RoomVersionId, ) -> Result<OwnedEventId>
Signs a modern-format event before deriving and inserting its event ID.
The derived ID therefore reflects the signed event representation used by room versions that omit an explicit ID during signing.
Source§impl Service
impl Service
Sourcepub fn hash_and_sign_event(
&self,
object: &mut CanonicalJsonObject,
room_version_id: &RoomVersionId,
) -> Result
pub fn hash_and_sign_event( &self, object: &mut CanonicalJsonObject, room_version_id: &RoomVersionId, ) -> Result
Adds a content hash and local server signature to an event object.
Signing uses the room version’s redaction rules. Oversized PDUs are mapped to a request-too-large error and other signing failures to an unknown request error.
Source§impl Service
impl Service
Sourcepub async fn validate_and_add_event_id(
&self,
pdu: &RawJsonValue,
room_version_id: &RoomVersionId,
) -> Result<(OwnedEventId, CanonicalJsonObject)>
pub async fn validate_and_add_event_id( &self, pdu: &RawJsonValue, room_version_id: &RoomVersionId, ) -> Result<(OwnedEventId, CanonicalJsonObject)>
Derives an event ID, runs event verification, and returns canonical JSON.
Missing verification keys may be fetched. Newer room versions receive the
derived event_id after any successful [Verified] result, including the
signatures-only classification produced for a content-hash mismatch.
Source§impl Service
impl Service
Sourcepub async fn validate_and_add_event_id_no_fetch(
&self,
pdu: &RawJsonValue,
room_version_id: &RoomVersionId,
) -> Result<(OwnedEventId, CanonicalJsonObject)>
pub async fn validate_and_add_event_id_no_fetch( &self, pdu: &RawJsonValue, room_version_id: &RoomVersionId, ) -> Result<(OwnedEventId, CanonicalJsonObject)>
Derives and checks an event using only keys already in local storage.
The method rejects the event before verification when any required key is
absent. Any successful [Verified] classification is accepted, including a
signatures-only result after a content-hash mismatch.
Source§impl Service
impl Service
Sourcepub async fn verify_event(
&self,
event: &CanonicalJsonObject,
room_version_id: Option<&RoomVersionId>,
) -> Result<Verified>
pub async fn verify_event( &self, event: &CanonicalJsonObject, room_version_id: Option<&RoomVersionId>, ) -> Result<Verified>
Verifies an event and returns ruma’s verification classification.
Required keys are loaded or fetched through Self::get_event_keys. When
no room version is supplied, version 11 rules are used. Callers must inspect
[Verified] to distinguish complete verification from signatures only.
Source§impl Service
impl Service
Sourcepub async fn verify_json(
&self,
event: &CanonicalJsonObject,
room_version_id: Option<&RoomVersionId>,
) -> Result
pub async fn verify_json( &self, event: &CanonicalJsonObject, room_version_id: Option<&RoomVersionId>, ) -> Result
Verifies signatures on a canonical JSON object.
Unlike Self::verify_event, this does not verify an event content hash.
Version 11 signature rules are used when no room version is supplied.
Source§impl Service
impl Service
Sourcepub fn active_key_id(&self) -> &ServerSigningKeyId
pub fn active_key_id(&self) -> &ServerSigningKeyId
Returns the signing-key ID for the active local verify key.
This delegates to Self::active_verify_key and therefore panics if the
service was initialized without an active key.
Source§impl Service
impl Service
Sourcepub fn active_verify_key(&self) -> (&ServerSigningKeyId, &VerifyKey)
pub fn active_verify_key(&self) -> (&ServerSigningKeyId, &VerifyKey)
Returns the active local signing-key ID and verify key.
Initialization normally supplies exactly one entry. A missing entry panics, and debug builds also assert that no second active key exists.
Source§impl Service
impl Service
Sourceasync fn add_signing_keys(&self, new_keys: ServerSigningKeys)
async fn add_signing_keys(&self, new_keys: ServerSigningKeys)
Merges a fetched signing-key document into the local cache.
Only current and old verify-key maps are retained from the incoming document; its signatures and validity timestamp are not preserved. The read, merge, and write sequence is not atomic.
Source§impl Service
impl Service
Sourcepub async fn required_keys_exist(
&self,
object: &CanonicalJsonObject,
rules: &RoomVersionRules,
) -> bool
pub async fn required_keys_exist( &self, object: &CanonicalJsonObject, rules: &RoomVersionRules, ) -> bool
Checks whether every signature key required by an event is cached.
Invalid signature metadata, database errors, and malformed stored key data
all produce false; this method never fetches missing keys.
Source§impl Service
impl Service
Sourcepub async fn verify_key_exists(
&self,
origin: &ServerName,
key_id: &ServerSigningKeyId,
) -> bool
pub async fn verify_key_exists( &self, origin: &ServerName, key_id: &ServerSigningKeyId, ) -> bool
Checks whether one current or retired verify key is cached for a server.
The check is based on key-ID presence only and does not evaluate the stored
key document’s validity interval. Read or decoding errors produce false.
Source§impl Service
impl Service
Sourcepub async fn verify_keys_for(&self, origin: &ServerName) -> VerifyKeys
pub async fn verify_keys_for(&self, origin: &ServerName) -> VerifyKeys
Returns all cached verify keys usable for a server.
Retired keys are converted and merged with current keys. Storage errors are suppressed to an empty map, and the local active key is added for our names.
Source§impl Service
impl Service
Sourcepub async fn signing_keys_for(
&self,
origin: &ServerName,
) -> Result<ServerSigningKeys>
pub async fn signing_keys_for( &self, origin: &ServerName, ) -> Result<ServerSigningKeys>
Loads the cached signing-key document for a server.
The returned document reflects the service’s merged cache representation;
reads do not enforce valid_until_ts. Acquisition currently preserves key
maps but not incoming document signatures or validity metadata.
Source§impl Service
impl Service
fn minimum_valid_ts(&self) -> MilliSecondsSinceUnixEpoch
Trait Implementations§
Source§impl Service for Service
impl Service for Service
Source§fn build(args: &Args<'_>) -> Result<Arc<Self>>
fn build(args: &Args<'_>) -> Result<Arc<Self>>
Source§fn name(&self) -> &str
fn name(&self) -> &str
crate::service::make_name(std::module_path!())Source§fn worker<'async_trait>(
self: Arc<Self>,
) -> Pin<Box<dyn Future<Output = Result> + Send + 'async_trait>>where
Self: 'async_trait,
fn worker<'async_trait>(
self: Arc<Self>,
) -> Pin<Box<dyn Future<Output = Result> + Send + 'async_trait>>where
Self: 'async_trait,
Source§fn interrupt<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn interrupt<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn clear_cache<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn clear_cache<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn memory_usage<'life0, 'life1, 'async_trait>(
&'life0 self,
_out: &'life1 mut (dyn Write + Send),
) -> Pin<Box<dyn Future<Output = Result> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn memory_usage<'life0, 'life1, 'async_trait>(
&'life0 self,
_out: &'life1 mut (dyn Write + Send),
) -> Pin<Box<dyn Future<Output = Result> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn unconstrained(&self) -> bool
fn unconstrained(&self) -> bool
Auto Trait Implementations§
impl !RefUnwindSafe for Service
impl !UnwindSafe for Service
impl Freeze for Service
impl Send for Service
impl Sync for Service
impl Unpin for Service
impl UnsafeUnpin for Service
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
Source§impl<T> ExpectInto for T
impl<T> ExpectInto for T
Source§impl<T> Expected for T
impl<T> Expected for T
Source§fn expected_add(self, rhs: Self) -> Selfwhere
Self: Sized + CheckedAdd,
fn expected_add(self, rhs: Self) -> Selfwhere
Self: Sized + CheckedAdd,
rhs with an expectation that the operation is valid. Read moreSource§fn expected_sub(self, rhs: Self) -> Selfwhere
Self: Sized + CheckedSub,
fn expected_sub(self, rhs: Self) -> Selfwhere
Self: Sized + CheckedSub,
rhs with an expectation that the operation is valid. Read moreSource§fn expected_mul(self, rhs: Self) -> Selfwhere
Self: Sized + CheckedMul,
fn expected_mul(self, rhs: Self) -> Selfwhere
Self: Sized + CheckedMul,
rhs with an expectation that the operation is valid. Read moreSource§fn expected_div(self, rhs: Self) -> Selfwhere
Self: Sized + CheckedDiv,
fn expected_div(self, rhs: Self) -> Selfwhere
Self: Sized + CheckedDiv,
rhs with an expectation that the operation is valid. Read moreSource§fn expected_rem(self, rhs: Self) -> Selfwhere
Self: Sized + CheckedRem,
fn expected_rem(self, rhs: Self) -> Selfwhere
Self: Sized + CheckedRem,
§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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 moreimpl<T> JsonCastable<CanonicalJsonValue> for T
impl<T> JsonCastable<Value> for T
§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling [Attribute] value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi [Quirk] value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the [Condition] value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ServiceExt for T
impl<T> ServiceExt for T
§fn add_extension<T>(self, value: T) -> AddExtension<Self, T>where
Self: Sized,
fn add_extension<T>(self, value: T) -> AddExtension<Self, T>where
Self: Sized,
§fn compression(self) -> Compression<Self>where
Self: Sized,
fn compression(self) -> Compression<Self>where
Self: Sized,
§fn decompression(self) -> Decompression<Self>where
Self: Sized,
fn decompression(self) -> Decompression<Self>where
Self: Sized,
§fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
§fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
§fn follow_redirects(self) -> FollowRedirect<Self>where
Self: Sized,
fn follow_redirects(self) -> FollowRedirect<Self>where
Self: Sized,
§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,
§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,
§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,
§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,
§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,
§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,
§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,
§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,
§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,
§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§impl<T> Tried for T
impl<T> Tried for T
Source§fn try_add(self, rhs: Self) -> Result<Self, Error>where
Self: Sized + CheckedAdd,
fn try_add(self, rhs: Self) -> Result<Self, Error>where
Self: Sized + CheckedAdd,
rhs with checked arithmetic. Read moreSource§fn try_sub(self, rhs: Self) -> Result<Self, Error>where
Self: Sized + CheckedSub,
fn try_sub(self, rhs: Self) -> Result<Self, Error>where
Self: Sized + CheckedSub,
rhs with checked arithmetic. Read moreSource§fn try_mul(self, rhs: Self) -> Result<Self, Error>where
Self: Sized + CheckedMul,
fn try_mul(self, rhs: Self) -> Result<Self, Error>where
Self: Sized + CheckedMul,
rhs with checked arithmetic. Read more