pub enum WcData {
Show 13 variants
SessionPing,
SessionPropose(SessionProposeParams),
SessionAuthenticate(SessionAuthenticateParams),
SessionSettle(SessionSettleParams),
SessionRequest(SessionRequestParams),
SessionDelete(Value),
SessionPingResponseSuccess,
SessionProposeResponse(SessionProposeResponse),
SessionAuthenticateResponse(SessionAuthenticateResponse),
SessionSettleResult(bool),
SessionRequestResponse(Value),
UnknownResult(Value),
Error {
message: String,
code: i64,
data: Option<Bytes>,
},
}
Variants§
SessionPing
SessionPropose(SessionProposeParams)
SessionAuthenticate(SessionAuthenticateParams)
SessionSettle(SessionSettleParams)
SessionRequest(SessionRequestParams)
SessionDelete(Value)
SessionPingResponseSuccess
SessionProposeResponse(SessionProposeResponse)
SessionAuthenticateResponse(SessionAuthenticateResponse)
SessionSettleResult(bool)
SessionRequestResponse(Value)
UnknownResult(Value)
Error
Implementations§
Source§impl WcData
impl WcData
pub fn method(&self) -> Option<WcMethod>
pub fn params(&self) -> Result<Option<Value>>
pub fn result(&self) -> Result<Option<Value>>
pub fn error(&self) -> Option<MessageError>
pub fn as_session_propose(&self) -> Option<&SessionProposeParams>
pub fn as_session_authenticate(&self) -> Option<&SessionAuthenticateParams>
pub fn as_session_settle(&self) -> Option<&SessionSettleParams>
pub fn as_session_request(&self) -> Option<&SessionRequestParams>
pub fn as_result<R>(&self) -> Option<R>where
R: DeserializeOwned,
Trait Implementations§
impl StructuralPartialEq for WcData
Auto Trait Implementations§
impl !Freeze for WcData
impl RefUnwindSafe for WcData
impl Send for WcData
impl Sync for WcData
impl Unpin for WcData
impl UnwindSafe for WcData
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