pub struct EnrollmentStore { /* private fields */ }Expand description
A mutable, admission-gated store of enrolled external peers.
Deliberately separate from the native, admin-anchored, post-install
immutable crate::envelope::KeyedPqTrustStore — that PQ anchor is left
untouched. This store holds the federation perimeter’s enrolled peers and is
mutated only through AtprotoPerimeterGateway::enroll’s admission-gated path:
insert takes an EnrolledPeer, which can only be
produced from an AdmittedIdentity.
get is the read seam the future per-op monitor (#548
S2) uses to fetch a peer’s cached SecurityContext without re-resolving.
Implementations§
Source§impl EnrollmentStore
impl EnrollmentStore
Sourcepub fn insert(&self, peer: EnrolledPeer)
pub fn insert(&self, peer: EnrolledPeer)
Insert (or replace) an enrolled peer, keyed by its DID.
Only an EnrolledPeer — which is produced exclusively from an
admission-gated enrollment — can be inserted, so the store stays
admission-gated by construction.
Sourcepub fn get(&self, did: &Did) -> Option<EnrolledPeer>
pub fn get(&self, did: &Did) -> Option<EnrolledPeer>
Look up an enrolled peer’s cached state by DID, if present.
Trait Implementations§
Source§impl Clone for EnrollmentStore
impl Clone for EnrollmentStore
Source§fn clone(&self) -> EnrollmentStore
fn clone(&self) -> EnrollmentStore
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Default for EnrollmentStore
impl Default for EnrollmentStore
Source§fn default() -> EnrollmentStore
fn default() -> EnrollmentStore
Auto Trait Implementations§
impl Freeze for EnrollmentStore
impl !RefUnwindSafe for EnrollmentStore
impl Send for EnrollmentStore
impl Sync for EnrollmentStore
impl Unpin for EnrollmentStore
impl UnsafeUnpin for EnrollmentStore
impl !UnwindSafe for EnrollmentStore
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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