#[non_exhaustive]pub enum ValueSource {
Sync(Arc<dyn Fn(&Exchange) -> Value + Send + Sync>),
Async(Arc<dyn Fn(&Exchange) -> BoxValueFuture + Send + Sync>),
}Expand description
Fallible value source for dynamic setters and log messages.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Sync(Arc<dyn Fn(&Exchange) -> Value + Send + Sync>)
Programmatic synchronous closure producing a Value.
Async(Arc<dyn Fn(&Exchange) -> BoxValueFuture + Send + Sync>)
Language-backed asynchronous expression.
Implementations§
Source§impl ValueSource
impl ValueSource
Trait Implementations§
Source§impl Clone for ValueSource
impl Clone for ValueSource
Auto Trait Implementations§
impl !RefUnwindSafe for ValueSource
impl !UnwindSafe for ValueSource
impl Freeze for ValueSource
impl Send for ValueSource
impl Sync for ValueSource
impl Unpin for ValueSource
impl UnsafeUnpin for ValueSource
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