pub struct Formation {
pub id: Id,
pub name: Option<String>,
pub local: HashSet<Id>,
pub in_air: HashSet<Id>,
pub grounded: HashSet<Id>,
}Fields§
§id: Id§name: Option<String>§local: HashSet<Id>§in_air: HashSet<Id>§grounded: HashSet<Id>Implementations§
Source§impl Formation
impl Formation
pub fn new<S: Into<String>>(name: S) -> Self
pub fn is_empty(&self) -> bool
Sourcepub fn replace_id(&mut self, old_id: &Id, new_id: Id)
pub fn replace_id(&mut self, old_id: &Id, new_id: Id)
Replaces all occurrences of old_id with new_id
Sourcepub fn local_only_configs(&self) -> Vec<Id>
pub fn local_only_configs(&self) -> Vec<Id>
Returns the Formation Configuration IDs that are neither Grounded (Inactive) or In Air (active)
Sourcepub fn local_or_grounded_configs(&self) -> Vec<Id>
pub fn local_or_grounded_configs(&self) -> Vec<Id>
Returns the Formation Configuration IDs that are either Grounded (Inactive) or Local
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Formation
impl<'de> Deserialize<'de> for Formation
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Formation
impl RefUnwindSafe for Formation
impl Send for Formation
impl Sync for Formation
impl Unpin for Formation
impl UnwindSafe for Formation
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