pub struct StreamingContext { /* private fields */ }
Expand description
The context dioxus fullstack provides for the status of streaming responses on the server
Implementations§
Source§impl StreamingContext
impl StreamingContext
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new streaming context. You should not need to call this directly. Dioxus fullstack will provide this context for you.
Sourcepub fn commit_initial_chunk(&mut self)
pub fn commit_initial_chunk(&mut self)
Commit the initial chunk of the response. This will be called automatically if you are using the dioxus router when the suspense boundary above the router is resolved. Otherwise, you will need to call this manually to start the streaming part of the response.
Once this method has been called, the http response parts can no longer be modified.
Sourcepub fn current_status(&self) -> StreamingStatus
pub fn current_status(&self) -> StreamingStatus
Get the current status of the streaming response. This method is reactive and will cause the current reactive context to rerun when the status changes.
Trait Implementations§
Source§impl Clone for StreamingContext
impl Clone for StreamingContext
Source§fn clone(&self) -> StreamingContext
fn clone(&self) -> StreamingContext
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for StreamingContext
impl Debug for StreamingContext
Source§impl Default for StreamingContext
impl Default for StreamingContext
Source§impl PartialEq for StreamingContext
impl PartialEq for StreamingContext
impl Copy for StreamingContext
impl StructuralPartialEq for StreamingContext
Auto Trait Implementations§
impl Freeze for StreamingContext
impl !RefUnwindSafe for StreamingContext
impl !Send for StreamingContext
impl !Sync for StreamingContext
impl Unpin for StreamingContext
impl !UnwindSafe for StreamingContext
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> InitializeFromFunction<T> for T
impl<T> InitializeFromFunction<T> for T
Source§fn initialize_from_function(f: fn() -> T) -> T
fn initialize_from_function(f: fn() -> T) -> T
Create an instance of this type from an initialization function
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<Ret> SpawnIfAsync<(), Ret> for Ret
impl<Ret> SpawnIfAsync<(), Ret> for Ret
Source§impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
Source§fn super_from(input: T) -> O
fn super_from(input: T) -> O
Convert from a type to another type.
Source§impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
Source§fn super_into(self) -> O
fn super_into(self) -> O
Convert from a type to another type.