pub struct Shared<T> { /* private fields */ }Expand description
Wrapper around data to be shared in the server
The main use for this structure is to work as an extractor in the server callbacks to access shared data. An example can be found in the ServerBuilder’s share.
Implementations§
Sourcepub fn into_inner(self) -> Arc<T>
pub fn into_inner(self) -> Arc<T>
Extracts the contained data from the Shared in an Arc
Trait Implementations§
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