Struct dittolive_ditto::ditto::builder::DittoBuilder
source · pub struct DittoBuilder { /* private fields */ }
Expand description
Builder for Ditto
Implementations§
source§impl 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>) -> Self
pub fn with_root(self, ditto_root: Arc<dyn DittoRoot>) -> Self
Set the 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,
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.
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§
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