pub struct PeermergeMemoryOptionsBuilder { /* private fields */ }Expand description
Builder for PeermergeMemoryOptions.
Implementations§
Source§impl PeermergeMemoryOptionsBuilder
impl PeermergeMemoryOptionsBuilder
Sourcepub fn default_peer_header(&mut self, value: NameDescription) -> &mut Self
pub fn default_peer_header(&mut self, value: NameDescription) -> &mut Self
Default peer name/description
Sourcepub fn state_event_sender<VALUE: Into<UnboundedSender<StateEvent>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn state_event_sender<VALUE: Into<UnboundedSender<StateEvent>>>( &mut self, value: VALUE, ) -> &mut Self
State event sender, can also be given with set_state_event_sender().
Sourcepub fn reattach_secrets<VALUE: Into<HashMap<DocumentId, String>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn reattach_secrets<VALUE: Into<HashMap<DocumentId, String>>>( &mut self, value: VALUE, ) -> &mut Self
Reattach secrets used to prevent a new peer being when recreating an in-memory peer. Value should be stored and updated from crate::Peermerge::reattach_secret whenever a new crate::StateEventContent::PeerChanged is received.
Sourcepub fn max_entry_data_size_bytes(&mut self, value: usize) -> &mut Self
pub fn max_entry_data_size_bytes(&mut self, value: usize) -> &mut Self
Maximum size of a data entry. Defaults to DEFAULT_MAX_ENTRY_DATA_SIZE_BYTES.
Sourcepub fn max_write_feed_length(&mut self, value: u64) -> &mut Self
pub fn max_write_feed_length(&mut self, value: u64) -> &mut Self
Maximum length of the write feed data entry. Defaults to DEFAULT_MAX_WRITE_FEED_LENGTH.
Sourcepub fn build(
&self,
) -> Result<PeermergeMemoryOptions, PeermergeMemoryOptionsBuilderError>
pub fn build( &self, ) -> Result<PeermergeMemoryOptions, PeermergeMemoryOptionsBuilderError>
Trait Implementations§
Source§impl Clone for PeermergeMemoryOptionsBuilder
impl Clone for PeermergeMemoryOptionsBuilder
Source§fn clone(&self) -> PeermergeMemoryOptionsBuilder
fn clone(&self) -> PeermergeMemoryOptionsBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PeermergeMemoryOptionsBuilder
impl !RefUnwindSafe for PeermergeMemoryOptionsBuilder
impl Send for PeermergeMemoryOptionsBuilder
impl Sync for PeermergeMemoryOptionsBuilder
impl Unpin for PeermergeMemoryOptionsBuilder
impl !UnwindSafe for PeermergeMemoryOptionsBuilder
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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