Struct lighthouse_protocol::ServerMessage
source · pub struct ServerMessage<P> {
pub code: i32,
pub request_id: Option<i32>,
pub warnings: Vec<String>,
pub response: Option<String>,
pub payload: P,
}
Expand description
A message originating from the lighthouse server.
Fields§
§code: i32
§request_id: Option<i32>
§warnings: Vec<String>
§response: Option<String>
§payload: P
Implementations§
source§impl ServerMessage<Value>
impl ServerMessage<Value>
pub fn decode_payload<R>(self) -> Result<ServerMessage<R>, ValueError>where
R: for<'de> Deserialize<'de>,
Trait Implementations§
source§impl<P: Clone> Clone for ServerMessage<P>
impl<P: Clone> Clone for ServerMessage<P>
source§fn clone(&self) -> ServerMessage<P>
fn clone(&self) -> ServerMessage<P>
Returns a copy 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<P: Debug> Debug for ServerMessage<P>
impl<P: Debug> Debug for ServerMessage<P>
source§impl<'de, P> Deserialize<'de> for ServerMessage<P>where
P: Deserialize<'de>,
impl<'de, P> Deserialize<'de> for ServerMessage<P>where
P: Deserialize<'de>,
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<P: PartialEq> PartialEq for ServerMessage<P>
impl<P: PartialEq> PartialEq for ServerMessage<P>
source§fn eq(&self, other: &ServerMessage<P>) -> bool
fn eq(&self, other: &ServerMessage<P>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<P> Serialize for ServerMessage<P>where
P: Serialize,
impl<P> Serialize for ServerMessage<P>where
P: Serialize,
impl<P: Eq> Eq for ServerMessage<P>
impl<P> StructuralPartialEq for ServerMessage<P>
Auto Trait Implementations§
impl<P> Freeze for ServerMessage<P>where
P: Freeze,
impl<P> RefUnwindSafe for ServerMessage<P>where
P: RefUnwindSafe,
impl<P> Send for ServerMessage<P>where
P: Send,
impl<P> Sync for ServerMessage<P>where
P: Sync,
impl<P> Unpin for ServerMessage<P>where
P: Unpin,
impl<P> UnwindSafe for ServerMessage<P>where
P: UnwindSafe,
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