Struct warmy::res::Res
[−]
[src]
pub struct Res<T>(_);
Shareable resource type.
Resources are wrapped in this type. You cannot do much with an object of this type, despite borrowing immutable or mutably its content.
Methods
impl<T> Res<T>
[src]
pub fn new(t: T) -> Self
[src]
Wrap a value in a shareable resource.
pub fn borrow(&self) -> Ref<T>
[src]
Borrow a resource for as long as the return value lives.
pub fn borrow_mut(&self) -> RefMut<T>
[src]
Mutably borrow a resource for as long as the return value lives.
Trait Implementations
impl<T: Debug> Debug for Res<T>
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more