pub struct Resource<T: ?Sized>(/* private fields */);Expand description
A smarter pointer help us to share resource in application, and it’ use a cheap way to compare if two resource is same one.
§Notice
Compare two Resource just compare if it come form same resource not
compare its content.
Implementations§
Trait Implementations§
Source§impl<'de, T> Deserialize<'de> for Resource<T>where
T: Deserialize<'de> + ?Sized,
impl<'de, T> Deserialize<'de> for Resource<T>where
T: Deserialize<'de> + ?Sized,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl<T: ?Sized> Eq for Resource<T>
Auto Trait Implementations§
impl<T> Freeze for Resource<T>where
T: ?Sized,
impl<T> RefUnwindSafe for Resource<T>where
T: RefUnwindSafe + ?Sized,
impl<T> Send for Resource<T>
impl<T> Sync for Resource<T>
impl<T> Unpin for Resource<T>
impl<T> UnwindSafe for Resource<T>
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