pub trait ProvideBox<L: Lt = ()> {
    // Required methods
    fn provide_box<'this>(
        self: Box<Self>,
        query: &mut Query<'_, L>,
    ) -> Option<Box<dyn ProvideBox<L> + 'this>>
       where Self: 'this;
    fn provide_box_send<'this>(
        self: Box<Self>,
        query: &mut Query<'_, L>,
    ) -> Option<Box<dyn ProvideBox<L> + Send + 'this>>
       where Self: 'this + Send;
    fn provide_box_send_sync<'this>(
        self: Box<Self>,
        query: &mut Query<'_, L>,
    ) -> Option<Box<dyn ProvideBox<L> + Send + Sync + 'this>>
       where Self: 'this + Send + Sync;
}Available on crate feature 
alloc only.Expand description
Provides values from a Box.
Auto-implemented for Provide<L> implementations.
In turn, Provide<L> is implemented for the following:
- Box<dyn ProvideBox<L>>
- Box<dyn ProvideBox<L> + Send>
- Box<dyn ProvideBox<L> + Send + Sync>
Required Methods§
Sourcefn provide_box<'this>(
    self: Box<Self>,
    query: &mut Query<'_, L>,
) -> Option<Box<dyn ProvideBox<L> + 'this>>where
    Self: 'this,
 
fn provide_box<'this>(
    self: Box<Self>,
    query: &mut Query<'_, L>,
) -> Option<Box<dyn ProvideBox<L> + 'this>>where
    Self: 'this,
Requests that the inner provider fulfill the query.
If the request fails, a Box<dyn ProvideBox<L>> is returned.
Sourcefn provide_box_send<'this>(
    self: Box<Self>,
    query: &mut Query<'_, L>,
) -> Option<Box<dyn ProvideBox<L> + Send + 'this>>where
    Self: 'this + Send,
 
fn provide_box_send<'this>(
    self: Box<Self>,
    query: &mut Query<'_, L>,
) -> Option<Box<dyn ProvideBox<L> + Send + 'this>>where
    Self: 'this + Send,
Requests that the inner provider fulfill the query.
If the request fails, a Box<dyn ProvideBox<L> + Send> is returned.
Trait Implementations§
Source§impl<'data, L: Lt + 'data> Provide<L> for Box<dyn ProvideBox<L> + 'data>
 
impl<'data, L: Lt + 'data> Provide<L> for Box<dyn ProvideBox<L> + 'data>
Source§fn request_value<T: 'static>(self) -> Result<T, Self>
 
fn request_value<T: 'static>(self) -> Result<T, Self>
Requests a value of type 
T, marked by the tag Value<T>.
Values of type T must not hold any borrowed data.Source§fn request_ref<'x, T: 'static + ?Sized>(self) -> Result<&'x T, Self>
 
fn request_ref<'x, T: 'static + ?Sized>(self) -> Result<&'x T, Self>
Requests a shared reference to a value of type 
T, marked by the tag Ref<Value<T>>.
Values of type T must not hold any borrowed data.Source§impl<'data, L: Lt + 'data> Provide<L> for Box<dyn ProvideBox<L> + Send + 'data>
 
impl<'data, L: Lt + 'data> Provide<L> for Box<dyn ProvideBox<L> + Send + 'data>
Source§fn request_value<T: 'static>(self) -> Result<T, Self>
 
fn request_value<T: 'static>(self) -> Result<T, Self>
Requests a value of type 
T, marked by the tag Value<T>.
Values of type T must not hold any borrowed data.Source§fn request_ref<'x, T: 'static + ?Sized>(self) -> Result<&'x T, Self>
 
fn request_ref<'x, T: 'static + ?Sized>(self) -> Result<&'x T, Self>
Requests a shared reference to a value of type 
T, marked by the tag Ref<Value<T>>.
Values of type T must not hold any borrowed data.Source§impl<'data, L: Lt + 'data> Provide<L> for Box<dyn ProvideBox<L> + Send + Sync + 'data>
 
impl<'data, L: Lt + 'data> Provide<L> for Box<dyn ProvideBox<L> + Send + Sync + 'data>
Source§fn request_value<T: 'static>(self) -> Result<T, Self>
 
fn request_value<T: 'static>(self) -> Result<T, Self>
Requests a value of type 
T, marked by the tag Value<T>.
Values of type T must not hold any borrowed data.Source§fn request_ref<'x, T: 'static + ?Sized>(self) -> Result<&'x T, Self>
 
fn request_ref<'x, T: 'static + ?Sized>(self) -> Result<&'x T, Self>
Requests a shared reference to a value of type 
T, marked by the tag Ref<Value<T>>.
Values of type T must not hold any borrowed data.