pub enum PeerAction {
Connect {
id: PeerId,
address: String,
},
Ask {
id: PeerId,
ask: Ask,
},
Save(Vec<(String, KnownPeer)>),
}Expand description
駆動役への指示
Variants§
Connect
address につなぎ、つながったら id で呼ぶ。結果は PeerEvent::Connected か PeerEvent::ConnectFailed
Ask
ピア id に聞く。答えは PeerEvent::Info か PeerEvent::Nodes
Save(Vec<(String, KnownPeer)>)
住所録をしまう
Trait Implementations§
Source§impl Debug for PeerAction
impl Debug for PeerAction
impl Eq for PeerAction
Source§impl PartialEq for PeerAction
impl PartialEq for PeerAction
impl StructuralPartialEq for PeerAction
Auto Trait Implementations§
impl Freeze for PeerAction
impl RefUnwindSafe for PeerAction
impl Send for PeerAction
impl Sync for PeerAction
impl Unpin for PeerAction
impl UnsafeUnpin for PeerAction
impl UnwindSafe for PeerAction
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> 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