pub enum AppRequest {
Show 14 variants
AppInfo,
AgentInfo {
dna_hashes: Option<Vec<HoloHash<Dna>>>,
},
PeerMetaInfo {
url: Url,
dna_hashes: Option<Vec<HoloHash<Dna>>>,
},
CallZome(Box<ZomeCallParamsSigned>),
CreateCloneCell(Box<CreateCloneCellPayload>),
DisableCloneCell(Box<DisableCloneCellPayload>),
EnableCloneCell(Box<DisableCloneCellPayload>),
DumpOpTimings {
dna_hash: HoloHash<Dna>,
cursor: Option<OpTimingsCursor>,
limit: Option<u32>,
},
DumpNetworkMetrics {
dna_hash: Option<HoloHash<Dna>>,
include_dht_summary: bool,
},
DumpNetworkStats,
ListWasmHostFunctions,
ProvideMemproofs(HashMap<String, Arc<SerializedBytes>>),
EnableApp,
SendDirectSignal {
dna_hash: HoloHash<Dna>,
agents: Vec<HoloHash<Agent>>,
signal: Vec<u8>,
},
}Expand description
Represents the available conductor functions to call over an app interface
and will result in a corresponding AppResponse message being sent back over the
interface connection.
§Errors
Returns an AppResponse::Error with a reason why the request failed.
Variants§
AppInfo
Get info about the app that you are connected to, including info about each cell installed by this app.
§Returns
AgentInfo
Request information about the agents in this Conductor’s peer store.
This is limited to cells of the app you are connected to.
§Returns
PeerMetaInfo
Request the contents of the peer meta store(s) related to the given dna hashes for the agent at the given Url.
If dna_hashes is set to None it returns the contents
for all dnas of the app.
§Returns
CallZome(Box<ZomeCallParamsSigned>)
Call a zome function.
The payload to this call is composed of the serialized ZomeCallParams as bytes
and the provenance’s signature.
Serialization must be performed with MessagePack. The resulting bytes are hashed using the SHA2 512-bit algorithm, and the hash is signed with the provenance’s private ed25519 key. The hash is not included in the call’s payload.
§Returns
AppResponse::ZomeCalled Indicates the zome call was deserialized successfully. If the
call was authorized, the response yields the return value of the zome function as MessagePack
encoded bytes. The bytes can be deserialized to the expected return type.
This response is also returned when authorization of the zome call failed because of an invalid signature, capability grant or nonce.
§Errors
SerializedBytesError is returned when the serialized bytes could not be deserialized
to the expected ZomeCallParams.
CreateCloneCell(Box<CreateCloneCellPayload>)
Clone a DNA (in the biological sense), thus creating a new Cell.
Using the provided, already-registered DNA, create a new DNA with a unique ID and the specified properties, create a new cell from this cloned DNA, and add the cell to the specified app.
§Returns
DisableCloneCell(Box<DisableCloneCellPayload>)
Disable a clone cell.
Providing a CloneId or CellId, disable an existing clone cell.
When the clone cell exists, it is disabled and can not be called any
longer. If it doesn’t exist, the call is a no-op.
§Returns
AppResponse::CloneCellDisabled if the clone cell existed
and has been disabled.
EnableCloneCell(Box<DisableCloneCellPayload>)
DumpOpTimings
Dump the lifecycle timings of the DHT ops held by this conductor for the DNA of one of this app’s cells.
Identical to AdminRequest::DumpOpTimings
except that dna_hash must be the DNA of a cell of the app this
connection is authenticated for. As there, the DHT database is shared
by every cell running the same DNA, so the dump covers the whole DHT
arc this conductor is currently holding for that DNA, not the ops of
any one agent running the DNA.
§Returns
Fields
dna_hash: HoloHash<Dna>The DNA whose DHT arc to dump op timings for. This app must run a cell of this DNA.
cursor: Option<OpTimingsCursor>Pagination cursor from a previous DumpOpTimings; only ops
ordered strictly after it are returned. None starts from the
beginning.
DumpNetworkMetrics
Retrieve network metrics for the current app.
Identical to what AdminRequest::DumpNetworkMetrics
does, but scoped to the current app.
If dna_hash is not set, metrics for all DNAs in the current app are returned.
§Returns
Fields
DumpNetworkStats
Dump network statistics from the Kitsune2 networking transport module.
Identical to what AdminRequest::DumpNetworkStats
does, but scoped to the current app. Connections that are not relevant to a DNA in the
current app are filtered out.
§Returns
ListWasmHostFunctions
List all host functions available to wasm on this conductor.
§Returns
ProvideMemproofs(HashMap<String, Arc<SerializedBytes>>)
Provide the membrane proofs for this app, if this app was installed
using allow_deferred_memproofs and memproofs were not provided at
installation time.
§Returns
EnableApp
Enable the app, only in special circumstances.
Can only be called while the app is in the Disabled(NotStartedAfterProvidingMemproofs) state.
Cannot be used to enable the app if it’s in any other state, or Disabled for any other reason.
§Returns
SendDirectSignal
Send a remote signal directly to one or more peers.
Using this app request is equivalent to calling a zome function that forwards to the HDK
function send_remote_signal. On the receiving end, the conductor does not call the
corresponding zome’s recv_remote_signal function, which would then have to invoke the HDK
function emit_signal. The result is that signals can be exchanged between peers without
having to run a WASM function on each side.
Note that this bypasses the usual security mechanism where zomes must create a capability
grant to permit recv_remote_signal to be invoked without restriction.
Trait Implementations§
Source§impl Clone for AppRequest
impl Clone for AppRequest
Source§fn clone(&self) -> AppRequest
fn clone(&self) -> AppRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AppRequest
impl Debug for AppRequest
Source§impl<'de> Deserialize<'de> for AppRequest
impl<'de> Deserialize<'de> for AppRequest
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<AppRequest, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<AppRequest, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for AppRequest
impl Serialize for AppRequest
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Source§impl TryFrom<&AppRequest> for SerializedBytes
impl TryFrom<&AppRequest> for SerializedBytes
Source§type Error = SerializedBytesError
type Error = SerializedBytesError
Source§fn try_from(t: &AppRequest) -> Result<SerializedBytes, SerializedBytesError>
fn try_from(t: &AppRequest) -> Result<SerializedBytes, SerializedBytesError>
Source§impl TryFrom<AppRequest> for SerializedBytes
impl TryFrom<AppRequest> for SerializedBytes
Source§type Error = SerializedBytesError
type Error = SerializedBytesError
Source§fn try_from(t: AppRequest) -> Result<SerializedBytes, SerializedBytesError>
fn try_from(t: AppRequest) -> Result<SerializedBytes, SerializedBytesError>
Source§impl TryFrom<SerializedBytes> for AppRequest
impl TryFrom<SerializedBytes> for AppRequest
Source§type Error = SerializedBytesError
type Error = SerializedBytesError
Source§fn try_from(sb: SerializedBytes) -> Result<AppRequest, SerializedBytesError>
fn try_from(sb: SerializedBytes) -> Result<AppRequest, SerializedBytesError>
Auto Trait Implementations§
impl !Freeze for AppRequest
impl RefUnwindSafe for AppRequest
impl Send for AppRequest
impl Sync for AppRequest
impl Unpin for AppRequest
impl UnsafeUnpin for AppRequest
impl UnwindSafe for AppRequest
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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 moreSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.