aws_smithy_runtime_api::client::endpoint

Trait ResolveEndpoint

Source
pub trait ResolveEndpoint:
    Send
    + Sync
    + Debug {
    // Required method
    fn resolve_endpoint<'a>(
        &'a self,
        params: &'a EndpointResolverParams,
    ) -> EndpointFuture<'a> ;

    // Provided method
    fn finalize_params<'a>(
        &'a self,
        _params: &'a mut EndpointResolverParams,
    ) -> Result<(), BoxError> { ... }
}
Expand description

Configurable endpoint resolver implementation.

Required Methods§

Source

fn resolve_endpoint<'a>( &'a self, params: &'a EndpointResolverParams, ) -> EndpointFuture<'a>

Asynchronously resolves an endpoint to use from the given endpoint parameters.

Provided Methods§

Source

fn finalize_params<'a>( &'a self, _params: &'a mut EndpointResolverParams, ) -> Result<(), BoxError>

Finalize the service-specific concrete parameters in _params.

The EndpointResolverParams may need to include additional data at a later point, after its creation in the read_before_execution method of an endpoint parameters interceptor. Modifying it directly within the ResolveEndpoint::resolve_endpoint method is not feasible, as params is passed by reference. This means that incorporating extra data would require cloning params within the method. However, the return type EndpointFuture has a lifetime tied to the input argument, making it impossible to return the cloned params, as its lifetime is scoped to the method.

Implementors§