[][src]Struct kad::search::Search

pub struct Search<Id, Addr, Data, Table, Conn, ReqId, Ctx> { /* fields omitted */ }

Search object provides the basis for executing searches on the DHT

Methods

impl<Id, Addr, Data, Table, Conn, ReqId, Ctx> Search<Id, Addr, Data, Table, Conn, ReqId, Ctx> where
    Id: DatabaseId + 'static,
    Addr: Clone + Debug + 'static,
    Data: Clone + Debug + 'static,
    Table: NodeTable<Id, Addr> + 'static,
    ReqId: RequestId + 'static,
    Ctx: Clone + PartialEq + Debug + 'static,
    Conn: Connector<ReqId, Node<Id, Addr>, Request<Id, Data>, Response<Id, Addr, Data>, DhtError, Ctx> + Clone + 'static, 
[src]

pub fn new(
    origin: Id,
    target: Id,
    op: Operation,
    config: Config,
    table: Arc<Mutex<Table>>,
    conn: Conn,
    ctx: Ctx
) -> Search<Id, Addr, Data, Table, Conn, ReqId, Ctx>
[src]

pub fn target(&self) -> &Id[src]

Fetch a pointer to the search target Id

pub fn known(&self) -> KnownMap<Id, Addr>[src]

Fetch a copy of the Known Nodes map

pub fn data(&self) -> ValueMap<Id, Data>[src]

Fetch a copy of the Received Data map

pub fn execute(
    self
) -> impl Future<Item = Self, Error = DhtError>
[src]

pub fn seed(&mut self, known: &[Node<Id, Addr>])[src]

Seed the search with nearest nodes in addition to those provided in initialisation

Auto Trait Implementations

impl<Id, Addr, Data, Table, Conn, ReqId, Ctx> Send for Search<Id, Addr, Data, Table, Conn, ReqId, Ctx> where
    Addr: Send,
    Conn: Send,
    Ctx: Send,
    Data: Send,
    Id: Send,
    ReqId: Send,
    Table: Send

impl<Id, Addr, Data, Table, Conn, ReqId, Ctx> Sync for Search<Id, Addr, Data, Table, Conn, ReqId, Ctx> where
    Addr: Sync,
    Conn: Sync,
    Ctx: Sync,
    Data: Sync,
    Id: Sync,
    ReqId: Sync,
    Table: Send

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.