/// Like `fetch`, but returns an `Option` instead of inserting a default
/// value in case the resource does not exist.
Like `fetch`, but returns an `Option` instead of inserting a default
value in case the resource does not exist.
Like ` fetch ` but returns an ` Option ` instead of inserting a default value in case the resource does not exist .
pub fn try_fetch<T>(&self) -> Option<Fetch<T>>
    where
        T: Resource,
    {
        let res_id = ResourceId::new::<T>();
        self.resources.get(&res_id).map(|r| Fetch {
            inner: r.borrow(),
            phantom: PhantomData,
        })
    }
pub fn try_fetch < T > ( & self ) -> Option < Fetch < T > > where T : Resource , { let res_id = ResourceId :: new :: < T > ( ) ; self . resources . get ( & res_id ) . map ( | r | Fetch { inner : r . borrow ( ) , phantom : PhantomData , } ) }
Like `fetch`, but returns an `Option` instead of inserting a default
value in case the resource does not exist.
Like ` fetch ` but returns an ` Option ` instead of inserting a default value in case the resource does not exist .
&self