pub struct PersistentService { /* private fields */ }Expand description
Transport-independent persistent service. This does not listen on a socket or select v2 for stdio. A local adapter owns framing, write deadlines, and explicit disconnects. Dropping this owner shuts down the daemon; disconnecting a connection does not. A failed/timeout submission is uncertain: never automatically replay a mutation.
Implementations§
Source§impl PersistentService
impl PersistentService
Sourcepub fn start() -> Result<Self>
pub fn start() -> Result<Self>
Load the normal runtime once and start its coordinator. No provider work runs until an initialized connection explicitly claims a durable session and starts a turn.
Sourcepub fn connect(&self) -> Result<String>
pub fn connect(&self) -> Result<String>
Allocate a pending connection. Initialize it within five seconds.
Sourcepub fn submit(&self, connection: &str, record: &[u8]) -> Result<()>
pub fn submit(&self, connection: &str, record: &[u8]) -> Result<()>
Submit one complete, bounded JSON record. Responses are read with next_record.
Sourcepub fn disconnect(&self, connection: &str) -> Result<()>
pub fn disconnect(&self, connection: &str) -> Result<()>
Revoke this connection’s control and cancel only its login, not accepted turns/settings.
Trait Implementations§
Source§impl Drop for PersistentService
impl Drop for PersistentService
Auto Trait Implementations§
impl !RefUnwindSafe for PersistentService
impl !UnwindSafe for PersistentService
impl Freeze for PersistentService
impl Send for PersistentService
impl Sync for PersistentService
impl Unpin for PersistentService
impl UnsafeUnpin for PersistentService
Blanket Implementations§
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 more