pub enum Message {
Request(Request),
Response(Response),
Notification(Notification),
Batch(Vec<Message>),
}Variants§
Implementations§
Source§impl Message
impl Message
pub fn from_json(value: Value) -> Result<Self, InternalError>
pub fn to_json(&self) -> Result<Value, Error>
pub fn id(&self) -> Option<&RequestId>
pub fn is_request(&self) -> bool
pub fn is_response(&self) -> bool
pub fn is_notification(&self) -> bool
pub fn is_batch(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Message
impl RefUnwindSafe for Message
impl Send for Message
impl Sync for Message
impl Unpin for Message
impl UnsafeUnpin for Message
impl UnwindSafe for Message
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