pub struct ServiceServer { /* private fields */ }Expand description
Eidetica service server that listens on a Unix domain socket.
The server wraps a full Instance so it can dispatch both storage operations
(via the backend) and write callbacks (via Instance::put_entry()’s notification path).
CRDT-state caching lives in the underlying BackendImpl (scope-keyed
via crate::backend::CacheScope); wire handlers route through
instance.backend() directly rather than keeping a separate
service-layer cache.
Implementations§
Source§impl ServiceServer
impl ServiceServer
Sourcepub async fn bind(
instance: Instance,
socket_path: impl Into<PathBuf>,
) -> Result<Self>
pub async fn bind( instance: Instance, socket_path: impl Into<PathBuf>, ) -> Result<Self>
Bind the service socket and return a server ready to accept clients.
§Arguments
instance- The Instance to serve. The server holds a strong reference.socket_path- Path for the Unix domain socket.
Sourcepub async fn bind_with_token_idle_ttl_for_test(
instance: Instance,
socket_path: impl Into<PathBuf>,
ttl: Duration,
) -> Result<Self>
pub async fn bind_with_token_idle_ttl_for_test( instance: Instance, socket_path: impl Into<PathBuf>, ttl: Duration, ) -> Result<Self>
Bind with a shorter session-token lifetime for expiry tests.
Sourcepub fn socket_path(&self) -> &Path
pub fn socket_path(&self) -> &Path
Get the socket path.
Trait Implementations§
Source§impl Drop for ServiceServer
impl Drop for ServiceServer
Auto Trait Implementations§
impl !Freeze for ServiceServer
impl !RefUnwindSafe for ServiceServer
impl Send for ServiceServer
impl Sync for ServiceServer
impl Unpin for ServiceServer
impl UnsafeUnpin for ServiceServer
impl !UnwindSafe for ServiceServer
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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