Struct everscale_network::dht::DhtEntry
source · [−]pub struct DhtEntry<'a> { /* private fields */ }Implementations
sourceimpl<'a> DhtEntry<'a>
impl<'a> DhtEntry<'a>
sourcepub fn with_key_index(self, idx: u32) -> Self
pub fn with_key_index(self, idx: u32) -> Self
Sets the key index. Default: 0
sourcepub fn with_data<T>(self, data: T) -> DhtEntryWithData<'a> where
T: TlWrite<Repr = Boxed>,
pub fn with_data<T>(self, data: T) -> DhtEntryWithData<'a> where
T: TlWrite<Repr = Boxed>,
Creates a new builder which can store the value in the DHT.
See DhtEntry::with_data_raw for raw API
sourcepub fn with_data_raw(self, data: &'a [u8]) -> DhtEntryWithData<'a>
pub fn with_data_raw(self, data: &'a [u8]) -> DhtEntryWithData<'a>
Creates a new builder which can store the value in the DHT.
See DhtEntry::with_data for more convenient API
sourcepub fn values<T>(self) -> DhtValuesStream<T> where
for<'tl> T: TlRead<'tl, Repr = Boxed> + Send + 'static,
pub fn values<T>(self) -> DhtValuesStream<T> where
for<'tl> T: TlRead<'tl, Repr = Boxed> + Send + 'static,
Returns a stream of values for this entry.
sourcepub async fn value_from<T>(
self,
peer_id: &AdnlNodeIdShort
) -> Result<Option<(KeyDescriptionOwned, T)>> where
for<'tl> T: TlRead<'tl, Repr = Boxed> + Send + 'static,
pub async fn value_from<T>(
self,
peer_id: &AdnlNodeIdShort
) -> Result<Option<(KeyDescriptionOwned, T)>> where
for<'tl> T: TlRead<'tl, Repr = Boxed> + Send + 'static,
Queries a value from the given peer.
Trait Implementations
Auto Trait Implementations
impl<'a> !RefUnwindSafe for DhtEntry<'a>
impl<'a> Send for DhtEntry<'a>
impl<'a> Sync for DhtEntry<'a>
impl<'a> Unpin for DhtEntry<'a>
impl<'a> !UnwindSafe for DhtEntry<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Choices> CoproductSubsetter<CNil, HNil> for Choices
impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more