pub struct MessageServiceClient<Stub = Channel<MessageServiceRequest, MessageServiceResponse>>(Stub);Expand description
The client stub that makes RPC calls to the server. All request methods return Futures.
Tuple Fields§
§0: StubImplementations§
Source§impl MessageServiceClient
impl MessageServiceClient
Sourcepub fn new<T>(
config: Config,
transport: T,
) -> NewClient<Self, RequestDispatch<MessageServiceRequest, MessageServiceResponse, T>>where
T: Transport<ClientMessage<MessageServiceRequest>, Response<MessageServiceResponse>>,
pub fn new<T>(
config: Config,
transport: T,
) -> NewClient<Self, RequestDispatch<MessageServiceRequest, MessageServiceResponse, T>>where
T: Transport<ClientMessage<MessageServiceRequest>, Response<MessageServiceResponse>>,
Returns a new client stub that sends requests over the given transport.
Source§impl<Stub> MessageServiceClient<Stub>where
Stub: Stub<Req = MessageServiceRequest, Resp = MessageServiceResponse>,
impl<Stub> MessageServiceClient<Stub>where
Stub: Stub<Req = MessageServiceRequest, Resp = MessageServiceResponse>,
pub fn publish( &self, ctx: Context, message: MessageFull, ) -> impl Future<Output = Result<Result<PublishResult, MessageError>, RpcError>> + '_
Sourcepub fn message(
&self,
ctx: Context,
id: MessageId,
) -> impl Future<Output = Result<Result<Option<MessageFull>, MessageError>, RpcError>> + '_
pub fn message( &self, ctx: Context, id: MessageId, ) -> impl Future<Output = Result<Result<Option<MessageFull>, MessageError>, RpcError>> + '_
Retrieve a specific message by its ID
Sourcepub fn user_data(
&self,
ctx: Context,
author: KeyId,
storage_key: StoreKey,
) -> impl Future<Output = Result<Result<Option<MessageFull>, MessageError>, RpcError>> + '_
pub fn user_data( &self, ctx: Context, author: KeyId, storage_key: StoreKey, ) -> impl Future<Output = Result<Result<Option<MessageFull>, MessageError>, RpcError>> + '_
Retrieve a specific user’s data by their key and storage key
Sourcepub fn check_messages(
&self,
ctx: Context,
message_ids: Vec<MessageId>,
) -> impl Future<Output = Result<Result<Vec<Option<String>>, MessageError>, RpcError>> + '_
pub fn check_messages( &self, ctx: Context, message_ids: Vec<MessageId>, ) -> impl Future<Output = Result<Result<Vec<Option<String>>, MessageError>, RpcError>> + '_
Check which messages the server already has and return their global stream IDs.
Returns a vec of Option<String> in the same order as the input, where:
Some(stream_id)means the server has the message with that global stream IDNonemeans the server doesn’t have this message yet
Sourcepub fn subscribe(
&self,
ctx: Context,
config: SubscriptionConfig,
) -> impl Future<Output = Result<Result<(), MessageError>, RpcError>> + '_
pub fn subscribe( &self, ctx: Context, config: SubscriptionConfig, ) -> impl Future<Output = Result<Result<(), MessageError>, RpcError>> + '_
Start the subscription
Sourcepub fn update_filters(
&self,
ctx: Context,
request: FilterUpdateRequest,
) -> impl Future<Output = Result<Result<SubscriptionConfig, MessageError>, RpcError>> + '_
pub fn update_filters( &self, ctx: Context, request: FilterUpdateRequest, ) -> impl Future<Output = Result<Result<SubscriptionConfig, MessageError>, RpcError>> + '_
Update the running subscription filters with the actions. Returns the now final subscription config.
Sourcepub fn catch_up(
&self,
ctx: Context,
request: CatchUpRequest,
) -> impl Future<Output = Result<Result<SubscriptionConfig, MessageError>, RpcError>> + '_
pub fn catch_up( &self, ctx: Context, request: CatchUpRequest, ) -> impl Future<Output = Result<Result<SubscriptionConfig, MessageError>, RpcError>> + '_
Update the internal subscription and catch up to the latest stream height for the given filter
Trait Implementations§
Source§impl<Stub: Clone> Clone for MessageServiceClient<Stub>
impl<Stub: Clone> Clone for MessageServiceClient<Stub>
Source§fn clone(&self) -> MessageServiceClient<Stub>
fn clone(&self) -> MessageServiceClient<Stub>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<Stub: Debug> Debug for MessageServiceClient<Stub>
impl<Stub: Debug> Debug for MessageServiceClient<Stub>
Source§impl<Stub> From<Stub> for MessageServiceClient<Stub>where
Stub: Stub<Req = MessageServiceRequest, Resp = MessageServiceResponse>,
impl<Stub> From<Stub> for MessageServiceClient<Stub>where
Stub: Stub<Req = MessageServiceRequest, Resp = MessageServiceResponse>,
Auto Trait Implementations§
impl<Stub> Freeze for MessageServiceClient<Stub>where
Stub: Freeze,
impl<Stub> RefUnwindSafe for MessageServiceClient<Stub>where
Stub: RefUnwindSafe,
impl<Stub> Send for MessageServiceClient<Stub>where
Stub: Send,
impl<Stub> Sync for MessageServiceClient<Stub>where
Stub: Sync,
impl<Stub> Unpin for MessageServiceClient<Stub>where
Stub: Unpin,
impl<Stub> UnwindSafe for MessageServiceClient<Stub>where
Stub: UnwindSafe,
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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