pub struct ClientWrapper { /* private fields */ }
Expand description
A wrapper around Client
. Helps reduce external imports.
Methods from Deref<Target = Client<DynConnector, Identity>>§
Sourcepub fn get_direct_thread(&self) -> GetDirectThread<C, M, R>
pub fn get_direct_thread(&self) -> GetDirectThread<C, M, R>
Constructs a fluent builder for the GetDirectThread
operation.
- The fluent builder is configurable:
identity_id(impl Into<String>)
/set_identity_id(Option<String>)
: A universally unique identifier.
- On success, responds with
GetDirectThreadOutput
with field(s):thread_id(Option<String>)
: A universally unique identifier.identity(Option<IdentityHandle>)
: An identity handle.
- On failure, responds with
SdkError<GetDirectThreadError>
Sourcepub fn get_thread_history(&self) -> GetThreadHistory<C, M, R>
pub fn get_thread_history(&self) -> GetThreadHistory<C, M, R>
Constructs a fluent builder for the GetThreadHistory
operation.
- The fluent builder is configurable:
thread_id(impl Into<String>)
/set_thread_id(Option<String>)
: A universally unique identifier.ts(DateTime)
/set_ts(Option<DateTime>)
: RFC3339 timestamp.count(i32)
/set_count(Option<i32>)
: How many messages to collect in each direction. If queryingrivet.api.chat.common#QueryDirection$before_and_after
,rivet.api.chat.common#QueryDirection$chat_messages
will becount * 2
.query_direction(QueryDirection)
/set_query_direction(Option<QueryDirection>)
: Represents which direction to query messages from relative to the given timestamp.
- On success, responds with
GetThreadHistoryOutput
with field(s):chat_messages(Option<Vec<ChatMessage>>)
: Ordered old to new. If queryingrivet.api.chat.common#before_and_after
, this will becount * 2
long.
- On failure, responds with
SdkError<GetThreadHistoryError>
Sourcepub fn get_thread_topic(&self) -> GetThreadTopic<C, M, R>
pub fn get_thread_topic(&self) -> GetThreadTopic<C, M, R>
Constructs a fluent builder for the GetThreadTopic
operation.
- The fluent builder is configurable:
thread_id(impl Into<String>)
/set_thread_id(Option<String>)
: A universally unique identifier.
- On success, responds with
GetThreadTopicOutput
with field(s):topic(Option<ChatSimpleTopic>)
: Represents a topic of the given chat thread without the associated handles for the topic.
- On failure, responds with
SdkError<GetThreadTopicError>
Sourcepub fn send_chat_message(&self) -> SendChatMessage<C, M, R>
pub fn send_chat_message(&self) -> SendChatMessage<C, M, R>
Constructs a fluent builder for the SendChatMessage
operation.
- The fluent builder is configurable:
topic(SendChatTopic)
/set_topic(Option<SendChatTopic>)
: Topic to send a chat message to. If you already know the thread ID, usethread_id
.message_body(SendMessageBody)
/set_message_body(Option<SendMessageBody>)
: Data to send in a chat message.
- On success, responds with
SendChatMessageOutput
with field(s):chat_message_id(Option<String>)
: A universally unique identifier.
- On failure, responds with
SdkError<SendChatMessageError>
Sourcepub fn set_thread_read(&self) -> SetThreadRead<C, M, R>
pub fn set_thread_read(&self) -> SetThreadRead<C, M, R>
Constructs a fluent builder for the SetThreadRead
operation.
- The fluent builder is configurable:
thread_id(impl Into<String>)
/set_thread_id(Option<String>)
: A universally unique identifier.last_read_ts(DateTime)
/set_last_read_ts(Option<DateTime>)
: Any messages newer than this timestamp will be marked as unread. This should be the current timestamp (in milliseconds).
- On success, responds with
SetThreadReadOutput
- On failure, responds with
SdkError<SetThreadReadError>
Sourcepub fn set_typing_status(&self) -> SetTypingStatus<C, M, R>
pub fn set_typing_status(&self) -> SetTypingStatus<C, M, R>
Constructs a fluent builder for the SetTypingStatus
operation.
- The fluent builder is configurable:
thread_id(impl Into<String>)
/set_thread_id(Option<String>)
: A universally unique identifier.status(ChatTypingStatus)
/set_status(Option<ChatTypingStatus>)
: Represents a chat typing status.
- On success, responds with
SetTypingStatusOutput
- On failure, responds with
SdkError<SetTypingStatusError>
Sourcepub fn watch_thread(&self) -> WatchThread<C, M, R>
pub fn watch_thread(&self) -> WatchThread<C, M, R>
Constructs a fluent builder for the WatchThread
operation.
- The fluent builder is configurable:
thread_id(impl Into<String>)
/set_thread_id(Option<String>)
: A universally unique identifier.watch_index(impl Into<String>)
/set_watch_index(Option<String>)
: A query parameter denoting the requests watch index.
- On success, responds with
WatchThreadOutput
with field(s):chat_messages(Option<Vec<ChatMessage>>)
: All messages new messages posted to this thread. Ordered old to new.typing_statuses(Option<Vec<ChatIdentityTypingStatus>>)
: All identities that are currently typing in this thread.watch(Option<WatchResponse>)
: Provided by watchable endpoints used in blocking loops.
- On failure, responds with
SdkError<WatchThreadError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ClientWrapper
impl !RefUnwindSafe for ClientWrapper
impl Send for ClientWrapper
impl Sync for ClientWrapper
impl Unpin for ClientWrapper
impl !UnwindSafe for ClientWrapper
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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