pub struct StaticRefShared<T: ?Sized + 'static>(/* private fields */);Expand description
Shared wrapper backed by a 'static reference.
Thin wrapper that exposes user-supplied 'static values through the Shared abstraction.
Implementations§
Sourcepub const fn new(reference: &'static T) -> Self
pub const fn new(reference: &'static T) -> Self
Creates a new wrapper from a 'static reference.
Sourcepub const fn as_ref(self) -> &'static T
pub const fn as_ref(self) -> &'static T
Returns the raw 'static reference.
Trait Implementations§
Source§type Dyn<U: ?Sized + 'static> = StaticRefShared<U>
type Dyn<U: ?Sized + 'static> = StaticRefShared<U>
Shared wrapper yielded after converting to a new dynamically sized view.
Auto Trait Implementations§
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