pub trait RuntimePlugin: Debug + Send + Sync {
    // Provided methods
    fn order(&self) -> Order { ... }
    fn config(&self) -> Option<FrozenLayer> { ... }
    fn runtime_components(
        &self,
        current_components: &RuntimeComponentsBuilder
    ) -> Cow<'_, RuntimeComponentsBuilder> { ... }
}
Expand description

Runtime plugin trait

A RuntimePlugin is the unit of configuration for augmenting the client with new behavior.

Runtime plugins can register interceptors, set runtime components, and modify configuration.

Provided Methods§

source

fn order(&self) -> Order

Runtime plugin ordering.

There are two runtime plugin “levels” that run in the following order:

  1. Service runtime plugins - runtime plugins that pertain to the entire service.
  2. Operation runtime plugins - runtime plugins relevant only to a single operation.

This function is used to determine runtime plugin order within those levels. So regardless of this Order value, service runtime plugins will still always execute before operation runtime plugins. However, Defaults service runtime plugins will run before Overrides service runtime plugins.

source

fn config(&self) -> Option<FrozenLayer>

Optionally returns additional config that should be added to the ConfigBag.

As a best practice, a frozen layer should be stored on the runtime plugin instance as a member, and then cloned upon return since that clone is cheap. Constructing a new Layer and freezing it will require a lot of allocations.

source

fn runtime_components( &self, current_components: &RuntimeComponentsBuilder ) -> Cow<'_, RuntimeComponentsBuilder>

Returns a RuntimeComponentsBuilder to incorporate into the final runtime components.

The order of runtime plugins determines which runtime components “win”. Components set by later runtime plugins will override those set by earlier runtime plugins.

If no runtime component changes are desired, just return an empty builder.

This method returns a Cow for flexibility. Some implementers may want to store the components builder as a member and return a reference to it, while others may need to create the builder every call. If possible, returning a reference is preferred for performance.

Components configured by previous runtime plugins are in the current_components argument, and can be used to create nested/wrapped components, such as a connector calling into an inner (customer provided) connector.

Implementations on Foreign Types§

source§

impl RuntimePlugin for NoAuthRuntimePlugin

source§

impl RuntimePlugin for EnforceContentLengthRuntimePlugin

source§

impl RuntimePlugin for CannedResponseDeserializer

source§

impl RuntimePlugin for CannedRequestSerializer

Implementors§

source§

impl RuntimePlugin for AddCustomAttributes

source§

impl RuntimePlugin for AdminAddUserToGroup

source§

impl RuntimePlugin for AdminConfirmSignUp

source§

impl RuntimePlugin for AdminCreateUser

source§

impl RuntimePlugin for AdminDeleteUser

source§

impl RuntimePlugin for AdminDeleteUserAttributes

source§

impl RuntimePlugin for AdminDisableProviderForUser

source§

impl RuntimePlugin for AdminDisableUser

source§

impl RuntimePlugin for AdminEnableUser

source§

impl RuntimePlugin for AdminForgetDevice

source§

impl RuntimePlugin for AdminGetDevice

source§

impl RuntimePlugin for AdminGetUser

source§

impl RuntimePlugin for AdminInitiateAuth

source§

impl RuntimePlugin for AdminLinkProviderForUser

source§

impl RuntimePlugin for AdminListDevices

source§

impl RuntimePlugin for AdminListGroupsForUser

source§

impl RuntimePlugin for AdminListUserAuthEvents

source§

impl RuntimePlugin for AdminRemoveUserFromGroup

source§

impl RuntimePlugin for AdminResetUserPassword

source§

impl RuntimePlugin for AdminRespondToAuthChallenge

source§

impl RuntimePlugin for AdminSetUserMFAPreference

source§

impl RuntimePlugin for AdminSetUserPassword

source§

impl RuntimePlugin for AdminSetUserSettings

source§

impl RuntimePlugin for AdminUpdateAuthEventFeedback

source§

impl RuntimePlugin for AdminUpdateDeviceStatus

source§

impl RuntimePlugin for AdminUpdateUserAttributes

source§

impl RuntimePlugin for AdminUserGlobalSignOut

source§

impl RuntimePlugin for AssociateSoftwareToken

source§

impl RuntimePlugin for ChangePassword

source§

impl RuntimePlugin for ConfirmDevice

source§

impl RuntimePlugin for ConfirmForgotPassword

source§

impl RuntimePlugin for ConfirmSignUp

source§

impl RuntimePlugin for CreateGroup

source§

impl RuntimePlugin for CreateIdentityProvider

source§

impl RuntimePlugin for CreateResourceServer

source§

impl RuntimePlugin for CreateUserImportJob

source§

impl RuntimePlugin for CreateUserPool

source§

impl RuntimePlugin for CreateUserPoolClient

source§

impl RuntimePlugin for CreateUserPoolDomain

source§

impl RuntimePlugin for DeleteGroup

source§

impl RuntimePlugin for DeleteIdentityProvider

source§

impl RuntimePlugin for DeleteResourceServer

source§

impl RuntimePlugin for DeleteUser

source§

impl RuntimePlugin for DeleteUserAttributes

source§

impl RuntimePlugin for DeleteUserPool

source§

impl RuntimePlugin for DeleteUserPoolClient

source§

impl RuntimePlugin for DeleteUserPoolDomain

source§

impl RuntimePlugin for DescribeIdentityProvider

source§

impl RuntimePlugin for DescribeResourceServer

source§

impl RuntimePlugin for DescribeRiskConfiguration

source§

impl RuntimePlugin for DescribeUserImportJob

source§

impl RuntimePlugin for DescribeUserPool

source§

impl RuntimePlugin for DescribeUserPoolClient

source§

impl RuntimePlugin for DescribeUserPoolDomain

source§

impl RuntimePlugin for ForgetDevice

source§

impl RuntimePlugin for ForgotPassword

source§

impl RuntimePlugin for GetCSVHeader

source§

impl RuntimePlugin for GetDevice

source§

impl RuntimePlugin for GetGroup

source§

impl RuntimePlugin for GetIdentityProviderByIdentifier

source§

impl RuntimePlugin for GetLogDeliveryConfiguration

source§

impl RuntimePlugin for GetSigningCertificate

source§

impl RuntimePlugin for GetUICustomization

source§

impl RuntimePlugin for GetUser

source§

impl RuntimePlugin for GetUserAttributeVerificationCode

source§

impl RuntimePlugin for GetUserPoolMfaConfig

source§

impl RuntimePlugin for GlobalSignOut

source§

impl RuntimePlugin for InitiateAuth

source§

impl RuntimePlugin for ListDevices

source§

impl RuntimePlugin for ListGroups

source§

impl RuntimePlugin for ListIdentityProviders

source§

impl RuntimePlugin for ListResourceServers

source§

impl RuntimePlugin for ListTagsForResource

source§

impl RuntimePlugin for ListUserImportJobs

source§

impl RuntimePlugin for ListUserPoolClients

source§

impl RuntimePlugin for ListUserPools

source§

impl RuntimePlugin for ListUsers

source§

impl RuntimePlugin for ListUsersInGroup

source§

impl RuntimePlugin for ResendConfirmationCode

source§

impl RuntimePlugin for RespondToAuthChallenge

source§

impl RuntimePlugin for RevokeToken

source§

impl RuntimePlugin for SetLogDeliveryConfiguration

source§

impl RuntimePlugin for SetRiskConfiguration

source§

impl RuntimePlugin for SetUICustomization

source§

impl RuntimePlugin for SetUserMFAPreference

source§

impl RuntimePlugin for SetUserPoolMfaConfig

source§

impl RuntimePlugin for SetUserSettings

source§

impl RuntimePlugin for SignUp

source§

impl RuntimePlugin for StartUserImportJob

source§

impl RuntimePlugin for StopUserImportJob

source§

impl RuntimePlugin for TagResource

source§

impl RuntimePlugin for UntagResource

source§

impl RuntimePlugin for UpdateAuthEventFeedback

source§

impl RuntimePlugin for UpdateDeviceStatus

source§

impl RuntimePlugin for UpdateGroup

source§

impl RuntimePlugin for UpdateIdentityProvider

source§

impl RuntimePlugin for UpdateResourceServer

source§

impl RuntimePlugin for UpdateUserAttributes

source§

impl RuntimePlugin for UpdateUserPool

source§

impl RuntimePlugin for UpdateUserPoolClient

source§

impl RuntimePlugin for UpdateUserPoolDomain

source§

impl RuntimePlugin for VerifySoftwareToken

source§

impl RuntimePlugin for VerifyUserAttribute

source§

impl RuntimePlugin for StaticRuntimePlugin

source§

impl RuntimePlugin for SharedRuntimePlugin