Struct seaplane_cli::context::formation::FormationCtx
source · [−]pub struct FormationCtx {
pub name_id: String,
pub launch: bool,
pub remote: bool,
pub local: bool,
pub grounded: bool,
pub recursive: bool,
pub cfg_ctx: FormationCfgCtx,
}Expand description
Represents the “Source of Truth” i.e. it combines all the CLI options, ENV vars, and config values into a single structure that can be used later to build models for the API or local structs for serializing
A somewhat counter-intuitive thing about Formations and their models is the there is no “Formation Model” only a “Formation Configuration Model” This is because a “Formation” so to speak is really just a named collection of configurations and info about their traffic weights/activation statuses.
Fields
name_id: Stringlaunch: boolremote: boollocal: boolgrounded: boolrecursive: boolcfg_ctx: FormationCfgCtxImplementations
sourceimpl FormationCtx
impl FormationCtx
sourcepub fn update_from_formation_plan(
&mut self,
matches: &SeaplaneFormationPlanArgMatches<'_>,
flights_db: &Flights
) -> Result<()>
pub fn update_from_formation_plan(
&mut self,
matches: &SeaplaneFormationPlanArgMatches<'_>,
flights_db: &Flights
) -> Result<()>
flight is the name of the argument for the Flight’s name/id
sourcepub fn configuration_model(
&self,
ctx: &Ctx
) -> Result<FormationConfigurationModel>
pub fn configuration_model(
&self,
ctx: &Ctx
) -> Result<FormationConfigurationModel>
Creates a new seaplane::api::compute::v1::FormationConfiguration from the contained values
Trait Implementations
sourceimpl Clone for FormationCtx
impl Clone for FormationCtx
sourcefn clone(&self) -> FormationCtx
fn clone(&self) -> FormationCtx
Returns a copy of the value. Read more
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresourceimpl Debug for FormationCtx
impl Debug for FormationCtx
Auto Trait Implementations
impl RefUnwindSafe for FormationCtx
impl Send for FormationCtx
impl Sync for FormationCtx
impl Unpin for FormationCtx
impl UnwindSafe for FormationCtx
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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