pub struct Data<T: Resource> { /* private fields */ }
Expand description
Data for given T: resource, along with subscribers
Implementations§
source§impl<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.