pub struct LocalReplica<S> { /* private fields */ }Implementations§
Source§impl<S: ObjectStore + Send + Sync + 'static> LocalReplica<S>
impl<S: ObjectStore + Send + Sync + 'static> LocalReplica<S>
pub fn new(replica: ThreadReplica, objects: Arc<S>) -> Self
Use independently enrolled local account authority for original metadata authors. Without this binding, new metadata admission fails closed.
Trait Implementations§
Source§impl<S> Clone for LocalReplica<S>
impl<S> Clone for LocalReplica<S>
Source§impl<S: ObjectStore + Send + Sync + 'static> ReplicaStore for LocalReplica<S>
impl<S: ObjectStore + Send + Sync + 'static> ReplicaStore for LocalReplica<S>
type Error = Error
fn thread_id(&self) -> ContentHash
async fn generation(&self) -> Result<i64, Error>
async fn sharing( &self, destination: [u8; 32], ) -> Result<BTreeSet<ThreadFacet>, Error>
async fn frontier_page( &self, facet: ThreadFacet, after: Option<ContentHash>, limit: usize, ) -> Result<Vec<ContentHash>, Error>
async fn operation( &self, id: ContentHash, ) -> Result<Option<(ReceivedOperation, Admission)>, Error>
async fn receive(&self, received: ReceivedOperation) -> Result<Admission, Error>
async fn remember_peer_heads( &self, peer: [u8; 32], heads: Vec<(ThreadFacet, ContentHash)>, ) -> Result<(), Error>
async fn record_peer_receipt( &self, peer: [u8; 32], id: ContentHash, admission: Admission, ) -> Result<(), Error>
async fn settled_peer_heads( &self, peer: [u8; 32], facets: BTreeSet<ThreadFacet>, limit: usize, ) -> Result<Vec<(ContentHash, Admission)>, Error>
async fn needed_from_peer( &self, peer: [u8; 32], facets: BTreeSet<ThreadFacet>, limit: usize, ) -> Result<Vec<ContentHash>, Error>
Auto Trait Implementations§
impl<S> Freeze for LocalReplica<S>
impl<S> RefUnwindSafe for LocalReplica<S>where
Arc<S>: RefUnwindSafe,
impl<S> Send for LocalReplica<S>
impl<S> Sync for LocalReplica<S>
impl<S> Unpin for LocalReplica<S>
impl<S> UnsafeUnpin for LocalReplica<S>where
Arc<S>: UnsafeUnpin,
impl<S> UnwindSafe for LocalReplica<S>where
Arc<S>: UnwindSafe,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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