pub trait ThreadModelGuard<T> {
type Ref<'a, V>: Deref<Target = V>
where Self: 'a,
V: 'a;
type RefMut<'a, V>: DerefMut<Target = V>
where Self: 'a,
V: 'a;
// Required methods
fn new(value: T) -> Self;
fn get(&self) -> Self::Ref<'_, T>;
fn get_mut(&self) -> Self::RefMut<'_, T>;
fn is_multithread() -> bool;
}Required Associated Types§
type Ref<'a, V>: Deref<Target = V> where Self: 'a, V: 'a
type RefMut<'a, V>: DerefMut<Target = V> where Self: 'a, V: 'a
Required Methods§
fn new(value: T) -> Self
fn is_multithread() -> bool
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.