Struct holochain_types::app::StoppedApp
source · pub struct StoppedApp { /* private fields */ }
Expand description
An app which is either Paused or Disabled, i.e. not Running
Implementations§
source§impl StoppedApp
impl StoppedApp
sourcepub fn new(app: InstalledAppCommon, reason: StoppedAppReason) -> Self
👎Deprecated: should only be constructable through conversions from other types
pub fn new(app: InstalledAppCommon, reason: StoppedAppReason) -> Self
Constructor
sourcepub fn new_fresh(app: InstalledAppCommon) -> Self
pub fn new_fresh(app: InstalledAppCommon) -> Self
Constructor
sourcepub fn from_app(app: &InstalledApp) -> Option<Self>
pub fn from_app(app: &InstalledApp) -> Option<Self>
If the app is Stopped, convert into a StoppedApp. Returns None if app is Running.
sourcepub fn into_active(self) -> RunningApp
pub fn into_active(self) -> RunningApp
Convert to a RunningApp
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 StoppedApp
impl AsMut<InstalledAppCommon> for StoppedApp
source§fn as_mut(&mut self) -> &mut InstalledAppCommon
fn as_mut(&mut self) -> &mut InstalledAppCommon
source§impl AsRef<InstalledAppCommon> for StoppedApp
impl AsRef<InstalledAppCommon> for StoppedApp
source§fn as_ref(&self) -> &InstalledAppCommon
fn as_ref(&self) -> &InstalledAppCommon
source§impl Borrow<InstalledAppCommon> for StoppedApp
impl Borrow<InstalledAppCommon> for StoppedApp
source§fn borrow(&self) -> &InstalledAppCommon
fn borrow(&self) -> &InstalledAppCommon
source§impl BorrowMut<InstalledAppCommon> for StoppedApp
impl BorrowMut<InstalledAppCommon> for StoppedApp
source§fn borrow_mut(&mut self) -> &mut InstalledAppCommon
fn borrow_mut(&mut self) -> &mut InstalledAppCommon
source§impl Clone for StoppedApp
impl Clone for StoppedApp
source§fn clone(&self) -> StoppedApp
fn clone(&self) -> StoppedApp
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for StoppedApp
impl Debug for StoppedApp
source§impl Deref for StoppedApp
impl Deref for StoppedApp
source§impl DerefMut for StoppedApp
impl DerefMut for StoppedApp
source§impl<'de> Deserialize<'de> for StoppedApp
impl<'de> Deserialize<'de> for StoppedApp
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<StoppedApp> for InstalledApp
impl From<StoppedApp> for InstalledApp
source§fn from(d: StoppedApp) -> Self
fn from(d: StoppedApp) -> Self
source§impl From<StoppedApp> for InstalledAppCommon
impl From<StoppedApp> for InstalledAppCommon
source§fn from(d: StoppedApp) -> Self
fn from(d: StoppedApp) -> Self
source§impl PartialEq for StoppedApp
impl PartialEq for StoppedApp
source§fn eq(&self, other: &StoppedApp) -> bool
fn eq(&self, other: &StoppedApp) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for StoppedApp
impl Serialize for StoppedApp
impl Eq for StoppedApp
impl StructuralPartialEq for StoppedApp
Auto Trait Implementations§
impl RefUnwindSafe for StoppedApp
impl Send for StoppedApp
impl Sync for StoppedApp
impl Unpin for StoppedApp
impl UnwindSafe for StoppedApp
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.