pub struct FormationCatalog { /* private fields */ }Expand description
Registry of reusable formation templates.
Implementations§
Source§impl FormationCatalog
impl FormationCatalog
pub fn new() -> Self
pub fn with_template(self, template: FormationTemplate) -> Self
pub fn register(&mut self, template: FormationTemplate)
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn get(&self, template_id: &str) -> Option<&FormationTemplate>
pub fn iter(&self) -> Iter<'_, FormationTemplate>
pub fn matches(&self, query: &FormationTemplateQuery) -> Vec<&FormationTemplate>
pub fn top_match( &self, query: &FormationTemplateQuery, ) -> Option<&FormationTemplate>
Trait Implementations§
Source§impl Clone for FormationCatalog
impl Clone for FormationCatalog
Source§fn clone(&self) -> FormationCatalog
fn clone(&self) -> FormationCatalog
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 FormationCatalog
impl Debug for FormationCatalog
Source§impl Default for FormationCatalog
impl Default for FormationCatalog
Source§fn default() -> FormationCatalog
fn default() -> FormationCatalog
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for FormationCatalog
impl<'de> Deserialize<'de> for FormationCatalog
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
Source§impl<'a> IntoIterator for &'a FormationCatalog
impl<'a> IntoIterator for &'a FormationCatalog
Auto Trait Implementations§
impl Freeze for FormationCatalog
impl RefUnwindSafe for FormationCatalog
impl Send for FormationCatalog
impl Sync for FormationCatalog
impl Unpin for FormationCatalog
impl UnsafeUnpin for FormationCatalog
impl UnwindSafe for FormationCatalog
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