Trait RuntimePlugin

Source
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 PayloadSigningOverrideRuntimePlugin

Source§

impl RuntimePlugin for NoAuthRuntimePlugin

Source§

impl RuntimePlugin for EnforceContentLengthRuntimePlugin

Source§

impl RuntimePlugin for MetricsRuntimePlugin

Source§

impl RuntimePlugin for CannedResponseDeserializer

Source§

impl RuntimePlugin for CannedRequestSerializer

Implementors§

Source§

impl RuntimePlugin for AcceptAdministratorInvitation

Source§

impl RuntimePlugin for AcceptInvitation

Source§

impl RuntimePlugin for BatchDeleteAutomationRules

Source§

impl RuntimePlugin for BatchDisableStandards

Source§

impl RuntimePlugin for BatchEnableStandards

Source§

impl RuntimePlugin for BatchGetAutomationRules

Source§

impl RuntimePlugin for BatchGetConfigurationPolicyAssociations

Source§

impl RuntimePlugin for BatchGetSecurityControls

Source§

impl RuntimePlugin for BatchGetStandardsControlAssociations

Source§

impl RuntimePlugin for BatchImportFindings

Source§

impl RuntimePlugin for BatchUpdateAutomationRules

Source§

impl RuntimePlugin for BatchUpdateFindings

Source§

impl RuntimePlugin for BatchUpdateStandardsControlAssociations

Source§

impl RuntimePlugin for CreateActionTarget

Source§

impl RuntimePlugin for CreateAutomationRule

Source§

impl RuntimePlugin for CreateConfigurationPolicy

Source§

impl RuntimePlugin for CreateFindingAggregator

Source§

impl RuntimePlugin for CreateInsight

Source§

impl RuntimePlugin for CreateMembers

Source§

impl RuntimePlugin for DeclineInvitations

Source§

impl RuntimePlugin for DeleteActionTarget

Source§

impl RuntimePlugin for DeleteConfigurationPolicy

Source§

impl RuntimePlugin for DeleteFindingAggregator

Source§

impl RuntimePlugin for DeleteInsight

Source§

impl RuntimePlugin for DeleteInvitations

Source§

impl RuntimePlugin for DeleteMembers

Source§

impl RuntimePlugin for DescribeActionTargets

Source§

impl RuntimePlugin for DescribeHub

Source§

impl RuntimePlugin for DescribeOrganizationConfiguration

Source§

impl RuntimePlugin for DescribeProducts

Source§

impl RuntimePlugin for DescribeStandards

Source§

impl RuntimePlugin for DescribeStandardsControls

Source§

impl RuntimePlugin for DisableImportFindingsForProduct

Source§

impl RuntimePlugin for DisableOrganizationAdminAccount

Source§

impl RuntimePlugin for DisableSecurityHub

Source§

impl RuntimePlugin for DisassociateFromAdministratorAccount

Source§

impl RuntimePlugin for DisassociateFromMasterAccount

Source§

impl RuntimePlugin for DisassociateMembers

Source§

impl RuntimePlugin for EnableImportFindingsForProduct

Source§

impl RuntimePlugin for EnableOrganizationAdminAccount

Source§

impl RuntimePlugin for EnableSecurityHub

Source§

impl RuntimePlugin for GetAdministratorAccount

Source§

impl RuntimePlugin for GetConfigurationPolicy

Source§

impl RuntimePlugin for GetConfigurationPolicyAssociation

Source§

impl RuntimePlugin for GetEnabledStandards

Source§

impl RuntimePlugin for GetFindingAggregator

Source§

impl RuntimePlugin for GetFindingHistory

Source§

impl RuntimePlugin for GetFindings

Source§

impl RuntimePlugin for GetInsightResults

Source§

impl RuntimePlugin for GetInsights

Source§

impl RuntimePlugin for GetInvitationsCount

Source§

impl RuntimePlugin for GetMasterAccount

Source§

impl RuntimePlugin for GetMembers

Source§

impl RuntimePlugin for GetSecurityControlDefinition

Source§

impl RuntimePlugin for InviteMembers

Source§

impl RuntimePlugin for ListAutomationRules

Source§

impl RuntimePlugin for ListConfigurationPolicies

Source§

impl RuntimePlugin for ListConfigurationPolicyAssociations

Source§

impl RuntimePlugin for ListEnabledProductsForImport

Source§

impl RuntimePlugin for ListFindingAggregators

Source§

impl RuntimePlugin for ListInvitations

Source§

impl RuntimePlugin for ListMembers

Source§

impl RuntimePlugin for ListOrganizationAdminAccounts

Source§

impl RuntimePlugin for ListSecurityControlDefinitions

Source§

impl RuntimePlugin for ListStandardsControlAssociations

Source§

impl RuntimePlugin for ListTagsForResource

Source§

impl RuntimePlugin for StartConfigurationPolicyAssociation

Source§

impl RuntimePlugin for StartConfigurationPolicyDisassociation

Source§

impl RuntimePlugin for TagResource

Source§

impl RuntimePlugin for UntagResource

Source§

impl RuntimePlugin for UpdateActionTarget

Source§

impl RuntimePlugin for UpdateConfigurationPolicy

Source§

impl RuntimePlugin for UpdateFindingAggregator

Source§

impl RuntimePlugin for UpdateFindings

Source§

impl RuntimePlugin for UpdateInsight

Source§

impl RuntimePlugin for UpdateOrganizationConfiguration

Source§

impl RuntimePlugin for UpdateSecurityControl

Source§

impl RuntimePlugin for UpdateSecurityHubConfiguration

Source§

impl RuntimePlugin for UpdateStandardsControl

Source§

impl RuntimePlugin for StaticRuntimePlugin

Source§

impl RuntimePlugin for SharedRuntimePlugin