pub struct FormationCatalog { /* private fields */ }Expand description
Registry of reusable formation templates.
Implementations§
Source§impl FormationCatalog
impl FormationCatalog
pub fn new() -> FormationCatalog
pub fn with_template(self, template: FormationTemplate) -> FormationCatalog
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 · 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<FormationCatalog, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<FormationCatalog, <__D as Deserializer<'de>>::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
Source§type Item = &'a FormationTemplate
type Item = &'a FormationTemplate
The type of the elements being iterated over.
Source§type IntoIter = Iter<'a, FormationTemplate>
type IntoIter = Iter<'a, FormationTemplate>
Which kind of iterator are we turning this into?
Source§fn into_iter(self) -> <&'a FormationCatalog as IntoIterator>::IntoIter
fn into_iter(self) -> <&'a FormationCatalog as IntoIterator>::IntoIter
Creates an iterator from a value. Read more
Source§impl Serialize for FormationCatalog
impl Serialize for FormationCatalog
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
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