pub struct Demand<'a, 'v> { /* private fields */ }
Expand description
Taken by StarlarkValue::provide
to provide different data depending on the type.
Implementations§
source§impl<'a, 'v> Demand<'a, 'v>
impl<'a, 'v> Demand<'a, 'v>
sourcepub fn provide_value<T: AnyLifetime<'v>>(&mut self, value: T)
pub fn provide_value<T: AnyLifetime<'v>>(&mut self, value: T)
Provide a value of given type.
If type matches the type requested from Value::request_value
, the value is stored
inside the Demand
and later returned, otherwise the value is discarded.
Auto Trait Implementations§
impl<'a, 'v> RefUnwindSafe for Demand<'a, 'v>
impl<'a, 'v> !Send for Demand<'a, 'v>
impl<'a, 'v> !Sync for Demand<'a, 'v>
impl<'a, 'v> Unpin for Demand<'a, 'v>
impl<'a, 'v> !UnwindSafe for Demand<'a, 'v>
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