pub struct Session<B: ReplicaStore> {
pub replica: B,
/* private fields */
}Fields§
§replica: BImplementations§
Source§impl<B: ReplicaStore> Session<B>
impl<B: ReplicaStore> Session<B>
Sourcepub fn new(
replica: B,
destination: [u8; 32],
facets: BTreeSet<ThreadFacet>,
max_items: usize,
) -> Result<Self>
pub fn new( replica: B, destination: [u8; 32], facets: BTreeSet<ThreadFacet>, max_items: usize, ) -> Result<Self>
facets is the intersection of authenticated admission scope and the
negotiated opening. Local export still checks current sharing policy.
pub async fn export_facets( &self, ) -> StoreResult<BTreeSet<ThreadFacet>, B::Error>
Sourcepub async fn announcement(&mut self) -> StoreResult<Option<Frame>, B::Error>
pub async fn announcement(&mut self) -> StoreResult<Option<Frame>, B::Error>
At most one bounded frontier page. Call again until None. A generation change during a paged announcement starts another round, closing gaps.
pub async fn handle( &mut self, frame: Frame, ) -> StoreResult<Vec<Outbound>, B::Error>
Sourcepub async fn control(&mut self) -> StoreResult<Option<Frame>, B::Error>
pub async fn control(&mut self) -> StoreResult<Option<Frame>, B::Error>
One bounded dependency window, refilled after each received operation. Peer frontiers are durable; outstanding requests are session-local.
Sourcepub async fn export_operation(
&self,
id: ContentHash,
) -> StoreResult<Frame, B::Error>
pub async fn export_operation( &self, id: ContentHash, ) -> StoreResult<Frame, B::Error>
Resolve payload only when the writer is ready. Pending output queues contain IDs, and policy is checked again immediately before disclosure.
Trait Implementations§
Auto Trait Implementations§
impl<B> Freeze for Session<B>where
B: Freeze,
impl<B> RefUnwindSafe for Session<B>where
B: RefUnwindSafe,
impl<B> Send for Session<B>
impl<B> Sync for Session<B>
impl<B> Unpin for Session<B>where
B: Unpin,
impl<B> UnsafeUnpin for Session<B>where
B: UnsafeUnpin,
impl<B> UnwindSafe for Session<B>where
B: 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