Struct holochain_types::app::RunningApp
source · pub struct RunningApp(/* private fields */);
Expand description
An active app
Implementations§
source§impl RunningApp
impl RunningApp
sourcepub fn into_stopped(self, reason: StoppedAppReason) -> StoppedApp
pub fn into_stopped(self, reason: StoppedAppReason) -> StoppedApp
Convert to a StoppedApp with the given reason
sourcepub fn into_common(self) -> InstalledAppCommon
pub fn into_common(self) -> InstalledAppCommon
Move inner type out
Methods from Deref<Target = InstalledAppCommon>§
sourcepub fn id(&self) -> &InstalledAppId
pub fn id(&self) -> &InstalledAppId
Accessor
sourcepub fn provisioned_cells(&self) -> impl Iterator<Item = (&RoleName, &CellId)>
pub fn provisioned_cells(&self) -> impl Iterator<Item = (&RoleName, &CellId)>
Accessor
sourcepub fn clone_cells(&self) -> impl Iterator<Item = (&CloneId, &CellId)>
pub fn clone_cells(&self) -> impl Iterator<Item = (&CloneId, &CellId)>
Accessor
sourcepub fn disabled_clone_cells(&self) -> impl Iterator<Item = (&CloneId, &CellId)>
pub fn disabled_clone_cells(&self) -> impl Iterator<Item = (&CloneId, &CellId)>
Accessor
sourcepub fn clone_cells_for_role_name(
&self,
role_name: &RoleName
) -> Option<&HashMap<CloneId, CellId>>
pub fn clone_cells_for_role_name( &self, role_name: &RoleName ) -> Option<&HashMap<CloneId, CellId>>
Accessor
sourcepub fn disabled_clone_cells_for_role_name(
&self,
role_name: &RoleName
) -> Option<&HashMap<CloneId, CellId>>
pub fn disabled_clone_cells_for_role_name( &self, role_name: &RoleName ) -> Option<&HashMap<CloneId, CellId>>
Accessor
sourcepub fn clone_cell_ids(&self) -> impl Iterator<Item = &CellId>
pub fn clone_cell_ids(&self) -> impl Iterator<Item = &CellId>
Accessor
sourcepub fn disabled_clone_cell_ids(&self) -> impl Iterator<Item = &CellId>
pub fn disabled_clone_cell_ids(&self) -> impl Iterator<Item = &CellId>
Accessor
sourcepub fn all_cells(&self) -> impl Iterator<Item = &CellId>
pub fn all_cells(&self) -> impl Iterator<Item = &CellId>
Iterator of all cells, both provisioned and cloned
sourcepub fn all_enabled_cells(&self) -> impl Iterator<Item = &CellId>
pub fn all_enabled_cells(&self) -> impl Iterator<Item = &CellId>
Iterator of all running cells, both provisioned and cloned. Provisioned cells will always be running if the app is running, but some cloned cells may be disabled and will not be returned.
sourcepub fn required_cells(&self) -> impl Iterator<Item = &CellId>
pub fn required_cells(&self) -> impl Iterator<Item = &CellId>
Iterator of all “required” cells, meaning Cells which must be running for this App to be able to run.
Currently this is simply all provisioned cells, but this concept may become more nuanced in the future.
sourcepub fn role(&self, role_name: &RoleName) -> AppResult<&AppRoleAssignment>
pub fn role(&self, role_name: &RoleName) -> AppResult<&AppRoleAssignment>
Accessor for particular role
sourcepub fn roles(&self) -> &HashMap<RoleName, AppRoleAssignment>
pub fn roles(&self) -> &HashMap<RoleName, AppRoleAssignment>
Accessor
sourcepub fn add_clone(
&mut self,
role_name: &RoleName,
cell_id: &CellId
) -> AppResult<CloneId>
pub fn add_clone( &mut self, role_name: &RoleName, cell_id: &CellId ) -> AppResult<CloneId>
Add a clone cell.
sourcepub fn get_clone_cell_id(
&self,
clone_cell_id: &CloneCellId
) -> AppResult<CellId>
pub fn get_clone_cell_id( &self, clone_cell_id: &CloneCellId ) -> AppResult<CellId>
Get a clone cell id from its clone id.
sourcepub fn get_clone_id(&self, clone_cell_id: &CloneCellId) -> AppResult<CloneId>
pub fn get_clone_id(&self, clone_cell_id: &CloneCellId) -> AppResult<CloneId>
Get the clone id from either clone or cell id.
sourcepub fn get_disabled_clone_id(
&self,
clone_cell_id: &CloneCellId
) -> AppResult<CloneId>
pub fn get_disabled_clone_id( &self, clone_cell_id: &CloneCellId ) -> AppResult<CloneId>
Get the clone id from either clone or cell id.
sourcepub fn disable_clone_cell(&mut self, clone_id: &CloneId) -> AppResult<()>
pub fn disable_clone_cell(&mut self, clone_id: &CloneId) -> AppResult<()>
Disable a clone cell.
Removes the cell from the list of clones, so it is not accessible any longer. If the cell is already disabled, do nothing and return Ok.
sourcepub fn enable_clone_cell(
&mut self,
clone_id: &CloneId
) -> AppResult<InstalledCell>
pub fn enable_clone_cell( &mut self, clone_id: &CloneId ) -> AppResult<InstalledCell>
Enable a disabled clone cell.
The clone cell is added back to the list of clones and can be accessed again. If the cell is already enabled, do nothing and return Ok.
Returns
The enabled clone cell.
sourcepub fn delete_clone_cell(&mut self, clone_id: &CloneId) -> AppResult<()>
pub fn delete_clone_cell(&mut self, clone_id: &CloneId) -> AppResult<()>
Delete a disabled clone cell.
sourcepub fn agent_key(&self) -> &AgentPubKey
pub fn agent_key(&self) -> &AgentPubKey
Accessor
sourcepub fn manifest(&self) -> &AppManifest
pub fn manifest(&self) -> &AppManifest
Return the manifest if available
sourcepub fn role_assignments(&self) -> &HashMap<RoleName, AppRoleAssignment>
pub fn role_assignments(&self) -> &HashMap<RoleName, AppRoleAssignment>
Return the list of role assignments
Trait Implementations§
source§impl AsMut<InstalledAppCommon> for RunningApp
impl AsMut<InstalledAppCommon> for RunningApp
source§fn as_mut(&mut self) -> &mut InstalledAppCommon
fn as_mut(&mut self) -> &mut InstalledAppCommon
source§impl AsRef<InstalledAppCommon> for RunningApp
impl AsRef<InstalledAppCommon> for RunningApp
source§fn as_ref(&self) -> &InstalledAppCommon
fn as_ref(&self) -> &InstalledAppCommon
source§impl Borrow<InstalledAppCommon> for RunningApp
impl Borrow<InstalledAppCommon> for RunningApp
source§fn borrow(&self) -> &InstalledAppCommon
fn borrow(&self) -> &InstalledAppCommon
source§impl BorrowMut<InstalledAppCommon> for RunningApp
impl BorrowMut<InstalledAppCommon> for RunningApp
source§fn borrow_mut(&mut self) -> &mut InstalledAppCommon
fn borrow_mut(&mut self) -> &mut InstalledAppCommon
source§impl Clone for RunningApp
impl Clone for RunningApp
source§fn clone(&self) -> RunningApp
fn clone(&self) -> RunningApp
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for RunningApp
impl Debug for RunningApp
source§impl Deref for RunningApp
impl Deref for RunningApp
source§impl DerefMut for RunningApp
impl DerefMut for RunningApp
source§impl<'de> Deserialize<'de> for RunningApp
impl<'de> Deserialize<'de> for RunningApp
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 From<InstalledAppCommon> for RunningApp
impl From<InstalledAppCommon> for RunningApp
source§fn from(original: InstalledAppCommon) -> RunningApp
fn from(original: InstalledAppCommon) -> RunningApp
source§impl From<RunningApp> for InstalledApp
impl From<RunningApp> for InstalledApp
source§fn from(app: RunningApp) -> Self
fn from(app: RunningApp) -> Self
source§impl PartialEq for RunningApp
impl PartialEq for RunningApp
source§fn eq(&self, other: &RunningApp) -> bool
fn eq(&self, other: &RunningApp) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for RunningApp
impl Serialize for RunningApp
impl Eq for RunningApp
impl StructuralEq for RunningApp
impl StructuralPartialEq for RunningApp
Auto Trait Implementations§
impl RefUnwindSafe for RunningApp
impl Send for RunningApp
impl Sync for RunningApp
impl Unpin for RunningApp
impl UnwindSafe for RunningApp
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata ) -> <T as Pointee>::Metadata
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<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
§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>
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§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>
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>
§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
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
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.