pub struct Pool { /* private fields */ }Implementations§
Source§impl Pool
impl Pool
pub fn new() -> Self
pub fn set<T>(
&mut self,
key: &str,
value: impl TryIntoDataContainer<T>,
) -> Result<(), PoolError>where
T: PoolData + HasDataType,
pub fn get<T, R>(&self, key: &str) -> Result<R, PoolError>
pub fn get_container<T>(
&self,
key: &str,
) -> Result<DataContainer<'static, T>, PoolError>where
T: PoolData + HasDataType,
pub fn contains(&self, key: &str) -> bool
pub fn keys(&self) -> Vec<String>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl<'a> GetFromDataContainer<Pool> for DataContainer<'a, Pool>
impl<'a> GetFromDataContainer<Pool> for DataContainer<'a, Pool>
Source§impl IntoDataContainer<Pool> for Pool
impl IntoDataContainer<Pool> for Pool
fn into_data_container(self) -> DataContainer<'static, Pool>
Auto Trait Implementations§
impl !Send for Pool
impl !Sync for Pool
impl Freeze for Pool
impl RefUnwindSafe for Pool
impl Unpin for Pool
impl UnsafeUnpin for Pool
impl UnwindSafe for Pool
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