pub struct Client { /* private fields */ }Expand description
Client for Amazon Location Service Maps V2
Client for invoking operations on Amazon Location Service Maps V2. Each operation on Amazon Location Service Maps V2 is a method on this
this struct. .send() MUST be invoked on the generated operations to dispatch the request to the service.
§Constructing a Client
A Config is required to construct a client. For most use cases, the aws-config
crate should be used to automatically resolve this config using
aws_config::load_from_env(), since this will resolve an SdkConfig which can be shared
across multiple different AWS SDK clients. This config resolution process can be customized
by calling aws_config::from_env() instead, which returns a ConfigLoader that uses
the builder pattern to customize the default config.
In the simplest case, creating a client looks as follows:
let config = aws_config::load_from_env().await;
let client = aws_sdk_geomaps::Client::new(&config);Occasionally, SDKs may have additional service-specific values that can be set on the Config that
is absent from SdkConfig, or slightly different settings for a specific client may be desired.
The Builder struct implements From<&SdkConfig>, so setting these specific settings can be
done as follows:
let sdk_config = ::aws_config::load_from_env().await;
let config = aws_sdk_geomaps::config::Builder::from(&sdk_config)
.some_service_specific_setting("value")
.build();See the aws-config docs and Config for more information on customizing configuration.
Note: Client construction is expensive due to connection thread pool initialization, and should be done once at application start-up.
Implementations§
Source§impl Client
impl Client
Sourcepub fn get_glyphs(&self) -> GetGlyphsFluentBuilder
pub fn get_glyphs(&self) -> GetGlyphsFluentBuilder
Constructs a fluent builder for the GetGlyphs operation.
- The fluent builder is configurable:
font_stack(impl Into<String>)/set_font_stack(Option<String>):
required: trueName of the
FontStackto retrieve.Example:
Amazon Ember Bold,Noto Sans Bold.The supported font stacks are as follows:
-
Amazon Ember Bold
-
Amazon Ember Bold Italic
-
Amazon Ember Bold,Noto Sans Bold
-
Amazon Ember Bold,Noto Sans Bold,Noto Sans Arabic Bold
-
Amazon Ember Condensed RC BdItalic
-
Amazon Ember Condensed RC Bold
-
Amazon Ember Condensed RC Bold Italic
-
Amazon Ember Condensed RC Bold,Noto Sans Bold
-
Amazon Ember Condensed RC Bold,Noto Sans Bold,Noto Sans Arabic Condensed Bold
-
Amazon Ember Condensed RC Light
-
Amazon Ember Condensed RC Light Italic
-
Amazon Ember Condensed RC LtItalic
-
Amazon Ember Condensed RC Regular
-
Amazon Ember Condensed RC Regular Italic
-
Amazon Ember Condensed RC Regular,Noto Sans Regular
-
Amazon Ember Condensed RC Regular,Noto Sans Regular,Noto Sans Arabic Condensed Regular
-
Amazon Ember Condensed RC RgItalic
-
Amazon Ember Condensed RC ThItalic
-
Amazon Ember Condensed RC Thin
-
Amazon Ember Condensed RC Thin Italic
-
Amazon Ember Heavy
-
Amazon Ember Heavy Italic
-
Amazon Ember Light
-
Amazon Ember Light Italic
-
Amazon Ember Medium
-
Amazon Ember Medium Italic
-
Amazon Ember Medium,Noto Sans Medium
-
Amazon Ember Medium,Noto Sans Medium,Noto Sans Arabic Medium
-
Amazon Ember Regular
-
Amazon Ember Regular Italic
-
Amazon Ember Regular Italic,Noto Sans Italic
-
Amazon Ember Regular Italic,Noto Sans Italic,Noto Sans Arabic Regular
-
Amazon Ember Regular,Noto Sans Regular
-
Amazon Ember Regular,Noto Sans Regular,Noto Sans Arabic Regular
-
Amazon Ember Thin
-
Amazon Ember Thin Italic
-
AmazonEmberCdRC_Bd
-
AmazonEmberCdRC_BdIt
-
AmazonEmberCdRC_Lt
-
AmazonEmberCdRC_LtIt
-
AmazonEmberCdRC_Rg
-
AmazonEmberCdRC_RgIt
-
AmazonEmberCdRC_Th
-
AmazonEmberCdRC_ThIt
-
AmazonEmber_Bd
-
AmazonEmber_BdIt
-
AmazonEmber_He
-
AmazonEmber_HeIt
-
AmazonEmber_Lt
-
AmazonEmber_LtIt
-
AmazonEmber_Md
-
AmazonEmber_MdIt
-
AmazonEmber_Rg
-
AmazonEmber_RgIt
-
AmazonEmber_Th
-
AmazonEmber_ThIt
-
Noto Sans Black
-
Noto Sans Black Italic
-
Noto Sans Bold
-
Noto Sans Bold Italic
-
Noto Sans Extra Bold
-
Noto Sans Extra Bold Italic
-
Noto Sans Extra Light
-
Noto Sans Extra Light Italic
-
Noto Sans Italic
-
Noto Sans Light
-
Noto Sans Light Italic
-
Noto Sans Medium
-
Noto Sans Medium Italic
-
Noto Sans Regular
-
Noto Sans Semi Bold
-
Noto Sans Semi Bold Italic
-
Noto Sans Thin
-
Noto Sans Thin Italic
-
NotoSans-Bold
-
NotoSans-Italic
-
NotoSans-Medium
-
NotoSans-Regular
-
Open Sans Regular,Arial Unicode MS Regular
-
font_unicode_range(impl Into<String>)/set_font_unicode_range(Option<String>):
required: trueA Unicode range of characters to download glyphs for. This must be aligned to multiples of 256.
Example:
0-255.pdf
- On success, responds with
GetGlyphsOutputwith field(s):blob(Option<Blob>):The Glyph, as a binary blob.
content_type(Option<String>):Header that represents the format of the response. The response returns the following as the HTTP body.
cache_control(Option<String>):Header that instructs caching configuration for the client.
e_tag(Option<String>):The glyph’s Etag.
- On failure, responds with
SdkError<GetGlyphsError>
Source§impl Client
impl Client
Sourcepub fn get_sprites(&self) -> GetSpritesFluentBuilder
pub fn get_sprites(&self) -> GetSpritesFluentBuilder
Constructs a fluent builder for the GetSprites operation.
- The fluent builder is configurable:
file_name(impl Into<String>)/set_file_name(Option<String>):
required: trueSpritesAPI: The name of the sprite file to retrieve, following patternsprites(@2x)?.(png|json).Example:
sprites.pngstyle(MapStyle)/set_style(Option<MapStyle>):
required: trueStyle specifies the desired map style for the
SpritesAPIs.color_scheme(ColorScheme)/set_color_scheme(Option<ColorScheme>):
required: trueSets color tone for map such as dark and light for specific map styles. It applies to only vector map styles such as Standard and Monochrome.
Example:
LightDefault value:
LightValid values for ColorScheme are case sensitive.
variant(Variant)/set_variant(Option<Variant>):
required: trueOptimizes map styles for specific use case or industry. You can choose allowed variant only with Standard map style.
Example:
DefaultValid values for Variant are case sensitive.
- On success, responds with
GetSpritesOutputwith field(s):blob(Option<Blob>):The body of the sprite sheet or JSON offset file (image/png or application/json, depending on input).
content_type(Option<String>):Header that represents the format of the response. The response returns the following as the HTTP body.
cache_control(Option<String>):Header that instructs caching configuration for the client.
e_tag(Option<String>):The sprite’s Etag.
- On failure, responds with
SdkError<GetSpritesError>
Source§impl Client
impl Client
Sourcepub fn get_static_map(&self) -> GetStaticMapFluentBuilder
pub fn get_static_map(&self) -> GetStaticMapFluentBuilder
Constructs a fluent builder for the GetStaticMap operation.
- The fluent builder is configurable:
bounding_box(impl Into<String>)/set_bounding_box(Option<String>):
required: falseTakes in two pairs of coordinates, [Lon, Lat], denoting south-westerly and north-easterly edges of the image. The underlying area becomes the view of the image.
Example: -123.17075,49.26959,-123.08125,49.31429
bounded_positions(impl Into<String>)/set_bounded_positions(Option<String>):
required: falseTakes in two or more pair of coordinates, [Lon, Lat], with each coordinate separated by a comma. The API will generate an image to encompass all of the provided coordinates.
Cannot be used with
Zoomand orRadiusExample: 97.170451,78.039098,99.045536,27.176178
center(impl Into<String>)/set_center(Option<String>):
required: falseTakes in a pair of coordinates, [Lon, Lat], which becomes the center point of the image. This parameter requires that either zoom or radius is set.
Cannot be used with
Zoomand orRadiusExample: 49.295,-123.108
compact_overlay(impl Into<String>)/set_compact_overlay(Option<String>):
required: falseTakes in a string to draw geometries on the image. The input is a comma separated format as follows format:
[Lon, Lat]Example:
line:-122.407653,37.798557,-122.413291,37.802443;color=%23DD0000;width=7;outline-color=#00DD00;outline-width=5yd|point:-122.40572,37.80004;label=Fog Hill Market;size=large;text-color=%23DD0000;color=#EE4B2BCurrently it supports the following geometry types: point, line and polygon. It does not support multiPoint , multiLine and multiPolgyon.
geo_json_overlay(impl Into<String>)/set_geo_json_overlay(Option<String>):
required: falseTakes in a string to draw geometries on the image. The input is a valid GeoJSON collection object.
Example:
{“type”:“FeatureCollection”,“features”: [{“type”:“Feature”,“geometry”:{“type”:“MultiPoint”,“coordinates”: [[-90.076345,51.504107],[-0.074451,51.506892]]},“properties”: {“color”:“#00DD00”}}]}height(i32)/set_height(Option<i32>):
required: trueSpecifies the height of the map image.
key(impl Into<String>)/set_key(Option<String>):
required: falseOptional: The API key to be used for authorization. Either an API key or valid SigV4 signature must be provided when making a request.
padding(i32)/set_padding(Option<i32>):
required: falseApplies additional space (in pixels) around overlay feature to prevent them from being cut or obscured.
Value for max and min is determined by:
Min:
1Max:
min(height, width)/4Example:
100radius(i64)/set_radius(Option<i64>):
required: falseUsed with center parameter, it specifies the zoom of the image where you can control it on a granular level. Takes in any value
>= 1.Example:
1500Cannot be used with
Zoom.Unit:
Metersfile_name(impl Into<String>)/set_file_name(Option<String>):
required: trueThe map scaling parameter to size the image, icons, and labels. It follows the pattern of
^map(@2x)?$.Example:
map, map@2xscale_bar_unit(ScaleBarUnit)/set_scale_bar_unit(Option<ScaleBarUnit>):
required: falseDisplays a scale on the bottom right of the map image with the unit specified in the input.
Example:
KilometersMiles, Miles, Kilometers, MilesKilometersstyle(StaticMapStyle)/set_style(Option<StaticMapStyle>):
required: falseStyle specifies the desired map style for the
StyleAPIs.width(i32)/set_width(Option<i32>):
required: trueSpecifies the width of the map image.
zoom(f32)/set_zoom(Option<f32>):
required: falseSpecifies the zoom level of the map image.
Cannot be used with
Radius.
- On success, responds with
GetStaticMapOutputwith field(s):blob(Option<Blob>):The blob represents a map image as a
jpegfor theGetStaticMapAPI.content_type(Option<String>):Header that represents the format of the response. The response returns the following as the HTTP body.
cache_control(Option<String>):Header that instructs caching configuration for the client.
e_tag(Option<String>):The static map’s Etag.
pricing_bucket(String):The pricing bucket for which the request is charged at.
- On failure, responds with
SdkError<GetStaticMapError>
Source§impl Client
impl Client
Sourcepub fn get_style_descriptor(&self) -> GetStyleDescriptorFluentBuilder
pub fn get_style_descriptor(&self) -> GetStyleDescriptorFluentBuilder
Constructs a fluent builder for the GetStyleDescriptor operation.
- The fluent builder is configurable:
style(MapStyle)/set_style(Option<MapStyle>):
required: trueStyle specifies the desired map style.
color_scheme(ColorScheme)/set_color_scheme(Option<ColorScheme>):
required: falseSets color tone for map such as dark and light for specific map styles. It applies to only vector map styles such as Standard and Monochrome.
Example:
LightDefault value:
LightValid values for ColorScheme are case sensitive.
political_view(impl Into<String>)/set_political_view(Option<String>):
required: falseSpecifies the political view using ISO 3166-2 or ISO 3166-3 country code format.
The following political views are currently supported:
-
ARG: Argentina’s view on the Southern Patagonian Ice Field and Tierra Del Fuego, including the Falkland Islands, South Georgia, and South Sandwich Islands -
EGY: Egypt’s view on Bir Tawil -
IND: India’s view on Gilgit-Baltistan -
KEN: Kenya’s view on the Ilemi Triangle -
MAR: Morocco’s view on Western Sahara -
PAK: Pakistan’s view on Jammu and Kashmir and the Junagadh Area -
RUS: Russia’s view on Crimea -
SDN: Sudan’s view on the Halaib Triangle -
SRB: Serbia’s view on Kosovo, Vukovar, and Sarengrad Islands -
SUR: Suriname’s view on the Courantyne Headwaters and Lawa Headwaters -
SYR: Syria’s view on the Golan Heights -
TUR: Turkey’s view on Cyprus and Northern Cyprus -
TZA: Tanzania’s view on Lake Malawi -
URY: Uruguay’s view on Rincon de Artigas -
VNM: Vietnam’s view on the Paracel Islands and Spratly Islands
-
key(impl Into<String>)/set_key(Option<String>):
required: falseOptional: The API key to be used for authorization. Either an API key or valid SigV4 signature must be provided when making a request.
- On success, responds with
GetStyleDescriptorOutputwith field(s):blob(Option<Blob>):This Blob contains the body of the style descriptor which is in application/json format.
content_type(Option<String>):Header that represents the format of the response. The response returns the following as the HTTP body.
cache_control(Option<String>):Header that instructs caching configuration for the client.
e_tag(Option<String>):The style descriptor’s Etag.
- On failure, responds with
SdkError<GetStyleDescriptorError>
Source§impl Client
impl Client
Sourcepub fn get_tile(&self) -> GetTileFluentBuilder
pub fn get_tile(&self) -> GetTileFluentBuilder
Constructs a fluent builder for the GetTile operation.
- The fluent builder is configurable:
tileset(impl Into<String>)/set_tileset(Option<String>):
required: trueSpecifies the desired tile set.
Valid Values:
raster.satellite | vector.basemapz(impl Into<String>)/set_z(Option<String>):
required: trueThe zoom value for the map tile.
x(impl Into<String>)/set_x(Option<String>):
required: trueThe X axis value for the map tile. Must be between 0 and 19.
y(impl Into<String>)/set_y(Option<String>):
required: trueThe Y axis value for the map tile.
key(impl Into<String>)/set_key(Option<String>):
required: falseOptional: The API key to be used for authorization. Either an API key or valid SigV4 signature must be provided when making a request.
- On success, responds with
GetTileOutputwith field(s):blob(Option<Blob>):The blob represents a vector tile in
mvtformat for theGetTileAPI.content_type(Option<String>):Header that represents the format of the response. The response returns the following as the HTTP body.
cache_control(Option<String>):Header that instructs caching configuration for the client.
e_tag(Option<String>):The pricing bucket for which the request is charged at.
pricing_bucket(String):The pricing bucket for which the request is charged at.
- On failure, responds with
SdkError<GetTileError>
Source§impl Client
impl Client
Sourcepub fn from_conf(conf: Config) -> Self
pub fn from_conf(conf: Config) -> Self
Creates a new client from the service Config.
§Panics
This method will panic in the following cases:
- Retries or timeouts are enabled without a
sleep_implconfigured. - Identity caching is enabled without a
sleep_implandtime_sourceconfigured. - No
behavior_versionis provided.
The panic message for each of these will have instructions on how to resolve them.
Source§impl Client
impl Client
Sourcepub fn new(sdk_config: &SdkConfig) -> Self
pub fn new(sdk_config: &SdkConfig) -> Self
Creates a new client from an SDK Config.
§Panics
- This method will panic if the
sdk_configis missing an async sleep implementation. If you experience this panic, set thesleep_implon the Config passed into this function to fix it. - This method will panic if the
sdk_configis missing an HTTP connector. If you experience this panic, set thehttp_connectoron the Config passed into this function to fix it. - This method will panic if no
BehaviorVersionis provided. If you experience this panic, setbehavior_versionon the Config or enable thebehavior-version-latestCargo feature.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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 moreSource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§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();Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Returns self with the
fg()
set to
Color::BrightBlack.
§Example
println!("{}", value.bright_black());Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Returns self with the
fg()
set to
Color::BrightGreen.
§Example
println!("{}", value.bright_green());Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Returns self with the
fg()
set to
Color::BrightYellow.
§Example
println!("{}", value.bright_yellow());Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Returns self with the
fg()
set to
Color::BrightMagenta.
§Example
println!("{}", value.bright_magenta());Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Returns self with the
fg()
set to
Color::BrightWhite.
§Example
println!("{}", value.bright_white());Source§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();Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Returns self with the
bg()
set to
Color::BrightBlack.
§Example
println!("{}", value.on_bright_black());Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Returns self with the
bg()
set to
Color::BrightGreen.
§Example
println!("{}", value.on_bright_green());Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Returns self with the
bg()
set to
Color::BrightYellow.
§Example
println!("{}", value.on_bright_yellow());Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Returns self with the
bg()
set to
Color::BrightBlue.
§Example
println!("{}", value.on_bright_blue());Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Returns self with the
bg()
set to
Color::BrightMagenta.
§Example
println!("{}", value.on_bright_magenta());Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Returns self with the
bg()
set to
Color::BrightCyan.
§Example
println!("{}", value.on_bright_cyan());Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Returns self with the
bg()
set to
Color::BrightWhite.
§Example
println!("{}", value.on_bright_white());Source§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();Source§fn underline(&self) -> Painted<&T>
fn underline(&self) -> Painted<&T>
Returns self with the
attr()
set to
Attribute::Underline.
§Example
println!("{}", value.underline());Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Returns self with the
attr()
set to
Attribute::RapidBlink.
§Example
println!("{}", value.rapid_blink());Source§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();Source§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>
resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.Source§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);