pub struct SyncServerBuilder<S = MissingServerStore, E = MissingServerExecutor, R = MissingServerConflicts, C = MissingServerClock> { /* private fields */ }Expand description
Fluent type-state builder for an authoritative synchronization service.
Implementations§
Source§impl<S, E, R, C> SyncServerBuilder<S, E, R, C>
impl<S, E, R, C> SyncServerBuilder<S, E, R, C>
Sourcepub fn store<S2>(self, store: Arc<S2>) -> SyncServerBuilder<Arc<S2>, E, R, C>
pub fn store<S2>(self, store: Arc<S2>) -> SyncServerBuilder<Arc<S2>, E, R, C>
Installs or replaces the authoritative store.
Sourcepub fn executor<E2>(
self,
executor: Arc<E2>,
) -> SyncServerBuilder<S, Arc<E2>, R, C>
pub fn executor<E2>( self, executor: Arc<E2>, ) -> SyncServerBuilder<S, Arc<E2>, R, C>
Installs or replaces the typed operation executor or registry.
Sourcepub fn conflicts<R2>(
self,
conflicts: Arc<R2>,
) -> SyncServerBuilder<S, E, Arc<R2>, C>
pub fn conflicts<R2>( self, conflicts: Arc<R2>, ) -> SyncServerBuilder<S, E, Arc<R2>, C>
Installs or replaces the conflict-policy resolver.
Sourcepub fn clock<C2>(self, clock: Arc<C2>) -> SyncServerBuilder<S, E, R, Arc<C2>>
pub fn clock<C2>(self, clock: Arc<C2>) -> SyncServerBuilder<S, E, R, Arc<C2>>
Installs or replaces the hybrid timestamp clock.
Sourcepub const fn config(self, config: ServerConfig) -> Self
pub const fn config(self, config: ServerConfig) -> Self
Applies request-validation and pull-page settings.
Sourcepub fn compute_pool(self, compute: Arc<ComputePool>) -> Self
pub fn compute_pool(self, compute: Arc<ComputePool>) -> Self
Installs a dedicated pool for CPU-heavy planning.
Sourcepub fn observer(self, observer: Arc<dyn Observer>) -> Self
pub fn observer(self, observer: Arc<dyn Observer>) -> Self
Installs a non-blocking, payload-free observer.
Installs authority metadata, fencing, failover, and recovery enforcement.
Source§impl<S, E, R, C> SyncServerBuilder<Arc<S>, Arc<E>, Arc<R>, Arc<C>>where
S: AuthoritativeStore + 'static,
E: OperationExecutor + 'static,
R: ConflictResolver + 'static,
C: Clock + 'static,
impl<S, E, R, C> SyncServerBuilder<Arc<S>, Arc<E>, Arc<R>, Arc<C>>where
S: AuthoritativeStore + 'static,
E: OperationExecutor + 'static,
R: ConflictResolver + 'static,
C: Clock + 'static,
Sourcepub fn build(self) -> SyncServer<S, E, R, C>
pub fn build(self) -> SyncServer<S, E, R, C>
Builds the service. This method only exists once every required component is present.
Source§impl<S, E, R, C> SyncServerBuilder<Arc<S>, Arc<E>, Arc<R>, Arc<C>>where
S: AuthoritativeStore + AdapterManifestProvider + 'static,
E: OperationExecutor + 'static,
R: ConflictResolver + 'static,
C: Clock + 'static,
impl<S, E, R, C> SyncServerBuilder<Arc<S>, Arc<E>, Arc<R>, Arc<C>>where
S: AuthoritativeStore + AdapterManifestProvider + 'static,
E: OperationExecutor + 'static,
R: ConflictResolver + 'static,
C: Clock + 'static,
Sourcepub fn build_production(
self,
) -> Result<SyncServer<S, E, R, C>, ServerBuildError>
pub fn build_production( self, ) -> Result<SyncServer<S, E, R, C>, ServerBuildError>
Verifies the authority adapter’s production manifest before building the server.
Reference/test stores should continue to use Self::build.
§Errors
Returns a typed adapter compatibility failure before any request is accepted.
Trait Implementations§
Auto Trait Implementations§
impl<S = MissingServerStore, E = MissingServerExecutor, R = MissingServerConflicts, C = MissingServerClock> !RefUnwindSafe for SyncServerBuilder<S, E, R, C>
impl<S = MissingServerStore, E = MissingServerExecutor, R = MissingServerConflicts, C = MissingServerClock> !UnwindSafe for SyncServerBuilder<S, E, R, C>
impl<S, E, R, C> Freeze for SyncServerBuilder<S, E, R, C>
impl<S, E, R, C> Send for SyncServerBuilder<S, E, R, C>
impl<S, E, R, C> Sync for SyncServerBuilder<S, E, R, C>
impl<S, E, R, C> Unpin for SyncServerBuilder<S, E, R, C>
impl<S, E, R, C> UnsafeUnpin for SyncServerBuilder<S, E, R, C>
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
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> ⓘ
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> ⓘ
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