pub struct ConductorState { /* private fields */ }
Expand description
Mutable conductor state, stored in a DB and writable only via Admin interface.
References between structs (cell configs pointing to the agent and DNA to be instantiated) are implemented via string IDs.
Implementations
sourceimpl ConductorState
impl ConductorState
sourcepub fn installed_apps(&self) -> &InstalledAppMap
pub fn installed_apps(&self) -> &InstalledAppMap
Immutable access to the inner collection of all apps
sourcepub fn installed_apps_mut(&mut self) -> &mut InstalledAppMap
👎 Deprecated: Bare mutable access isn’t the best idea
pub fn installed_apps_mut(&mut self) -> &mut InstalledAppMap
Bare mutable access isn’t the best idea
Mutable access to the inner collection of all apps
sourcepub fn enabled_apps(
&self
) -> impl Iterator<Item = (&InstalledAppId, &InstalledApp)> + '_
pub fn enabled_apps(
&self
) -> impl Iterator<Item = (&InstalledAppId, &InstalledApp)> + '_
Iterate over only the “enabled” apps
sourcepub fn disabled_apps(
&self
) -> impl Iterator<Item = (&InstalledAppId, &InstalledApp)> + '_
pub fn disabled_apps(
&self
) -> impl Iterator<Item = (&InstalledAppId, &InstalledApp)> + '_
Iterate over only the “disabled” apps
sourcepub fn running_apps(
&self
) -> impl Iterator<Item = (&InstalledAppId, RunningApp)> + '_
pub fn running_apps(
&self
) -> impl Iterator<Item = (&InstalledAppId, RunningApp)> + '_
Iterate over only the “running” apps
sourcepub fn paused_apps(
&self
) -> impl Iterator<Item = (&InstalledAppId, StoppedApp)> + '_
pub fn paused_apps(
&self
) -> impl Iterator<Item = (&InstalledAppId, StoppedApp)> + '_
Iterate over only the paused apps
sourcepub fn stopped_apps(
&self
) -> impl Iterator<Item = (&InstalledAppId, StoppedApp)> + '_
pub fn stopped_apps(
&self
) -> impl Iterator<Item = (&InstalledAppId, StoppedApp)> + '_
Iterate over only the “stopped” apps (paused OR disabled)
sourcepub fn get_app(&self, id: &InstalledAppId) -> ConductorResult<&InstalledApp>
pub fn get_app(&self, id: &InstalledAppId) -> ConductorResult<&InstalledApp>
Getter for a single app. Returns error if app missing.
sourcepub fn remove_app(
&mut self,
id: &InstalledAppId
) -> ConductorResult<InstalledApp>
pub fn remove_app(
&mut self,
id: &InstalledAppId
) -> ConductorResult<InstalledApp>
Getter for a single app. Returns error if app missing.
sourcepub fn add_app(
&mut self,
app: InstalledAppCommon
) -> ConductorResult<StoppedApp>
pub fn add_app(
&mut self,
app: InstalledAppCommon
) -> ConductorResult<StoppedApp>
Add an app in the Deactivated state. Returns an error if an app is already present at the given ID.
sourcepub fn transition_app_status(
&mut self,
id: &InstalledAppId,
transition: AppStatusTransition
) -> ConductorResult<(&InstalledApp, AppStatusFx)>
pub fn transition_app_status(
&mut self,
id: &InstalledAppId,
transition: AppStatusTransition
) -> ConductorResult<(&InstalledApp, AppStatusFx)>
Update the status of an installed app in-place. Return a reference to the (possibly updated) app. Additionally, if an update occurred, return the previous state. If no update occurred, return None.
sourcepub fn get_app_info(
&self,
installed_app_id: &InstalledAppId
) -> Option<InstalledAppInfo>
pub fn get_app_info(
&self,
installed_app_id: &InstalledAppId
) -> Option<InstalledAppInfo>
Retrieve info about an installed App by its InstalledAppId
sourcepub fn interface_by_id(&self, id: &AppInterfaceId) -> Option<AppInterfaceConfig>
pub fn interface_by_id(&self, id: &AppInterfaceId) -> Option<AppInterfaceConfig>
Returns the interface configuration with the given ID if present
Trait Implementations
sourceimpl Clone for ConductorState
impl Clone for ConductorState
sourcefn clone(&self) -> ConductorState
fn clone(&self) -> ConductorState
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ConductorState
impl Debug for ConductorState
sourceimpl Default for ConductorState
impl Default for ConductorState
sourcefn default() -> ConductorState
fn default() -> ConductorState
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for ConductorState
impl<'de> Deserialize<'de> for ConductorState
sourcefn 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>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Serialize for ConductorState
impl Serialize for ConductorState
sourceimpl TryFrom<&'_ ConductorState> for SerializedBytes
impl TryFrom<&'_ ConductorState> for SerializedBytes
type Error = SerializedBytesError
type Error = SerializedBytesError
The type returned in the event of a conversion error.
sourcefn try_from(t: &ConductorState) -> Result<SerializedBytes, SerializedBytesError>
fn try_from(t: &ConductorState) -> Result<SerializedBytes, SerializedBytesError>
Performs the conversion.
sourceimpl TryFrom<ConductorState> for SerializedBytes
impl TryFrom<ConductorState> for SerializedBytes
type Error = SerializedBytesError
type Error = SerializedBytesError
The type returned in the event of a conversion error.
sourcefn try_from(t: ConductorState) -> Result<SerializedBytes, SerializedBytesError>
fn try_from(t: ConductorState) -> Result<SerializedBytes, SerializedBytesError>
Performs the conversion.
sourceimpl TryFrom<SerializedBytes> for ConductorState
impl TryFrom<SerializedBytes> for ConductorState
type Error = SerializedBytesError
type Error = SerializedBytesError
The type returned in the event of a conversion error.
sourcefn try_from(sb: SerializedBytes) -> Result<ConductorState, SerializedBytesError>
fn try_from(sb: SerializedBytes) -> Result<ConductorState, SerializedBytesError>
Performs the conversion.
Auto Trait Implementations
impl RefUnwindSafe for ConductorState
impl Send for ConductorState
impl Sync for ConductorState
impl Unpin for ConductorState
impl UnwindSafe for ConductorState
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<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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
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