pub struct Data<T: Resource> { /* private fields */ }
Expand description
Data for given T: resource, along with subscribers
Implementations
sourceimpl<T: Resource> Data<T>
impl<T: Resource> Data<T>
sourcepub fn with_resource(resource: T) -> Self
pub fn with_resource(resource: T) -> Self
Create new data from resource, used when the resource is created before it’s being requested. Resource publisher will invoke this method
sourcepub fn with_subscriber(scope_id: ScopeId, subscriber: Subscriber<T>) -> Self
pub fn with_subscriber(scope_id: ScopeId, subscriber: Subscriber<T>) -> Self
Create data from subscriber, used when the resource is requested before it’s being created.
Auto Trait Implementations
impl<T> !RefUnwindSafe for Data<T>
impl<T> Send for Data<T>
impl<T> Sync for Data<T>
impl<T> Unpin for Data<T> where
T: Unpin,
impl<T> !UnwindSafe for Data<T>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more