Struct aws_sdk_sqs::Endpoint
source · pub struct Endpoint { /* private fields */ }
.endpoint_url(...)
directly insteadExpand description
API Endpoint
This implements an API endpoint as specified in the Smithy Endpoint Specification
Implementations§
source§impl Endpoint
impl Endpoint
sourcepub fn mutable_uri(uri: Uri) -> Result<Endpoint, InvalidEndpointError>
pub fn mutable_uri(uri: Uri) -> Result<Endpoint, InvalidEndpointError>
Create a new endpoint from a URI
Certain services will augment the endpoint with additional metadata. For example,
S3 can prefix the host with the bucket name. If your endpoint does not support this,
(for example, when communicating with localhost), use Endpoint::immutable
.
sourcepub fn mutable(uri: impl AsRef<str>) -> Result<Endpoint, InvalidEndpointError>
pub fn mutable(uri: impl AsRef<str>) -> Result<Endpoint, InvalidEndpointError>
Create a new endpoint from a URI string
Certain services will augment the endpoint with additional metadata. For example,
S3 can prefix the host with the bucket name. If your endpoint does not support this,
(for example, when communicating with localhost), use Endpoint::immutable
.
sourcepub fn immutable_uri(uri: Uri) -> Result<Endpoint, InvalidEndpointError>
pub fn immutable_uri(uri: Uri) -> Result<Endpoint, InvalidEndpointError>
Create a new immutable endpoint from a URI
use http::Uri;
let uri = Uri::from_static("http://localhost:8000");
let endpoint = Endpoint::immutable_uri(uri);
Certain services will augment the endpoint with additional metadata. For example,
S3 can prefix the host with the bucket name. This constructor creates an endpoint which will
ignore those mutations. If you want an endpoint which will obey mutation requests, use
Endpoint::mutable
instead.
sourcepub fn immutable(uri: impl AsRef<str>) -> Result<Endpoint, InvalidEndpointError>
pub fn immutable(uri: impl AsRef<str>) -> Result<Endpoint, InvalidEndpointError>
Create a new immutable endpoint from a URI string
let endpoint = Endpoint::immutable("http://localhost:8000");
Certain services will augment the endpoint with additional metadata. For example,
S3 can prefix the host with the bucket name. This constructor creates an endpoint which will
ignore those mutations. If you want an endpoint which will obey mutation requests, use
Endpoint::mutable
instead.
sourcepub fn set_endpoint(
&self,
uri: &mut Uri,
prefix: Option<&EndpointPrefix>
) -> Result<(), InvalidEndpointError>
pub fn set_endpoint(
&self,
uri: &mut Uri,
prefix: Option<&EndpointPrefix>
) -> Result<(), InvalidEndpointError>
Sets the endpoint on uri
, potentially applying the specified prefix
in the process.
Trait Implementations§
source§impl ResolveAwsEndpoint for Endpoint
impl ResolveAwsEndpoint for Endpoint
An Endpoint
can be its own resolver to support static endpoints
source§impl<T> ResolveEndpoint<T> for Endpoint
impl<T> ResolveEndpoint<T> for Endpoint
This allows customers that use Endpoint
to override the endpoint to continue to do so