pub struct CurrentContext {
pub scope_id: ScopeId,
pub scopes_storages: Rc<RefCell<FxHashMap<ScopeId, ScopeStorage>>>,
pub tasks: Rc<RefCell<FxHashMap<TaskId, Rc<RefCell<Task>>>>>,
pub task_id_counter: Rc<AtomicU64>,
pub sender: UnboundedSender<Message>,
}Fields§
§scope_id: ScopeId§scopes_storages: Rc<RefCell<FxHashMap<ScopeId, ScopeStorage>>>§tasks: Rc<RefCell<FxHashMap<TaskId, Rc<RefCell<Task>>>>>§task_id_counter: Rc<AtomicU64>§sender: UnboundedSender<Message>Implementations§
Source§impl CurrentContext
impl CurrentContext
pub fn run_with_reactive<T>(new_context: Self, run: impl FnOnce() -> T) -> T
pub fn run<T>(new_context: Self, run: impl FnOnce() -> T) -> T
pub fn with<T>(with: impl FnOnce(&CurrentContext) -> T) -> T
pub fn try_with<T>(with: impl FnOnce(&CurrentContext) -> T) -> Option<T>
Auto Trait Implementations§
impl Freeze for CurrentContext
impl !RefUnwindSafe for CurrentContext
impl !Send for CurrentContext
impl !Sync for CurrentContext
impl Unpin for CurrentContext
impl UnsafeUnpin for CurrentContext
impl !UnwindSafe for CurrentContext
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more