pub enum RepoEvent {
WantBlock(Option<u64>, Cid, Vec<PeerId>),
UnwantBlock(Cid),
NewBlock(Block, Sender<Result<Receiver<Result<KadResult, Error>>, Error>>),
RemovedBlock(Cid),
}
Expand description
Events used to communicate to the swarm on repo changes.
Variants§
WantBlock(Option<u64>, Cid, Vec<PeerId>)
Signals a desired block.
UnwantBlock(Cid)
Signals a desired block is no longer wanted.
NewBlock(Block, Sender<Result<Receiver<Result<KadResult, Error>>, Error>>)
Signals the posession of a new block.
RemovedBlock(Cid)
Signals the removal of a block.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for RepoEvent
impl Send for RepoEvent
impl Sync for RepoEvent
impl Unpin for RepoEvent
impl !UnwindSafe for RepoEvent
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere T: 'a,
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