pub enum Message<Req = Request, Resp = WithMeta<Map<String, Value>, Map<String, Value>>, Noti = Notification> {
Request(Req, NumberOrString),
Response(Resp, NumberOrString),
Error(ErrorData, NumberOrString),
Notification(Noti),
}
Variants§
Request(Req, NumberOrString)
Response(Resp, NumberOrString)
Error(ErrorData, NumberOrString)
Notification(Noti)
Implementations§
Source§impl<Req, Resp, Noti> Message<Req, Resp, Noti>
impl<Req, Resp, Noti> Message<Req, Resp, Noti>
pub fn into_notification(self) -> Option<Noti>
pub fn into_response(self) -> Option<(Resp, NumberOrString)>
pub fn into_request(self) -> Option<(Req, NumberOrString)>
pub fn into_error(self) -> Option<(ErrorData, NumberOrString)>
pub fn into_result(self) -> Option<(Result<Resp, ErrorData>, NumberOrString)>
pub fn into_json_rpc_message(self) -> JsonRpcMessage<Req, Resp, Noti>
Trait Implementations§
Source§impl<Req, Resp, Noti> PartialEq for Message<Req, Resp, Noti>
impl<Req, Resp, Noti> PartialEq for Message<Req, Resp, Noti>
impl<Req, Resp, Noti> StructuralPartialEq for Message<Req, Resp, Noti>
Auto Trait Implementations§
impl<Req, Resp, Noti> Freeze for Message<Req, Resp, Noti>
impl<Req, Resp, Noti> RefUnwindSafe for Message<Req, Resp, Noti>
impl<Req, Resp, Noti> Send for Message<Req, Resp, Noti>
impl<Req, Resp, Noti> Sync for Message<Req, Resp, Noti>
impl<Req, Resp, Noti> Unpin for Message<Req, Resp, Noti>
impl<Req, Resp, Noti> UnwindSafe for Message<Req, Resp, Noti>
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 more