Struct seaplane_cli::context::formation::FormationCtx
source · pub struct FormationCtx {
pub name_id: Option<FormationNameId>,
pub launch: bool,
pub remote: bool,
pub local: bool,
pub flights: Vec<FlightCtx>,
pub gateway_flight: Option<String>,
pub indices: Option<Vec<usize>>,
}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: Option<FormationNameId>§launch: bool§remote: bool§local: bool§flights: Vec<FlightCtx>§gateway_flight: Option<String>§indices: Option<Vec<usize>>Implementations§
source§impl FormationCtx
impl FormationCtx
sourcepub fn model(&self) -> Result<FormationModel>
pub fn model(&self) -> Result<FormationModel>
Creates a new seaplane::api::compute::v2::Formation 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 copy 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
source§impl Default for FormationCtx
impl Default for FormationCtx
source§impl<'a> From<&'a FormationCtx> for Formation
impl<'a> From<&'a FormationCtx> for Formation
source§fn from(value: &'a FormationCtx) -> Self
fn from(value: &'a FormationCtx) -> Self
Converts to this type from the input type.