Skip to main content

ServiceBuilder

Struct ServiceBuilder 

Source
pub struct ServiceBuilder<Key, Data> { /* private fields */ }

Implementations§

Source§

impl<Key: Send + Clone + Hash + Eq + Display + 'static, Data: ServiceData> ServiceBuilder<Key, Data>

Source

pub fn num_shards(self, num_shards: u8) -> Self

Source

pub fn shard_persist_queue_capacity( self, shard_persist_queue_capacity: usize, ) -> Self

Source

pub fn lru_candidates_num_probes(self, lru_candidates_num_probes: u16) -> Self

Source

pub fn shard_sender_channel_buffer_size( self, shard_sender_channel_buffer_size: usize, ) -> Self

Source

pub fn cache_expiration_probe_interval( self, cache_expiration_probe_interval: Duration, ) -> Self

Source

pub fn cache_expiration_probe_keys_per_tick( self, cache_expiration_probe_keys_per_tick: usize, ) -> Self

Source

pub fn runtime_mode(self, runtime_mode: RuntimeMode) -> Self

Sets the runtime mode of the service. See RuntimeMode for more information.

Source

pub fn build<UpstreamFactoryT: UpstreamFactory<Key, Data>>( self, upstream_factory: UpstreamFactoryT, ) -> (ServiceHandle<Key, Data>, ShutdownHandle)

Source

pub fn build_mutable<UpstreamFactoryT: MutableUpstreamFactory<Key, Data>>( self, upstream_factory: UpstreamFactoryT, default_commit_policy: DefaultCommitPolicy, ) -> (MutableServiceHandle<Key, Data>, ShutdownHandle)

Auto Trait Implementations§

§

impl<Key, Data> Freeze for ServiceBuilder<Key, Data>

§

impl<Key, Data> RefUnwindSafe for ServiceBuilder<Key, Data>
where Key: RefUnwindSafe, Data: RefUnwindSafe,

§

impl<Key, Data> Send for ServiceBuilder<Key, Data>
where Key: Send, Data: Send,

§

impl<Key, Data> Sync for ServiceBuilder<Key, Data>
where Key: Sync, Data: Sync,

§

impl<Key, Data> Unpin for ServiceBuilder<Key, Data>
where Key: Unpin, Data: Unpin,

§

impl<Key, Data> UnsafeUnpin for ServiceBuilder<Key, Data>

§

impl<Key, Data> UnwindSafe for ServiceBuilder<Key, Data>
where Key: UnwindSafe, Data: UnwindSafe,

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V