pub struct FrcStructDescDB;Expand description
A global database of structure descriptions
Implementations§
Source§impl FrcStructDescDB
impl FrcStructDescDB
Sourcepub fn add(desc: FrcStructDesc)
pub fn add(desc: FrcStructDesc)
Adds a structure description to the global database,
this is a runtime equivalent of the inventory::submit! macro.
Sourcepub fn add_ref(desc: &'static FrcStructDesc)
pub fn add_ref(desc: &'static FrcStructDesc)
Adds a structure description to the global database,
this is a runtime equivalent of the inventory::submit! macro.
Sourcepub fn contains_type(type_str: &str) -> bool
pub fn contains_type(type_str: &str) -> bool
Checks if the global database contains a structure description for a given type
Sourcepub fn get(type_str: &str) -> Option<&'static FrcStructDesc>
pub fn get(type_str: &str) -> Option<&'static FrcStructDesc>
Gets a structure description from the global database for a given type, returns None if the type is not found
Trait Implementations§
Source§impl Clone for FrcStructDescDB
impl Clone for FrcStructDescDB
Source§fn clone(&self) -> FrcStructDescDB
fn clone(&self) -> FrcStructDescDB
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 moreimpl Copy for FrcStructDescDB
Source§impl Debug for FrcStructDescDB
impl Debug for FrcStructDescDB
impl Eq for FrcStructDescDB
Source§impl Ord for FrcStructDescDB
impl Ord for FrcStructDescDB
Source§fn cmp(&self, other: &FrcStructDescDB) -> Ordering
fn cmp(&self, other: &FrcStructDescDB) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for FrcStructDescDB
impl PartialEq for FrcStructDescDB
Source§fn eq(&self, other: &FrcStructDescDB) -> bool
fn eq(&self, other: &FrcStructDescDB) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for FrcStructDescDB
impl PartialOrd for FrcStructDescDB
impl StructuralPartialEq for FrcStructDescDB
Auto Trait Implementations§
impl Freeze for FrcStructDescDB
impl RefUnwindSafe for FrcStructDescDB
impl Send for FrcStructDescDB
impl Sync for FrcStructDescDB
impl Unpin for FrcStructDescDB
impl UnsafeUnpin for FrcStructDescDB
impl UnwindSafe for FrcStructDescDB
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> Scalar for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.