Struct BaseValues
pub struct BaseValues { /* private fields */ }Expand description
A registry for base value types and functions on them.
Implementations§
§impl BaseValues
impl BaseValues
pub fn register_type<P>(&mut self) -> BaseValueIdwhere
P: BaseValue,
pub fn register_type<P>(&mut self) -> BaseValueIdwhere
P: BaseValue,
Register the given type P as a base value type in this registry.
pub fn get_ty<P>(&self) -> BaseValueIdwhere
P: BaseValue,
pub fn get_ty<P>(&self) -> BaseValueIdwhere
P: BaseValue,
Get the [BaseValueId] for the given base value type P.
pub fn get_ty_by_id(&self, id: TypeId) -> BaseValueId
pub fn get_ty_by_id(&self, id: TypeId) -> BaseValueId
Get the [BaseValueId] for the given base value type id.
Trait Implementations§
§impl Clone for BaseValues
impl Clone for BaseValues
§fn clone(&self) -> BaseValues
fn clone(&self) -> BaseValues
Returns a copy 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 more§impl Default for BaseValues
impl Default for BaseValues
§fn default() -> BaseValues
fn default() -> BaseValues
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for BaseValues
impl !RefUnwindSafe for BaseValues
impl Send for BaseValues
impl Sync for BaseValues
impl Unpin for BaseValues
impl !UnwindSafe for BaseValues
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,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more