pub struct OutgoingMessageSender { /* private fields */ }Implementations§
Source§impl OutgoingMessageSender
impl OutgoingMessageSender
pub fn channel(capacity: usize) -> (Self, Receiver<OutgoingEnvelope>)
pub async fn register_connection(&self, connection_id: ConnectionId)
pub async fn configure_connection( &self, connection_id: ConnectionId, opt_out_notification_methods: HashSet<String>, )
pub async fn mark_ready_for_notifications(&self, connection_id: ConnectionId)
pub async fn send_response( &self, connection_id: ConnectionId, id: RequestId, result: Value, ) -> Result<(), AppServerError>
pub async fn send_error( &self, connection_id: ConnectionId, id: RequestId, error: AppServerError, ) -> Result<(), AppServerError>
pub async fn send_notification( &self, connection_id: ConnectionId, notification: ServerNotification, ) -> Result<(), AppServerError>
pub async fn broadcast_initialized_client_notification( &self, notification: ServerNotification, ) -> Result<(), AppServerError>
pub async fn send_server_request( &self, connection_id: ConnectionId, request: ServerRequest, ) -> Result<(RequestId, Receiver<ServerRequestResult>), AppServerError>
pub async fn send_server_request_with_timeout( &self, connection_id: ConnectionId, request: ServerRequest, timeout: Duration, ) -> Result<Value, AppServerError>
pub async fn pending_server_request_count(&self) -> usize
pub async fn send_server_request_with_id( &self, connection_id: ConnectionId, id: RequestId, request: ServerRequest, ) -> Result<Receiver<ServerRequestResult>, AppServerError>
pub async fn send_server_request_with_id_and_timeout( &self, connection_id: ConnectionId, id: RequestId, request: ServerRequest, timeout: Duration, ) -> Result<Value, AppServerError>
pub async fn send_json_rpc_request( &self, connection_id: ConnectionId, id: RequestId, method: String, params: Option<Value>, ) -> Result<(), AppServerError>
pub async fn resolve_server_response(&self, response: JsonRpcResponse) -> bool
pub async fn resolve_server_error(&self, error: JsonRpcError) -> bool
Trait Implementations§
Source§impl Clone for OutgoingMessageSender
impl Clone for OutgoingMessageSender
Source§fn clone(&self) -> OutgoingMessageSender
fn clone(&self) -> OutgoingMessageSender
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for OutgoingMessageSender
impl !UnwindSafe for OutgoingMessageSender
impl Freeze for OutgoingMessageSender
impl Send for OutgoingMessageSender
impl Sync for OutgoingMessageSender
impl Unpin for OutgoingMessageSender
impl UnsafeUnpin for OutgoingMessageSender
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> 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>
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 moreCreates a shared type from an unshared type.