pub enum KitsuneP2p {
    ListTransportBindings {
        span_context: Context,
        respond: GhostRespond<Result<MustBoxFuture<'static, Result<Vec<Url2, Global>, KitsuneP2pError>>, KitsuneP2pError>>,
    },
    Join {
        span_context: Context,
        respond: GhostRespond<Result<MustBoxFuture<'static, Result<(), KitsuneP2pError>>, KitsuneP2pError>>,
        space: Arc<KitsuneSpace>,
        agent: Arc<KitsuneAgent>,
        initial_arc: Option<DhtArc>,
    },
    Leave {
        span_context: Context,
        respond: GhostRespond<Result<MustBoxFuture<'static, Result<(), KitsuneP2pError>>, KitsuneP2pError>>,
        space: Arc<KitsuneSpace>,
        agent: Arc<KitsuneAgent>,
    },
    RpcSingle {
        span_context: Context,
        respond: GhostRespond<Result<MustBoxFuture<'static, Result<Vec<u8, Global>, KitsuneP2pError>>, KitsuneP2pError>>,
        space: Arc<KitsuneSpace>,
        to_agent: Arc<KitsuneAgent>,
        payload: Vec<u8, Global>,
        timeout_ms: Option<u64>,
    },
    RpcMulti {
        span_context: Context,
        respond: GhostRespond<Result<MustBoxFuture<'static, Result<Vec<RpcMultiResponse, Global>, KitsuneP2pError>>, KitsuneP2pError>>,
        input: RpcMulti,
    },
    Broadcast {
        span_context: Context,
        respond: GhostRespond<Result<MustBoxFuture<'static, Result<(), KitsuneP2pError>>, KitsuneP2pError>>,
        space: Arc<KitsuneSpace>,
        basis: Arc<KitsuneBasis>,
        timeout: KitsuneTimeout,
        data: BroadcastData,
    },
    TargetedBroadcast {
        span_context: Context,
        respond: GhostRespond<Result<MustBoxFuture<'static, Result<(), KitsuneP2pError>>, KitsuneP2pError>>,
        space: Arc<KitsuneSpace>,
        agents: Vec<Arc<KitsuneAgent>, Global>,
        timeout: KitsuneTimeout,
        payload: Vec<u8, Global>,
        drop_at_limit: bool,
    },
    NewIntegratedData {
        span_context: Context,
        respond: GhostRespond<Result<MustBoxFuture<'static, Result<(), KitsuneP2pError>>, KitsuneP2pError>>,
        space: Arc<KitsuneSpace>,
    },
    AuthorityForHash {
        span_context: Context,
        respond: GhostRespond<Result<MustBoxFuture<'static, Result<bool, KitsuneP2pError>>, KitsuneP2pError>>,
        space: Arc<KitsuneSpace>,
        basis: Arc<KitsuneBasis>,
    },
    DumpNetworkMetrics {
        span_context: Context,
        respond: GhostRespond<Result<MustBoxFuture<'static, Result<Value, KitsuneP2pError>>, KitsuneP2pError>>,
        space: Option<Arc<KitsuneSpace>>,
    },
    GetDiagnostics {
        span_context: Context,
        respond: GhostRespond<Result<MustBoxFuture<'static, Result<KitsuneDiagnostics, KitsuneP2pError>>, KitsuneP2pError>>,
        space: Arc<KitsuneSpace>,
    },
}
Expand description

The KitsuneP2pSender allows async remote-control of the KitsuneP2p actor.

Variants§

§

ListTransportBindings

Fields

§span_context: Context

Tracing span from request invocation.

§respond: GhostRespond<Result<MustBoxFuture<'static, Result<Vec<Url2, Global>, KitsuneP2pError>>, KitsuneP2pError>>

Response callback - respond to the request.

Get the calculated transport bindings.

§

Join

Fields

§span_context: Context

Tracing span from request invocation.

§respond: GhostRespond<Result<MustBoxFuture<'static, Result<(), KitsuneP2pError>>, KitsuneP2pError>>

Response callback - respond to the request.

§space: Arc<KitsuneSpace>

Input parameter.

§agent: Arc<KitsuneAgent>

Input parameter.

§initial_arc: Option<DhtArc>

Input parameter.

Announce a space/agent pair on this network.

§

Leave

Fields

§span_context: Context

Tracing span from request invocation.

§respond: GhostRespond<Result<MustBoxFuture<'static, Result<(), KitsuneP2pError>>, KitsuneP2pError>>

Response callback - respond to the request.

§space: Arc<KitsuneSpace>

Input parameter.

§agent: Arc<KitsuneAgent>

Input parameter.

Withdraw this space/agent pair from this network.

§

RpcSingle

Fields

§span_context: Context

Tracing span from request invocation.

§respond: GhostRespond<Result<MustBoxFuture<'static, Result<Vec<u8, Global>, KitsuneP2pError>>, KitsuneP2pError>>

Response callback - respond to the request.

§space: Arc<KitsuneSpace>

Input parameter.

§to_agent: Arc<KitsuneAgent>

Input parameter.

§payload: Vec<u8, Global>

Input parameter.

§timeout_ms: Option<u64>

Input parameter.

Make a request of a single remote agent, expecting a response. The remote side will receive a “Call” event.

§

RpcMulti

Fields

§span_context: Context

Tracing span from request invocation.

§respond: GhostRespond<Result<MustBoxFuture<'static, Result<Vec<RpcMultiResponse, Global>, KitsuneP2pError>>, KitsuneP2pError>>

Response callback - respond to the request.

§input: RpcMulti

Input parameter.

Make a request to multiple destination agents - awaiting/aggregating the responses. The remote sides will see these messages as “Call” events. NOTE: We’ve currently disabled the “multi” part of this. It will still pick appropriate peers by basis, but will only make requests one at a time, returning the first success.

§

Broadcast

Fields

§span_context: Context

Tracing span from request invocation.

§respond: GhostRespond<Result<MustBoxFuture<'static, Result<(), KitsuneP2pError>>, KitsuneP2pError>>

Response callback - respond to the request.

§space: Arc<KitsuneSpace>

Input parameter.

§basis: Arc<KitsuneBasis>

Input parameter.

§timeout: KitsuneTimeout

Input parameter.

§data: BroadcastData

Input parameter.

Publish data to a “neighborhood” of remote nodes surrounding the “basis” hash. This is a multi-step fire-and-forget algorithm. An Ok(()) result only means that we were able to establish at least one connection with a node in the target neighborhood. The remote sides will see these messages as “Notify” events.

§

TargetedBroadcast

Fields

§span_context: Context

Tracing span from request invocation.

§respond: GhostRespond<Result<MustBoxFuture<'static, Result<(), KitsuneP2pError>>, KitsuneP2pError>>

Response callback - respond to the request.

§space: Arc<KitsuneSpace>

Input parameter.

§agents: Vec<Arc<KitsuneAgent>, Global>

Input parameter.

§timeout: KitsuneTimeout

Input parameter.

§payload: Vec<u8, Global>

Input parameter.

§drop_at_limit: bool

Input parameter.

Broadcast data to a specific set of agents without expecting a response. An Ok(()) result only means that we were able to establish at least one connection with a node in the agent set.

§

NewIntegratedData

Fields

§span_context: Context

Tracing span from request invocation.

§respond: GhostRespond<Result<MustBoxFuture<'static, Result<(), KitsuneP2pError>>, KitsuneP2pError>>

Response callback - respond to the request.

§space: Arc<KitsuneSpace>

Input parameter.

New data has been integrated and is ready for gossiping.

§

AuthorityForHash

Fields

§span_context: Context

Tracing span from request invocation.

§respond: GhostRespond<Result<MustBoxFuture<'static, Result<bool, KitsuneP2pError>>, KitsuneP2pError>>

Response callback - respond to the request.

§space: Arc<KitsuneSpace>

Input parameter.

§basis: Arc<KitsuneBasis>

Input parameter.

Check if an agent is an authority for a hash.

§

DumpNetworkMetrics

Fields

§span_context: Context

Tracing span from request invocation.

§respond: GhostRespond<Result<MustBoxFuture<'static, Result<Value, KitsuneP2pError>>, KitsuneP2pError>>

Response callback - respond to the request.

§space: Option<Arc<KitsuneSpace>>

Input parameter.

dump network metrics

§

GetDiagnostics

Fields

§span_context: Context

Tracing span from request invocation.

§respond: GhostRespond<Result<MustBoxFuture<'static, Result<KitsuneDiagnostics, KitsuneP2pError>>, KitsuneP2pError>>

Response callback - respond to the request.

§space: Arc<KitsuneSpace>

Input parameter.

Get data for diagnostics

Trait Implementations§

Formats the value using the given formatter. Read more
Process a dispatch event with a given GhostHandler.
Process a dispatch event with this GhostHandler.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
TODO: once 1.33.0 is the minimum supported compiler version, remove Any::type_id_compat and use StdAny::type_id instead. https://github.com/rust-lang/rust/issues/27745
The archived version of the pointer metadata for this type.
Converts some archived metadata to the pointer metadata for itself.
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Deserializes using the given deserializer

Returns the argument unchanged.

Attaches the provided Context to this type, returning a WithContext wrapper. Read more
Attaches the current Context to this type, returning a WithContext wrapper. Read more
Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
The type for metadata in pointers and references to Self.
Should always be Self
The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Checks if self is actually part of its subset T (and can be converted to it).
Use with care! Same as self.to_subset but without any property checks. Always succeeds.
The inclusion map: converts self to the equivalent element of its superset.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
upcast ref
upcast mut ref
upcast boxed dyn
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more