pub struct StreamingCallback<F> { /* private fields */ }Expand description
Wraps a closure implementation for streaming output. Called at least once during execution.
Implementations§
Trait Implementations§
Source§impl<F> ExecutionHooks for StreamingCallback<F>
impl<F> ExecutionHooks for StreamingCallback<F>
Source§fn on_output(&mut self, data: &[u8]) -> OutputAction
fn on_output(&mut self, data: &[u8]) -> OutputAction
Called when PHP writes to its output buffer.
Source§fn on_context_created(&mut self)
fn on_context_created(&mut self)
Called after server context is created.
fn on_request_starting(&mut self)
fn on_request_started(&mut self)
Source§fn on_script_executing(&mut self, script_path: &Path)
fn on_script_executing(&mut self, script_path: &Path)
Called before script execution begins.
Source§fn on_script_executed(&mut self, success: bool)
fn on_script_executed(&mut self, success: bool)
Called after script execution completes.
Source§fn on_header(&mut self, name: &str, value: &str) -> bool
fn on_header(&mut self, name: &str, value: &str) -> bool
Called for each response header. Return false to suppress the header.
Source§fn on_php_message(&mut self, message: &ExecutionMessage)
fn on_php_message(&mut self, message: &ExecutionMessage)
Called for PHP errors, warnings, and notices.
Source§fn is_connection_alive(&self) -> bool
fn is_connection_alive(&self) -> bool
Return false to abort execution (e.g., client disconnected).
Source§fn on_request_finishing(&mut self)
fn on_request_finishing(&mut self)
Called before php_request_shutdown.
Source§fn on_request_finished(&mut self, result: &ExecutionResult)
fn on_request_finished(&mut self, result: &ExecutionResult)
Called after request completes with the final result.
Auto Trait Implementations§
impl<F> Freeze for StreamingCallback<F>where
F: Freeze,
impl<F> RefUnwindSafe for StreamingCallback<F>where
F: RefUnwindSafe,
impl<F> Send for StreamingCallback<F>where
F: Send,
impl<F> Sync for StreamingCallback<F>where
F: Sync,
impl<F> Unpin for StreamingCallback<F>where
F: Unpin,
impl<F> UnwindSafe for StreamingCallback<F>where
F: UnwindSafe,
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