We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent da4404b commit 640d276Copy full SHA for 640d276
1 file changed
src/userdata/cell.rs
@@ -412,6 +412,15 @@ impl<T: 'static> UserDataStorage<T> {
412
}
413
414
415
+ #[allow(unused)]
416
+ #[inline(always)]
417
+ pub(crate) fn try_borrow(&self) -> Result<UserDataBorrowRef<T>> {
418
+ match self {
419
+ Self::Owned(data) => data.try_borrow(),
420
+ Self::Scoped(_) => Err(Error::UserDataTypeMismatch),
421
+ }
422
423
+
424
#[inline(always)]
425
pub(crate) fn try_borrow_mut(&self) -> Result<UserDataBorrowMut<T>> {
426
match self {
0 commit comments