pub struct PeermergeMemoryOptions {
pub default_peer_header: NameDescription,
pub state_event_sender: Option<UnboundedSender<StateEvent>>,
pub reattach_secrets: Option<HashMap<DocumentId, String>>,
pub max_entry_data_size_bytes: usize,
pub max_write_feed_length: u64,
}Expand description
In-memory Peermerge options
Fields§
§default_peer_header: NameDescriptionDefault peer name/description
state_event_sender: Option<UnboundedSender<StateEvent>>State event sender, can also be given with set_state_event_sender().
reattach_secrets: Option<HashMap<DocumentId, String>>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.
max_entry_data_size_bytes: usizeMaximum size of a data entry. Defaults to DEFAULT_MAX_ENTRY_DATA_SIZE_BYTES.
max_write_feed_length: u64Maximum length of the write feed data entry. Defaults to DEFAULT_MAX_WRITE_FEED_LENGTH.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PeermergeMemoryOptions
impl !RefUnwindSafe for PeermergeMemoryOptions
impl Send for PeermergeMemoryOptions
impl Sync for PeermergeMemoryOptions
impl Unpin for PeermergeMemoryOptions
impl !UnwindSafe for PeermergeMemoryOptions
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> 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