pub struct EmbeddedRpcSession { /* private fields */ }Expand description
One JSON-RPC session over an in-process engine, driven a request at a time instead of by a stdin loop.
This is the transport an embedded language binding (the Node addon) uses
so it speaks the exact protocol and method surface the red rpc --stdio
subprocess serves, without spawning anything: transactions, cursors and
prepared statements live in the [Session], and the runtime’s per-
connection transaction state is keyed by this session’s own connection id.
The connection id is a thread-local, so it is installed around every
handle call rather than once: the caller may service
requests from different threads (a binding’s worker pool) and must not
leak the id onto a thread that is returned to a pool.
Implementations§
Source§impl EmbeddedRpcSession
impl EmbeddedRpcSession
pub fn new(runtime: Arc<RedDBRuntime>) -> Self
Trait Implementations§
Source§impl Drop for EmbeddedRpcSession
impl Drop for EmbeddedRpcSession
Auto Trait Implementations§
impl !Freeze for EmbeddedRpcSession
impl !RefUnwindSafe for EmbeddedRpcSession
impl !UnwindSafe for EmbeddedRpcSession
impl Send for EmbeddedRpcSession
impl Sync for EmbeddedRpcSession
impl Unpin for EmbeddedRpcSession
impl UnsafeUnpin for EmbeddedRpcSession
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> 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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request