[−][src]Struct tari_comms_dht::Dht
Responsible for starting the DHT actor, building the DHT middleware stack and as a factory for producing DHT requesters.
Implementations
impl Dht
[src]
pub async fn initialize(
config: DhtConfig,
node_identity: Arc<NodeIdentity>,
peer_manager: Arc<PeerManager>,
outbound_tx: Sender<DhtOutboundRequest>,
connectivity: ConnectivityRequester,
shutdown_signal: ShutdownSignal
) -> Result<Self, DhtInitializationError>
[src]
config: DhtConfig,
node_identity: Arc<NodeIdentity>,
peer_manager: Arc<PeerManager>,
outbound_tx: Sender<DhtOutboundRequest>,
connectivity: ConnectivityRequester,
shutdown_signal: ShutdownSignal
) -> Result<Self, DhtInitializationError>
pub fn outbound_requester(&self) -> OutboundMessageRequester
[src]
Return a new OutboundMessageRequester connected to the receiver
pub fn dht_requester(&self) -> DhtRequester
[src]
Returns a requester for the DhtActor associated with this instance
pub fn discovery_service_requester(&self) -> DhtDiscoveryRequester
[src]
Returns a requester for the DhtDiscoveryService associated with this instance
pub fn store_and_forward_requester(&self) -> StoreAndForwardRequester
[src]
Returns a requester for the StoreAndForwardService associated with this instance
pub fn subscribe_dht_events(&self) -> DhtEventReceiver
[src]
Get a subscription to DhtEvents
pub fn inbound_middleware_layer<S>(
&self
) -> impl Layer<S, Service = impl Service<InboundMessage, Response = (), Error = PipelineError, Future = impl Future<Output = Result<(), PipelineError>> + Send> + Clone + Send> where
S: Service<DecryptedDhtMessage, Response = (), Error = PipelineError> + Clone + Send + Sync + 'static,
S::Future: Send,
[src]
&self
) -> impl Layer<S, Service = impl Service<InboundMessage, Response = (), Error = PipelineError, Future = impl Future<Output = Result<(), PipelineError>> + Send> + Clone + Send> where
S: Service<DecryptedDhtMessage, Response = (), Error = PipelineError> + Clone + Send + Sync + 'static,
S::Future: Send,
Returns an the full DHT stack as a tower::layer::Layer
. This can be composed with
other inbound middleware services which expect an DecryptedDhtMessage
pub fn outbound_middleware_layer<S>(
&self
) -> impl Layer<S, Service = impl Service<DhtOutboundRequest, Response = (), Error = PipelineError, Future = impl Future<Output = Result<(), PipelineError>> + Send> + Clone + Send> where
S: Service<OutboundMessage, Response = (), Error = PipelineError> + Clone + Send + 'static,
S::Future: Send,
[src]
&self
) -> impl Layer<S, Service = impl Service<DhtOutboundRequest, Response = (), Error = PipelineError, Future = impl Future<Output = Result<(), PipelineError>> + Send> + Clone + Send> where
S: Service<OutboundMessage, Response = (), Error = PipelineError> + Clone + Send + 'static,
S::Future: Send,
Returns an the full DHT stack as a tower::layer::Layer
. This can be composed with
other outbound middleware services which expect an OutboundMessage
Auto Trait Implementations
impl !RefUnwindSafe for Dht
impl Send for Dht
impl Sync for Dht
impl Unpin for Dht
impl !UnwindSafe for Dht
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> Cast<U> for T where
U: FromCast<T>,
U: FromCast<T>,
fn cast(self) -> U
impl<T> From<T> for T
[src]
impl<T> FromBits<T> for T
fn from_bits(t: T) -> T
impl<T> FromCast<T> for T
fn from_cast(t: T) -> T
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> IntoBits<U> for T where
U: FromBits<T>,
U: FromBits<T>,
fn into_bits(self) -> U
impl<T> IntoSql for T
[src]
fn into_sql<T>(self) -> Self::Expression where
Self: AsExpression<T>,
[src]
Self: AsExpression<T>,
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression where
&'a Self: AsExpression<T>,
[src]
&'a Self: AsExpression<T>,
impl<T> SafeBorrow<T> for T where
T: ?Sized,
T: ?Sized,
fn borrow_replacement(ptr: &T) -> &T
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,