Enum holochain_client::AdminResponse
source · [−]pub enum AdminResponse {
Show 26 variants
Error(ExternalApiWireError),
DnaRegistered(HoloHash<Dna>),
AppInstalled(InstalledAppInfo),
AppBundleInstalled(InstalledAppInfo),
AppUninstalled,
CloneCellCreated(CellId),
AdminInterfacesAdded,
AgentPubKeyGenerated(HoloHash<Agent>),
DnasListed(Vec<HoloHash<Dna>, Global>),
CellIdsListed(Vec<CellId, Global>),
EnabledAppsListed(Vec<String, Global>),
ActiveAppsListed(Vec<String, Global>),
AppsListed(Vec<InstalledAppInfo, Global>),
AppInterfaceAttached {
port: u16,
},
AppInterfacesListed(Vec<u16, Global>),
AppEnabled {
app: InstalledAppInfo,
errors: Vec<(CellId, String), Global>,
},
AppActivated {
app: InstalledAppInfo,
errors: Vec<(CellId, String), Global>,
},
AppDisabled,
AppStarted(bool),
AppDeactivated,
StateDumped(String),
FullStateDumped(FullStateDump),
NetworkMetricsDumped(String),
AgentInfoAdded,
AgentInfoRequested(Vec<AgentInfoSigned, Global>),
RecordsAdded,
}
Expand description
Represents the possible responses to an AdminRequest
and follows a general convention of noun_verb
as opposed to
the verb_noun
of AdminRequest
.
Will serialize as an object with any contents of the enum on a key data
and the enum variant on a key type
, e.g.
{ type: 'app_interface_attached', data: { port: 4000 } }
Variants
Error(ExternalApiWireError)
Can occur in response to any AdminRequest
.
There has been an error during the handling of the request.
DnaRegistered(HoloHash<Dna>)
The successful response to an AdminRequest::RegisterDna
AppInstalled(InstalledAppInfo)
The successful response to an AdminRequest::InstallApp
.
The resulting InstalledAppInfo
contains the app ID,
the AppRoleId
s and, most usefully, the new [CellId
]s
of the newly installed DNAs.
AppBundleInstalled(InstalledAppInfo)
The successful response to an AdminRequest::InstallAppBundle
.
The resulting InstalledAppInfo
contains the app ID,
the AppRoleId
s and, most usefully, the new [CellId
]s
of the newly installed DNAs.
AppUninstalled
The successful response to an AdminRequest::UninstallApp
.
It means the app was uninstalled successfully.
CloneCellCreated(CellId)
The successful response to an AdminRequest::CreateCloneCell
.
The response contains the [CellId
] of the newly created clone.
AdminInterfacesAdded
The successful response to an AdminRequest::AddAdminInterfaces
.
It means the AdminInterface
s have successfully been added.
AgentPubKeyGenerated(HoloHash<Agent>)
The successful response to an AdminRequest::GenerateAgentPubKey
.
Contains a new AgentPubKey
generated by the keystore.
DnasListed(Vec<HoloHash<Dna>, Global>)
The successful response to an AdminRequest::ListDnas
.
Contains a list of the hashes of all installed DNAs.
CellIdsListed(Vec<CellId, Global>)
The successful response to an AdminRequest::ListCellIds
.
Contains a list of all the cell IDs in the conductor.
EnabledAppsListed(Vec<String, Global>)
The successful response to an AdminRequest::ListEnabledApps
.
Contains a list of all the active app IDs in the conductor.
ActiveAppsListed(Vec<String, Global>)
alias for EnabledAppsListed
AppsListed(Vec<InstalledAppInfo, Global>)
The successful response to an AdminRequest::ListApps
.
Contains a list of the InstalledAppInfo
of the installed apps in the conductor.
AppInterfaceAttached
Fields
port: u16
Networking port of the new AppInterfaceApi
The successful response to an AdminRequest::AttachAppInterface
.
AppInterfaceApi
successfully attached.
If no port was specified in the request, contains the port number that was
selected by the conductor for running this app interface.
AppInterfacesListed(Vec<u16, Global>)
The list of attached app interfaces.
AppEnabled
The successful response to an AdminRequest::EnableApp
.
It means the app was enabled successfully. If it was possible to put the app in a running state, it will be running, otherwise it will be paused.
AppActivated
Fields
app: InstalledAppInfo
alias for AppEnabled
alias for AppEnabled
AppDisabled
The successful response to an AdminRequest::DisableApp
.
It means the app was disabled successfully.
AppStarted(bool)
The successful response to an AdminRequest::StartApp
.
The boolean determines whether or not the app was actually started.
If false
, it was because the app was in a disabled state, or the app
failed to start.
TODO: add reason why app couldn’t start
AppDeactivated
alias for AppDisabled
StateDumped(String)
The successful response to an AdminRequest::DumpState
.
The result contains a string of serialized JSON data which can be deserialized to access the full state dump and inspect the source chain.
FullStateDumped(FullStateDump)
The successful response to an AdminRequest::DumpFullState
.
The result contains a string of serialized JSON data which can be deserialized to access the full state dump and inspect the source chain.
Note that this result can be very big, as it’s requesting the full database of the cell.
NetworkMetricsDumped(String)
The successful result of a call to AdminRequest::DumpNetworkMetrics
.
The string is a JSON blob of the metrics results.
AgentInfoAdded
The successful response to an AdminRequest::AddAgentInfo
.
This means the agent info was successfully added to the peer store.
AgentInfoRequested(Vec<AgentInfoSigned, Global>)
The successful response to an AdminRequest::RequestAgentInfo
.
This is all the agent info that was found for the request.
RecordsAdded
The successful response to an AdminRequest::AddRecords
.
Trait Implementations
sourceimpl Debug for AdminResponse
impl Debug for AdminResponse
sourceimpl<'de> Deserialize<'de> for AdminResponse
impl<'de> Deserialize<'de> for AdminResponse
sourcefn deserialize<__D>(
__deserializer: __D
) -> Result<AdminResponse, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<AdminResponse, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Serialize for AdminResponse
impl Serialize for AdminResponse
sourcefn 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,
Serialize this value into the given Serde serializer. Read more
sourceimpl TryFrom<&AdminResponse> for SerializedBytes
impl TryFrom<&AdminResponse> for SerializedBytes
type Error = SerializedBytesError
type Error = SerializedBytesError
The type returned in the event of a conversion error.
sourcefn try_from(t: &AdminResponse) -> Result<SerializedBytes, SerializedBytesError>
fn try_from(t: &AdminResponse) -> Result<SerializedBytes, SerializedBytesError>
Performs the conversion.
sourceimpl TryFrom<AdminResponse> for SerializedBytes
impl TryFrom<AdminResponse> for SerializedBytes
type Error = SerializedBytesError
type Error = SerializedBytesError
The type returned in the event of a conversion error.
sourcefn try_from(t: AdminResponse) -> Result<SerializedBytes, SerializedBytesError>
fn try_from(t: AdminResponse) -> Result<SerializedBytes, SerializedBytesError>
Performs the conversion.
sourceimpl TryFrom<SerializedBytes> for AdminResponse
impl TryFrom<SerializedBytes> for AdminResponse
type Error = SerializedBytesError
type Error = SerializedBytesError
The type returned in the event of a conversion error.
sourcefn try_from(sb: SerializedBytes) -> Result<AdminResponse, SerializedBytesError>
fn try_from(sb: SerializedBytes) -> Result<AdminResponse, SerializedBytesError>
Performs the conversion.
Auto Trait Implementations
impl RefUnwindSafe for AdminResponse
impl Send for AdminResponse
impl Sync for AdminResponse
impl Unpin for AdminResponse
impl UnwindSafe for AdminResponse
Blanket Implementations
impl<T> Any for T where
T: Any + ?Sized,
impl<T> Any for T where
T: Any + ?Sized,
fn type_id_compat(&self) -> TypeId
fn type_id_compat(&self) -> TypeId
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 Read more
impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
impl<F, W, T, D> Deserialize<With<T, W>, D> for F where
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
impl<F, W, T, D> Deserialize<With<T, W>, D> for F where
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
Deserializes using the given deserializer
impl<T> FutureExt for T
impl<T> FutureExt for T
fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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>
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> Pointable for T
impl<T> Pointable for T
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct self
from the equivalent element of its
superset. Read more
fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if self
is actually part of its subset T
(and can be converted to it).
fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as self.to_subset
but without any property checks. Always succeeds.
fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts self
to the equivalent element of its superset.
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
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