pub struct StateConfigBuilder { /* private fields */ }Expand description
Builder for state configurations
Implementations§
Source§impl StateConfigBuilder
impl StateConfigBuilder
pub fn new() -> Self
pub fn storage_type(self, storage_type: StateStorageType) -> Self
pub fn ttl(self, ttl: Duration) -> Self
pub fn cleanup_interval(self, interval: Duration) -> Self
pub fn max_size(self, max_size: usize) -> Self
pub fn custom_storage( self, storage: Arc<dyn StateStorage + Send + Sync>, ) -> Self
pub fn build(self) -> Result<StateConfig, String>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StateConfigBuilder
impl !RefUnwindSafe for StateConfigBuilder
impl Send for StateConfigBuilder
impl Sync for StateConfigBuilder
impl Unpin for StateConfigBuilder
impl !UnwindSafe for StateConfigBuilder
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