Struct dittolive_ditto::ditto::builder::DittoBuilder
source · [−]pub struct DittoBuilder { /* private fields */ }
Implementations
sourceimpl DittoBuilder
impl DittoBuilder
sourcepub fn new() -> DittoBuilder
pub fn new() -> DittoBuilder
Create a new, empty builder for a Ditto instance
sourcepub fn with_root(self, ditto_root: Arc<dyn DittoRoot + Send + Sync>) -> Self
pub fn with_root(self, ditto_root: Arc<dyn DittoRoot + Send + Sync>) -> Self
Set root directory where Ditto will store its data
sourcepub fn with_minimum_log_level(self, log_level: LogLevel) -> Self
pub fn with_minimum_log_level(self, log_level: LogLevel) -> Self
Configure the minimum log level for the Ditto instance
sourcepub fn with_temp_dir(self) -> Self
pub fn with_temp_dir(self) -> Self
Build a Ditto instance with a temporary storage directory which will be destroyed on exit
sourcepub fn with_identity<F, I>(self, factory: F) -> Result<Self, DittoError> where
F: FnOnce(Arc<dyn DittoRoot>) -> Result<I, DittoError>,
I: Identity + 'static,
pub fn with_identity<F, I>(self, factory: F) -> Result<Self, DittoError> where
F: FnOnce(Arc<dyn DittoRoot>) -> Result<I, DittoError>,
I: Identity + 'static,
Provide a factory FnOnce which will create and configure the Identity for the Ditto instance
sourcepub fn with_transport_config<T>(self, factory: T) -> Result<Self, DittoError> where
T: FnOnce(Arc<dyn Identity>) -> TransportConfig,
pub fn with_transport_config<T>(self, factory: T) -> Result<Self, DittoError> where
T: FnOnce(Arc<dyn Identity>) -> TransportConfig,
Provide a factory for the TransportConfig used by the Ditto instance
sourcepub fn build(self) -> Result<Ditto, DittoError>
pub fn build(self) -> Result<Ditto, DittoError>
Builds the Ditto instance, consuming the builder the process
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for DittoBuilder
impl Send for DittoBuilder
impl Sync for DittoBuilder
impl Unpin for DittoBuilder
impl !UnwindSafe for DittoBuilder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more