Skip to main content

SyncServerBuilder

Struct SyncServerBuilder 

Source
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 SyncServerBuilder

Source

pub fn new() -> Self

Starts an empty type-state builder.

Source§

impl<S, E, R, C> SyncServerBuilder<S, E, R, C>

Source

pub fn store<S2>(self, store: Arc<S2>) -> SyncServerBuilder<Arc<S2>, E, R, C>

Installs or replaces the authoritative store.

Source

pub fn executor<E2>( self, executor: Arc<E2>, ) -> SyncServerBuilder<S, Arc<E2>, R, C>

Installs or replaces the typed operation executor or registry.

Source

pub fn conflicts<R2>( self, conflicts: Arc<R2>, ) -> SyncServerBuilder<S, E, Arc<R2>, C>

Installs or replaces the conflict-policy resolver.

Source

pub fn clock<C2>(self, clock: Arc<C2>) -> SyncServerBuilder<S, E, R, Arc<C2>>

Installs or replaces the hybrid timestamp clock.

Source

pub const fn config(self, config: ServerConfig) -> Self

Applies request-validation and pull-page settings.

Source

pub fn compute_pool(self, compute: Arc<ComputePool>) -> Self

Installs a dedicated pool for CPU-heavy planning.

Source

pub fn observer(self, observer: Arc<dyn Observer>) -> Self

Installs a non-blocking, payload-free observer.

Source

pub fn authority(self, authority: AuthorityController) -> Self

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,

Source

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,

Source

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§

Source§

impl Default for SyncServerBuilder

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

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>
where S: Freeze, E: Freeze, R: Freeze, C: Freeze,

§

impl<S, E, R, C> Send for SyncServerBuilder<S, E, R, C>
where S: Send, E: Send, R: Send, C: Send,

§

impl<S, E, R, C> Sync for SyncServerBuilder<S, E, R, C>
where S: Sync, E: Sync, R: Sync, C: Sync,

§

impl<S, E, R, C> Unpin for SyncServerBuilder<S, E, R, C>
where S: Unpin, E: Unpin, R: Unpin, C: Unpin,

§

impl<S, E, R, C> UnsafeUnpin for SyncServerBuilder<S, E, R, C>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.