pub struct BspValue { /* private fields */ }Expand description
A thread-safe, reference-counted container wrapping arbitrary Rust types.
Implementations§
Source§impl BspValue
impl BspValue
pub fn new<T: Any + Send + Sync>(val: T) -> Self
pub const fn type_name(&self) -> &'static str
pub fn is<T: Any>(&self) -> bool
pub fn downcast<T: Any + Send + Sync>(self) -> Result<Arc<T>, Self>
pub fn downcast_ref<T: Any>(&self) -> Option<&T>
pub fn downcast_mut<T: Any>(&mut self) -> Option<&mut T>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for BspValue
impl !UnwindSafe for BspValue
impl Freeze for BspValue
impl Send for BspValue
impl Sync for BspValue
impl Unpin for BspValue
impl UnsafeUnpin for BspValue
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