[−][src]Struct kayrx::jrpc::raw::server::RawServer
Wraps around a "raw server" and adds capabilities.
See the module-level documentation for more information.
Methods
impl<R, I> RawServer<R, I> where
R: TransportServer<RequestId = I>,
I: Clone + PartialEq + Eq + Hash + Send + Sync,
[src]
R: TransportServer<RequestId = I>,
I: Clone + PartialEq + Eq + Hash + Send + Sync,
pub fn new(inner: R) -> RawServer<R, I>
[src]
Starts a RawServer
using the given raw server internally.
impl<R, I> RawServer<R, I> where
R: TransportServer<RequestId = I>,
I: Clone + PartialEq + Eq + Hash + Send + Sync,
[src]
R: TransportServer<RequestId = I>,
I: Clone + PartialEq + Eq + Hash + Send + Sync,
pub async fn next_event<'a>(&'a mut self) -> RawServerEvent<'a, R, I>
[src]
Returns a Future
resolving to the next event that this server generates.
pub fn request_by_id<'a>(
&'a mut self,
id: &RawServerRequestId
) -> Option<RawServerRequest<'a, R, I>>
[src]
&'a mut self,
id: &RawServerRequestId
) -> Option<RawServerRequest<'a, R, I>>
Returns a request previously returned by next_event
by its id.
Note that previous notifications don't have an ID and can't be accessed with this method.
Returns None
if the request ID is invalid or if the request has already been answered in
the past.
pub fn subscription_by_id(
&mut self,
id: RawServerSubscriptionId
) -> Option<ServerSubscription<R, I>>
[src]
&mut self,
id: RawServerSubscriptionId
) -> Option<ServerSubscription<R, I>>
Returns a subscription previously returned by
into_subscription
.
Trait Implementations
impl<R> From<R> for RawServer<R, R::RequestId> where
R: TransportServer,
[src]
R: TransportServer,
impl<R, I> From<RawServer<R, I>> for Server where
R: TransportServer<RequestId = I> + Send + Sync + 'static,
I: Clone + PartialEq + Eq + Hash + Send + Sync + 'static,
[src]
R: TransportServer<RequestId = I> + Send + Sync + 'static,
I: Clone + PartialEq + Eq + Hash + Send + Sync + 'static,
Initializes a new server based upon this raw server.
Auto Trait Implementations
impl<R, I> RefUnwindSafe for RawServer<R, I> where
I: RefUnwindSafe,
R: RefUnwindSafe,
I: RefUnwindSafe,
R: RefUnwindSafe,
impl<R, I> Send for RawServer<R, I> where
I: Send,
R: Send,
I: Send,
R: Send,
impl<R, I> Sync for RawServer<R, I> where
I: Sync,
R: Sync,
I: Sync,
R: Sync,
impl<R, I> Unpin for RawServer<R, I> where
I: Unpin,
R: Unpin,
I: Unpin,
R: Unpin,
impl<R, I> UnwindSafe for RawServer<R, I> where
I: RefUnwindSafe + UnwindSafe,
R: UnwindSafe,
I: RefUnwindSafe + UnwindSafe,
R: UnwindSafe,
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>,