pub struct Responder<'a> {
pub source: &'a dyn Source,
pub env: &'a (dyn Env + Sync),
pub parameters: &'static NetworkParameters,
pub node: Vec<u8>,
pub pushes: Option<Sender<NodeEvent>>,
pub mempool: Option<&'a SharedMempool>,
pub partials: Option<&'a SharedPartialPool>,
pub votes: Option<&'a Mutex<Observer>>,
pub capabilities: &'a [&'static str],
pub source_code: Option<&'static [u8]>,
}Expand description
要求に答えるもの
Fields§
§source: &'a dyn Source§env: &'a (dyn Env + Sync)§parameters: &'static NetworkParameters§node: Vec<u8>Node_Discovery_Pull_Ping で返す、自分の NetworkNode
pushes: Option<Sender<NodeEvent>>押し付けられたブロックを入れる、チェーンの持ち主の受信箱。None なら読み捨てる
mempool: Option<&'a SharedMempool>押し付けられたトランザクションを入れ、Pull_Transactions に答える置き場。None なら読み捨て、空で答える
partials: Option<&'a SharedPartialPool>Pull_Partial_Transaction_Infos に答える、連署を待つものの置き場。None なら空で答える。押し付けられた
連署を待つものと連署は、状態で確かめるので、Responder::pushes で駆動役に渡す
votes: Option<&'a Mutex<Observer>>Pull_Finalization_Messages に答える、集めている投票。None なら空で答える。押し付けられた投票は、
Responder::pushes で駆動役に渡す
capabilities: &'a [&'static str]heika から受けた接続で、こちらができることとして伝える capability(heika-packet の extension)
source_code: Option<&'static [u8]>封筒の source/zip で返す、このノードのソースの ZIP。None なら答えない
Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Responder<'a>
impl<'a> !UnwindSafe for Responder<'a>
impl<'a> Freeze for Responder<'a>
impl<'a> Send for Responder<'a>
impl<'a> Sync for Responder<'a>
impl<'a> Unpin for Responder<'a>
impl<'a> UnsafeUnpin for Responder<'a>
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<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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