[−][src]Struct kayrx::jrpc::raw::server::TypedResponder
Allows responding to a server request in a more elegant and strongly-typed fashion.
Methods
impl<'a, R, I, T> TypedResponder<'a, R, I, T> where
R: TransportServer<RequestId = I>,
I: Clone + PartialEq + Eq + Hash + Send + Sync,
T: Serialize,
[src]
R: TransportServer<RequestId = I>,
I: Clone + PartialEq + Eq + Hash + Send + Sync,
T: Serialize,
pub async fn ok(self, response: impl Into<T>)
[src]
Returns a successful response.
pub async fn err(self, err: Error)
[src]
Returns an erroneous response.
pub async fn respond(self, response: Result<impl Into<T>, Error>)
[src]
Returns a response.
Trait Implementations
impl<'a, R, I, T> From<RawServerRequest<'a, R, I>> for TypedResponder<'a, R, I, T>
[src]
fn from(rq: RawServerRequest<'a, R, I>) -> TypedResponder<'a, R, I, T>
[src]
Auto Trait Implementations
impl<'a, R, I, T> RefUnwindSafe for TypedResponder<'a, R, I, T> where
I: RefUnwindSafe,
R: RefUnwindSafe,
T: RefUnwindSafe,
I: RefUnwindSafe,
R: RefUnwindSafe,
T: RefUnwindSafe,
impl<'a, R, I, T> Send for TypedResponder<'a, R, I, T> where
I: Send,
R: Send,
T: Send,
I: Send,
R: Send,
T: Send,
impl<'a, R, I, T> Sync for TypedResponder<'a, R, I, T> where
I: Sync,
R: Sync,
T: Sync,
I: Sync,
R: Sync,
T: Sync,
impl<'a, R, I, T> Unpin for TypedResponder<'a, R, I, T> where
T: Unpin,
T: Unpin,
impl<'a, R, I, T> !UnwindSafe for TypedResponder<'a, R, I, T>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,