pub struct Fleet {
pub name: String,
pub members: BTreeMap<String, IacResource>,
}Expand description
A named collection of IacResource values with a stable canonical
order (by member name).
Fields§
§name: StringHuman-readable fleet name (often an environment or cluster id).
members: BTreeMap<String, IacResource>Members keyed by member name — BTreeMap so iteration is sorted.
Implementations§
Source§impl Fleet
impl Fleet
Sourcepub fn insert(
&mut self,
name: impl Into<String>,
resource: IacResource,
) -> Option<IacResource>
pub fn insert( &mut self, name: impl Into<String>, resource: IacResource, ) -> Option<IacResource>
Insert or replace a member by name. Returns the previous value.
Sourcepub fn remove(&mut self, name: &str) -> Option<IacResource>
pub fn remove(&mut self, name: &str) -> Option<IacResource>
Remove a member. Returns the removed value.
Sourcepub fn get(&self, name: &str) -> Option<&IacResource>
pub fn get(&self, name: &str) -> Option<&IacResource>
Look up a member by name.
Sourcepub fn member_hash(&self, name: &str) -> Option<String>
pub fn member_hash(&self, name: &str) -> Option<String>
Per-member content hash in hex (the same hash the blanket
Backend→Morphism impl records as source_hash).
Sourcepub fn member_names(&self) -> Vec<&str>
pub fn member_names(&self) -> Vec<&str>
Member names in canonical (sorted) order.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Fleet
impl RefUnwindSafe for Fleet
impl Send for Fleet
impl Sync for Fleet
impl Unpin for Fleet
impl UnsafeUnpin for Fleet
impl UnwindSafe for Fleet
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