Struct aws_sdk_ivschat::Client
source · pub struct Client { /* private fields */ }
Expand description
Client for Amazon Interactive Video Service Chat
Client for invoking operations on Amazon Interactive Video Service Chat. Each operation on Amazon Interactive Video Service Chat 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_ivschat::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 Config
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_ivschat::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.
§Using the Client
A client has a function for every operation that can be performed by the service.
For example, the CreateChatToken
operation has
a Client::create_chat_token
, function which returns a builder for that operation.
The fluent builder ultimately has a send()
function that returns an async future that
returns a result, as illustrated below:
let result = client.create_chat_token()
.room_identifier("example")
.send()
.await;
The underlying HTTP requests that get made by this can be modified with the customize_operation
function on the fluent builder. See the customize
module for more
information.
Implementations§
source§impl Client
impl Client
sourcepub fn create_chat_token(&self) -> CreateChatTokenFluentBuilder
pub fn create_chat_token(&self) -> CreateChatTokenFluentBuilder
Constructs a fluent builder for the CreateChatToken
operation.
- The fluent builder is configurable:
room_identifier(impl Into<String>)
/set_room_identifier(Option<String>)
:
required: trueIdentifier of the room that the client is trying to access. Currently this must be an ARN.
user_id(impl Into<String>)
/set_user_id(Option<String>)
:
required: trueApplication-provided ID that uniquely identifies the user associated with this token. This can be any UTF-8 encoded text.
capabilities(ChatTokenCapability)
/set_capabilities(Option<Vec::<ChatTokenCapability>>)
:
required: falseSet of capabilities that the user is allowed to perform in the room. Default: None (the capability to view messages is implicitly included in all requests).
session_duration_in_minutes(i32)
/set_session_duration_in_minutes(Option<i32>)
:
required: falseSession duration (in minutes), after which the session expires. Default: 60 (1 hour).
attributes(impl Into<String>, impl Into<String>)
/set_attributes(Option<HashMap::<String, String>>)
:
required: falseApplication-provided attributes to encode into the token and attach to a chat session. Map keys and values can contain UTF-8 encoded text. The maximum length of this field is 1 KB total.
- On success, responds with
CreateChatTokenOutput
with field(s):token(Option<String>)
:The issued client token, encrypted.
token_expiration_time(Option<DateTime>)
:Time after which the token is no longer valid and cannot be used to connect to a room. This is an ISO 8601 timestamp; note that this is returned as a string.
session_expiration_time(Option<DateTime>)
:Time after which an end user’s session is no longer valid. This is an ISO 8601 timestamp; note that this is returned as a string.
- On failure, responds with
SdkError<CreateChatTokenError>
source§impl Client
impl Client
sourcepub fn create_logging_configuration(
&self
) -> CreateLoggingConfigurationFluentBuilder
pub fn create_logging_configuration( &self ) -> CreateLoggingConfigurationFluentBuilder
Constructs a fluent builder for the CreateLoggingConfiguration
operation.
- The fluent builder is configurable:
name(impl Into<String>)
/set_name(Option<String>)
:
required: falseLogging-configuration name. The value does not need to be unique.
destination_configuration(DestinationConfiguration)
/set_destination_configuration(Option<DestinationConfiguration>)
:
required: trueA complex type that contains a destination configuration for where chat content will be logged. There can be only one type of destination (
cloudWatchLogs
,firehose
, ors3
) in adestinationConfiguration
.tags(impl Into<String>, impl Into<String>)
/set_tags(Option<HashMap::<String, String>>)
:
required: falseTags to attach to the resource. Array of maps, each of the form
string:string (key:value)
. See Tagging AWS Resources for details, including restrictions that apply to tags and “Tag naming limits and requirements”; Amazon IVS Chat has no constraints on tags beyond what is documented there.
- On success, responds with
CreateLoggingConfigurationOutput
with field(s):arn(Option<String>)
:Logging-configuration ARN, assigned by the system.
id(Option<String>)
:Logging-configuration ID, generated by the system. This is a relative identifier, the part of the ARN that uniquely identifies the logging configuration.
create_time(Option<DateTime>)
:Time when the logging configuration was created. This is an ISO 8601 timestamp; note that this is returned as a string.
update_time(Option<DateTime>)
:Time of the logging configuration’s last update. This is an ISO 8601 timestamp; note that this is returned as a string.
name(Option<String>)
:Logging-configuration name, from the request (if specified).
destination_configuration(Option<DestinationConfiguration>)
:A complex type that contains a destination configuration for where chat content will be logged, from the request. There is only one type of destination (
cloudWatchLogs
,firehose
, ors3
) in adestinationConfiguration
.state(Option<CreateLoggingConfigurationState>)
:The state of the logging configuration. When the state is
ACTIVE
, the configuration is ready to log chat content.tags(Option<HashMap::<String, String>>)
:Tags attached to the resource, from the request (if specified). Array of maps, each of the form
string:string (key:value)
.
- On failure, responds with
SdkError<CreateLoggingConfigurationError>
source§impl Client
impl Client
sourcepub fn create_room(&self) -> CreateRoomFluentBuilder
pub fn create_room(&self) -> CreateRoomFluentBuilder
Constructs a fluent builder for the CreateRoom
operation.
- The fluent builder is configurable:
name(impl Into<String>)
/set_name(Option<String>)
:
required: falseRoom name. The value does not need to be unique.
maximum_message_rate_per_second(i32)
/set_maximum_message_rate_per_second(Option<i32>)
:
required: falseMaximum number of messages per second that can be sent to the room (by all clients). Default: 10.
maximum_message_length(i32)
/set_maximum_message_length(Option<i32>)
:
required: falseMaximum number of characters in a single message. Messages are expected to be UTF-8 encoded and this limit applies specifically to rune/code-point count, not number of bytes. Default: 500.
message_review_handler(MessageReviewHandler)
/set_message_review_handler(Option<MessageReviewHandler>)
:
required: falseConfiguration information for optional review of messages.
tags(impl Into<String>, impl Into<String>)
/set_tags(Option<HashMap::<String, String>>)
:
required: falseTags to attach to the resource. Array of maps, each of the form
string:string (key:value)
. See Tagging AWS Resources for details, including restrictions that apply to tags and “Tag naming limits and requirements”; Amazon IVS Chat has no constraints beyond what is documented there.logging_configuration_identifiers(impl Into<String>)
/set_logging_configuration_identifiers(Option<Vec::<String>>)
:
required: falseArray of logging-configuration identifiers attached to the room.
- On success, responds with
CreateRoomOutput
with field(s):arn(Option<String>)
:Room ARN, assigned by the system.
id(Option<String>)
:Room ID, generated by the system. This is a relative identifier, the part of the ARN that uniquely identifies the room.
name(Option<String>)
:Room name, from the request (if specified).
create_time(Option<DateTime>)
:Time when the room was created. This is an ISO 8601 timestamp; note that this is returned as a string.
update_time(Option<DateTime>)
:Time of the room’s last update. This is an ISO 8601 timestamp; note that this is returned as a string.
maximum_message_rate_per_second(Option<i32>)
:Maximum number of messages per second that can be sent to the room (by all clients), from the request (if specified).
maximum_message_length(Option<i32>)
:Maximum number of characters in a single message, from the request (if specified).
message_review_handler(Option<MessageReviewHandler>)
:Configuration information for optional review of messages.
tags(Option<HashMap::<String, String>>)
:Tags attached to the resource, from the request (if specified).
logging_configuration_identifiers(Option<Vec::<String>>)
:Array of logging configurations attached to the room, from the request (if specified).
- On failure, responds with
SdkError<CreateRoomError>
source§impl Client
impl Client
sourcepub fn delete_logging_configuration(
&self
) -> DeleteLoggingConfigurationFluentBuilder
pub fn delete_logging_configuration( &self ) -> DeleteLoggingConfigurationFluentBuilder
Constructs a fluent builder for the DeleteLoggingConfiguration
operation.
- The fluent builder is configurable:
identifier(impl Into<String>)
/set_identifier(Option<String>)
:
required: trueIdentifier of the logging configuration to be deleted.
- On success, responds with
DeleteLoggingConfigurationOutput
- On failure, responds with
SdkError<DeleteLoggingConfigurationError>
source§impl Client
impl Client
sourcepub fn delete_message(&self) -> DeleteMessageFluentBuilder
pub fn delete_message(&self) -> DeleteMessageFluentBuilder
Constructs a fluent builder for the DeleteMessage
operation.
- The fluent builder is configurable:
room_identifier(impl Into<String>)
/set_room_identifier(Option<String>)
:
required: trueIdentifier of the room where the message should be deleted. Currently this must be an ARN.
id(impl Into<String>)
/set_id(Option<String>)
:
required: trueID of the message to be deleted. This is the
Id
field in the received message (see Message (Subscribe) in the Chat Messaging API).reason(impl Into<String>)
/set_reason(Option<String>)
:
required: falseReason for deleting the message.
- On success, responds with
DeleteMessageOutput
with field(s):id(Option<String>)
:Operation identifier, generated by Amazon IVS Chat.
- On failure, responds with
SdkError<DeleteMessageError>
source§impl Client
impl Client
sourcepub fn delete_room(&self) -> DeleteRoomFluentBuilder
pub fn delete_room(&self) -> DeleteRoomFluentBuilder
Constructs a fluent builder for the DeleteRoom
operation.
- The fluent builder is configurable:
identifier(impl Into<String>)
/set_identifier(Option<String>)
:
required: trueIdentifier of the room to be deleted. Currently this must be an ARN.
- On success, responds with
DeleteRoomOutput
- On failure, responds with
SdkError<DeleteRoomError>
source§impl Client
impl Client
sourcepub fn disconnect_user(&self) -> DisconnectUserFluentBuilder
pub fn disconnect_user(&self) -> DisconnectUserFluentBuilder
Constructs a fluent builder for the DisconnectUser
operation.
- The fluent builder is configurable:
room_identifier(impl Into<String>)
/set_room_identifier(Option<String>)
:
required: trueIdentifier of the room from which the user’s clients should be disconnected. Currently this must be an ARN.
user_id(impl Into<String>)
/set_user_id(Option<String>)
:
required: trueID of the user (connection) to disconnect from the room.
reason(impl Into<String>)
/set_reason(Option<String>)
:
required: falseReason for disconnecting the user.
- On success, responds with
DisconnectUserOutput
- On failure, responds with
SdkError<DisconnectUserError>
source§impl Client
impl Client
sourcepub fn get_logging_configuration(&self) -> GetLoggingConfigurationFluentBuilder
pub fn get_logging_configuration(&self) -> GetLoggingConfigurationFluentBuilder
Constructs a fluent builder for the GetLoggingConfiguration
operation.
- The fluent builder is configurable:
identifier(impl Into<String>)
/set_identifier(Option<String>)
:
required: trueIdentifier of the logging configuration to be retrieved.
- On success, responds with
GetLoggingConfigurationOutput
with field(s):arn(Option<String>)
:Logging-configuration ARN, from the request (if
identifier
was an ARN).id(Option<String>)
:Logging-configuration ID, generated by the system. This is a relative identifier, the part of the ARN that uniquely identifies the logging configuration.
create_time(Option<DateTime>)
:Time when the logging configuration was created. This is an ISO 8601 timestamp; note that this is returned as a string.
update_time(Option<DateTime>)
:Time of the logging configuration’s last update. This is an ISO 8601 timestamp; note that this is returned as a string.
name(Option<String>)
:Logging-configuration name. This value does not need to be unique.
destination_configuration(Option<DestinationConfiguration>)
:A complex type that contains a destination configuration for where chat content will be logged. There is only one type of destination (
cloudWatchLogs
,firehose
, ors3
) in adestinationConfiguration
.state(Option<LoggingConfigurationState>)
:The state of the logging configuration. When the state is
ACTIVE
, the configuration is ready to log chat content.tags(Option<HashMap::<String, String>>)
:Tags attached to the resource. Array of maps, each of the form
string:string (key:value)
.
- On failure, responds with
SdkError<GetLoggingConfigurationError>
source§impl Client
impl Client
sourcepub fn get_room(&self) -> GetRoomFluentBuilder
pub fn get_room(&self) -> GetRoomFluentBuilder
Constructs a fluent builder for the GetRoom
operation.
- The fluent builder is configurable:
identifier(impl Into<String>)
/set_identifier(Option<String>)
:
required: trueIdentifier of the room for which the configuration is to be retrieved. Currently this must be an ARN.
- On success, responds with
GetRoomOutput
with field(s):arn(Option<String>)
:Room ARN, from the request (if
identifier
was an ARN).id(Option<String>)
:Room ID, generated by the system. This is a relative identifier, the part of the ARN that uniquely identifies the room.
name(Option<String>)
:Room name. The value does not need to be unique.
create_time(Option<DateTime>)
:Time when the room was created. This is an ISO 8601 timestamp; note that this is returned as a string.
update_time(Option<DateTime>)
:Time of the room’s last update. This is an ISO 8601 timestamp; note that this is returned as a string.
maximum_message_rate_per_second(Option<i32>)
:Maximum number of messages per second that can be sent to the room (by all clients). Default: 10.
maximum_message_length(Option<i32>)
:Maximum number of characters in a single message. Messages are expected to be UTF-8 encoded and this limit applies specifically to rune/code-point count, not number of bytes. Default: 500.
message_review_handler(Option<MessageReviewHandler>)
:Configuration information for optional review of messages.
tags(Option<HashMap::<String, String>>)
:Tags attached to the resource. Array of maps, each of the form
string:string (key:value)
.logging_configuration_identifiers(Option<Vec::<String>>)
:Array of logging configurations attached to the room.
- On failure, responds with
SdkError<GetRoomError>
source§impl Client
impl Client
sourcepub fn list_logging_configurations(
&self
) -> ListLoggingConfigurationsFluentBuilder
pub fn list_logging_configurations( &self ) -> ListLoggingConfigurationsFluentBuilder
Constructs a fluent builder for the ListLoggingConfigurations
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe first logging configurations to retrieve. This is used for pagination; see the
nextToken
response field.max_results(i32)
/set_max_results(Option<i32>)
:
required: falseMaximum number of logging configurations to return. Default: 50.
- On success, responds with
ListLoggingConfigurationsOutput
with field(s):logging_configurations(Vec::<LoggingConfigurationSummary>)
:List of the matching logging configurations (summary information only). There is only one type of destination (
cloudWatchLogs
,firehose
, ors3
) in adestinationConfiguration
.next_token(Option<String>)
:If there are more logging configurations than
maxResults
, usenextToken
in the request to get the next set.
- On failure, responds with
SdkError<ListLoggingConfigurationsError>
source§impl Client
impl Client
sourcepub fn list_rooms(&self) -> ListRoomsFluentBuilder
pub fn list_rooms(&self) -> ListRoomsFluentBuilder
Constructs a fluent builder for the ListRooms
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
name(impl Into<String>)
/set_name(Option<String>)
:
required: falseFilters the list to match the specified room name.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe first room to retrieve. This is used for pagination; see the
nextToken
response field.max_results(i32)
/set_max_results(Option<i32>)
:
required: falseMaximum number of rooms to return. Default: 50.
message_review_handler_uri(impl Into<String>)
/set_message_review_handler_uri(Option<String>)
:
required: falseFilters the list to match the specified message review handler URI.
logging_configuration_identifier(impl Into<String>)
/set_logging_configuration_identifier(Option<String>)
:
required: falseLogging-configuration identifier.
- On success, responds with
ListRoomsOutput
with field(s):rooms(Vec::<RoomSummary>)
:List of the matching rooms (summary information only).
next_token(Option<String>)
:If there are more rooms than
maxResults
, usenextToken
in the request to get the next set.
- On failure, responds with
SdkError<ListRoomsError>
source§impl Client
impl Client
Constructs a fluent builder for the ListTagsForResource
operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)
/set_resource_arn(Option<String>)
:
required: trueThe ARN of the resource to be retrieved. The ARN must be URL-encoded.
- On success, responds with
ListTagsForResourceOutput
with field(s):tags(HashMap::<String, String>)
:Tags attached to the resource. Array of maps, each of the form
string:string (key:value)
.
- On failure, responds with
SdkError<ListTagsForResourceError>
source§impl Client
impl Client
sourcepub fn send_event(&self) -> SendEventFluentBuilder
pub fn send_event(&self) -> SendEventFluentBuilder
Constructs a fluent builder for the SendEvent
operation.
- The fluent builder is configurable:
room_identifier(impl Into<String>)
/set_room_identifier(Option<String>)
:
required: trueIdentifier of the room to which the event will be sent. Currently this must be an ARN.
event_name(impl Into<String>)
/set_event_name(Option<String>)
:
required: trueApplication-defined name of the event to send to clients.
attributes(impl Into<String>, impl Into<String>)
/set_attributes(Option<HashMap::<String, String>>)
:
required: falseApplication-defined metadata to attach to the event sent to clients. The maximum length of the metadata is 1 KB total.
- On success, responds with
SendEventOutput
with field(s):id(Option<String>)
:An identifier generated by Amazon IVS Chat. This identifier must be used in subsequent operations for this message, such as DeleteMessage.
- On failure, responds with
SdkError<SendEventError>
source§impl Client
impl Client
sourcepub fn tag_resource(&self) -> TagResourceFluentBuilder
pub fn tag_resource(&self) -> TagResourceFluentBuilder
Constructs a fluent builder for the TagResource
operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)
/set_resource_arn(Option<String>)
:
required: trueThe ARN of the resource to be tagged. The ARN must be URL-encoded.
tags(impl Into<String>, impl Into<String>)
/set_tags(Option<HashMap::<String, String>>)
:
required: trueArray of tags to be added or updated. Array of maps, each of the form
string:string (key:value)
. See Tagging AWS Resources for details, including restrictions that apply to tags and “Tag naming limits and requirements”; Amazon IVS Chat has no constraints beyond what is documented there.
- On success, responds with
TagResourceOutput
- On failure, responds with
SdkError<TagResourceError>
source§impl Client
impl Client
sourcepub fn untag_resource(&self) -> UntagResourceFluentBuilder
pub fn untag_resource(&self) -> UntagResourceFluentBuilder
Constructs a fluent builder for the UntagResource
operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)
/set_resource_arn(Option<String>)
:
required: trueThe ARN of the resource to be untagged. The ARN must be URL-encoded.
tag_keys(impl Into<String>)
/set_tag_keys(Option<Vec::<String>>)
:
required: trueArray of tags to be removed. Array of maps, each of the form
string:string (key:value)
. See Tagging AWS Resources for details, including restrictions that apply to tags and “Tag naming limits and requirements”; Amazon IVS Chat has no constraints beyond what is documented there.
- On success, responds with
UntagResourceOutput
- On failure, responds with
SdkError<UntagResourceError>
source§impl Client
impl Client
sourcepub fn update_logging_configuration(
&self
) -> UpdateLoggingConfigurationFluentBuilder
pub fn update_logging_configuration( &self ) -> UpdateLoggingConfigurationFluentBuilder
Constructs a fluent builder for the UpdateLoggingConfiguration
operation.
- The fluent builder is configurable:
identifier(impl Into<String>)
/set_identifier(Option<String>)
:
required: trueIdentifier of the logging configuration to be updated.
name(impl Into<String>)
/set_name(Option<String>)
:
required: falseLogging-configuration name. The value does not need to be unique.
destination_configuration(DestinationConfiguration)
/set_destination_configuration(Option<DestinationConfiguration>)
:
required: falseA complex type that contains a destination configuration for where chat content will be logged. There can be only one type of destination (
cloudWatchLogs
,firehose
, ors3
) in adestinationConfiguration
.
- On success, responds with
UpdateLoggingConfigurationOutput
with field(s):arn(Option<String>)
:Logging-configuration ARN, from the request (if
identifier
was an ARN).id(Option<String>)
:Logging-configuration ID, generated by the system. This is a relative identifier, the part of the ARN that uniquely identifies the room.
create_time(Option<DateTime>)
:Time when the logging configuration was created. This is an ISO 8601 timestamp; note that this is returned as a string.
update_time(Option<DateTime>)
:Time of the logging configuration’s last update. This is an ISO 8601 timestamp; note that this is returned as a string.
name(Option<String>)
:Logging-configuration name, from the request (if specified).
destination_configuration(Option<DestinationConfiguration>)
:A complex type that contains a destination configuration for where chat content will be logged, from the request. There is only one type of destination (
cloudWatchLogs
,firehose
, ors3
) in adestinationConfiguration
.state(Option<UpdateLoggingConfigurationState>)
:The state of the logging configuration. When the state is
ACTIVE
, the configuration is ready to log chat content.tags(Option<HashMap::<String, String>>)
:Tags attached to the resource. Array of maps, each of the form
string:string (key:value)
.
- On failure, responds with
SdkError<UpdateLoggingConfigurationError>
source§impl Client
impl Client
sourcepub fn update_room(&self) -> UpdateRoomFluentBuilder
pub fn update_room(&self) -> UpdateRoomFluentBuilder
Constructs a fluent builder for the UpdateRoom
operation.
- The fluent builder is configurable:
identifier(impl Into<String>)
/set_identifier(Option<String>)
:
required: trueIdentifier of the room to be updated. Currently this must be an ARN.
name(impl Into<String>)
/set_name(Option<String>)
:
required: falseRoom name. The value does not need to be unique.
maximum_message_rate_per_second(i32)
/set_maximum_message_rate_per_second(Option<i32>)
:
required: falseMaximum number of messages per second that can be sent to the room (by all clients). Default: 10.
maximum_message_length(i32)
/set_maximum_message_length(Option<i32>)
:
required: falseThe maximum number of characters in a single message. Messages are expected to be UTF-8 encoded and this limit applies specifically to rune/code-point count, not number of bytes. Default: 500.
message_review_handler(MessageReviewHandler)
/set_message_review_handler(Option<MessageReviewHandler>)
:
required: falseConfiguration information for optional review of messages. Specify an empty
uri
string to disassociate a message review handler from the specified room.logging_configuration_identifiers(impl Into<String>)
/set_logging_configuration_identifiers(Option<Vec::<String>>)
:
required: falseArray of logging-configuration identifiers attached to the room.
- On success, responds with
UpdateRoomOutput
with field(s):arn(Option<String>)
:Room ARN, from the request (if
identifier
was an ARN).id(Option<String>)
:Room ID, generated by the system. This is a relative identifier, the part of the ARN that uniquely identifies the room.
name(Option<String>)
:Room name, from the request (if specified).
create_time(Option<DateTime>)
:Time when the room was created. This is an ISO 8601 timestamp; note that this is returned as a string.
update_time(Option<DateTime>)
:Time of the room’s last update. This is an ISO 8601 timestamp; note that this is returned as a string.
maximum_message_rate_per_second(Option<i32>)
:Maximum number of messages per second that can be sent to the room (by all clients), from the request (if specified).
maximum_message_length(Option<i32>)
:Maximum number of characters in a single message, from the request (if specified).
message_review_handler(Option<MessageReviewHandler>)
:Configuration information for optional review of messages.
tags(Option<HashMap::<String, String>>)
:Tags attached to the resource. Array of maps, each of the form
string:string (key:value)
.logging_configuration_identifiers(Option<Vec::<String>>)
:Array of logging configurations attached to the room, from the request (if specified).
- On failure, responds with
SdkError<UpdateRoomError>
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_impl
configured. - Identity caching is enabled without a
sleep_impl
andtime_source
configured. - No
behavior_version
is 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_config
is missing an async sleep implementation. If you experience this panic, set thesleep_impl
on the Config passed into this function to fix it. - This method will panic if the
sdk_config
is missing an HTTP connector. If you experience this panic, set thehttp_connector
on the Config passed into this function to fix it. - This method will panic if no
BehaviorVersion
is provided. If you experience this panic, setbehavior_version
on the Config or enable thebehavior-version-latest
Cargo 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> 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 more