pub enum AppRequest {
AppInfo,
AgentInfo {
dna_hashes: Option<Vec<DnaHash>>,
},
PeerMetaInfo {
url: Url,
dna_hashes: Option<Vec<DnaHash>>,
},
CallZome(Box<ZomeCallParamsSigned>),
CreateCloneCell(Box<CreateCloneCellPayload>),
DisableCloneCell(Box<DisableCloneCellPayload>),
EnableCloneCell(Box<EnableCloneCellPayload>),
DumpNetworkMetrics {
dna_hash: Option<DnaHash>,
include_dht_summary: bool,
},
DumpNetworkStats,
ListWasmHostFunctions,
ProvideMemproofs(MemproofMap),
EnableApp,
}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<EnableCloneCellPayload>)
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(MemproofMap)
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
Trait Implementations§
Source§impl Clone for AppRequest
impl Clone for AppRequest
Source§fn clone(&self) -> AppRequest
fn clone(&self) -> AppRequest
1.0.0 · 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<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for AppRequest
impl Serialize for AppRequest
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 UnwindSafe for AppRequest
Blanket Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> 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 more