pub struct RenderContext {
pub mode: RenderMode,
/* private fields */
}Expand description
Per-render reactive bookkeeping.
Fields§
§mode: RenderModeImplementations§
Source§impl RenderContext
impl RenderContext
pub fn new(mode: RenderMode) -> Rc<Self>
pub fn next_signal_id(&self) -> SignalId
pub fn next_effect_id(&self) -> u32
pub fn current_effect_id(&self) -> Option<u32>
pub fn set_current_effect(&self, id: Option<EffectId>)
pub fn register_signal(&self, id: SignalId, value: Value)
pub fn update_signal(&self, id: SignalId, value: Value)
pub fn register_effect<F: FnMut() + 'static>(&self, id: EffectId, f: F)
pub fn run_effect(&self, id: u32)
pub fn register_handler(&self, chunk: &str, symbol: &str, source: &str)
pub fn register_island(&self, chunk_id: &str)
pub fn register_action(&self, name: &str)
pub fn register_context(&self, id: TypeId, value: Value)
pub fn get_context(&self, id: TypeId) -> Option<Value>
pub fn register_visible_task(&self, source: &str) -> u32
Sourcepub fn snapshot(&self) -> ResumePayload
pub fn snapshot(&self) -> ResumePayload
Snapshot the entire reactive state as JSON ready to embed in HTML.
Auto Trait Implementations§
impl !Freeze for RenderContext
impl !RefUnwindSafe for RenderContext
impl !Send for RenderContext
impl !Sync for RenderContext
impl Unpin for RenderContext
impl UnsafeUnpin for RenderContext
impl !UnwindSafe for RenderContext
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