Enum solana_jsonrpc_core::types::response::Output [−][src]
Represents output - failure or success
Variants
Success(Success)
Success
Failure(Failure)
Failure
Methods
impl Output
[src]
impl Output
pub fn from(result: CoreResult<Value>, id: Id, jsonrpc: Option<Version>) -> Self
[src]
pub fn from(result: CoreResult<Value>, id: Id, jsonrpc: Option<Version>) -> Self
Creates new output given Result
, Id
and Version
.
pub fn invalid_request(id: Id, jsonrpc: Option<Version>) -> Self
[src]
pub fn invalid_request(id: Id, jsonrpc: Option<Version>) -> Self
Creates new failure output indicating malformed request.
pub fn version(&self) -> Option<Version>
[src]
pub fn version(&self) -> Option<Version>
Get the jsonrpc protocol version.
pub fn id(&self) -> &Id
[src]
pub fn id(&self) -> &Id
Get the correlation id.
Trait Implementations
impl Debug for Output
[src]
impl Debug for Output
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialEq for Output
[src]
impl PartialEq for Output
fn eq(&self, other: &Output) -> bool
[src]
fn eq(&self, other: &Output) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Output) -> bool
[src]
fn ne(&self, other: &Output) -> bool
This method tests for !=
.
impl Clone for Output
[src]
impl Clone for Output
fn clone(&self) -> Output
[src]
fn clone(&self) -> Output
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl From<Output> for CoreResult<Value>
[src]
impl From<Output> for CoreResult<Value>
fn from(output: Output) -> CoreResult<Value>
[src]
fn from(output: Output) -> CoreResult<Value>
Convert into a result. Will be Ok
if it is a Success
and Err
if Failure
.