pub struct P2PManager {
pub public_key: PublicKey,
}Expand description
Legacy P2P manager stub for backward compatibility.
This will be replaced by the authenticated network for real consensus.
Fields§
§public_key: PublicKeyOur public key.
Implementations§
Source§impl P2PManager
impl P2PManager
Sourcepub fn new(private_key: &PrivateKey) -> Self
pub fn new(private_key: &PrivateKey) -> Self
Create a new P2P manager stub.
Sourcepub fn notify_update(
&self,
_repo_key: &str,
_new_objects: Vec<ObjectId>,
_refs: Vec<(String, ObjectId)>,
)
pub fn notify_update( &self, _repo_key: &str, _new_objects: Vec<ObjectId>, _refs: Vec<(String, ObjectId)>, )
Stub: Notify peers about a repository update.
In the real consensus system, replication happens via the consensus layer.
Sourcepub fn register_repo(&self, _key: String, _repo: Arc<Repository>)
pub fn register_repo(&self, _key: String, _repo: Arc<Repository>)
Stub: Register a repository for replication.
In the real consensus system, repositories are replicated via consensus.
Trait Implementations§
Source§impl Clone for P2PManager
impl Clone for P2PManager
Source§fn clone(&self) -> P2PManager
fn clone(&self) -> P2PManager
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 P2PManager
impl RefUnwindSafe for P2PManager
impl Send for P2PManager
impl Sync for P2PManager
impl Unpin for P2PManager
impl UnwindSafe for P2PManager
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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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