[][src]Struct no_proto::rpc::NP_RPC_Response

pub struct NP_RPC_Response<'response> {
    pub kind: NP_ResponseKinds,
    pub data: NP_Buffer<'response>,
    pub error: NP_Buffer<'response>,
    // some fields omitted
}

RPC Response object

Fields

kind: NP_ResponseKinds

what kind of response is this?

data: NP_Buffer<'response>

the data of this response

error: NP_Buffer<'response>

if this is an error, the error data

Implementations

impl<'request> NP_RPC_Response<'request>[src]

pub fn rpc_name(&self) -> &str[src]

Get the name of this RPC method

pub fn rpc_close(self) -> Result<Vec<u8>, NP_Error>[src]

Close this response

The only failure condition is if you set the kind to NP_ResponseKinds::Error but didn't have an error type declared in the rpc method.

Auto Trait Implementations

impl<'response> Send for NP_RPC_Response<'response>[src]

impl<'response> !Sync for NP_RPC_Response<'response>[src]

impl<'response> Unpin for NP_RPC_Response<'response>[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.