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: String§launch: bool§remote: bool§local: bool§grounded: bool§recursive: bool§cfg_ctx: FormationCfgCtxImplementations§
Source§impl 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§
Source§impl Clone for FormationCtx
impl Clone for FormationCtx
Source§fn clone(&self) -> FormationCtx
fn clone(&self) -> FormationCtx
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FormationCtx
impl Debug for FormationCtx
Auto Trait Implementations§
impl Freeze for FormationCtx
impl RefUnwindSafe for FormationCtx
impl Send for FormationCtx
impl Sync for FormationCtx
impl Unpin for FormationCtx
impl UnwindSafe for FormationCtx
Blanket Implementations§
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
Mutably borrows from an owned value. Read more