pub struct NoopExecutor;Expand description
An Executor that has no PHP runtime behind it.
Installed in the master process’s PluginContext
(phase 79): the master supervises and owns shared state but never executes
PHP. A MasterOnly plugin should never call its executor; if it does, every
method logs an error and returns Err rather than silently doing nothing —
surfacing the misuse (a plugin dispatching PHP while placed in the master)
loudly but without crashing the supervisor.
Trait Implementations§
Source§impl Clone for NoopExecutor
impl Clone for NoopExecutor
Source§fn clone(&self) -> NoopExecutor
fn clone(&self) -> NoopExecutor
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for NoopExecutor
Source§impl Debug for NoopExecutor
impl Debug for NoopExecutor
Source§impl Default for NoopExecutor
impl Default for NoopExecutor
Source§fn default() -> NoopExecutor
fn default() -> NoopExecutor
Returns the “default value” for a type. Read more
Source§impl Executor for NoopExecutor
impl Executor for NoopExecutor
Source§fn execute_method<'life0, 'life1, 'async_trait>(
&'life0 self,
_method: &'life1 str,
_payload: Bytes,
) -> Pin<Box<dyn Future<Output = Result<Bytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn execute_method<'life0, 'life1, 'async_trait>(
&'life0 self,
_method: &'life1 str,
_payload: Bytes,
) -> Pin<Box<dyn Future<Output = Result<Bytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Send
payload to a worker using a specific RPC method name.Source§fn execute<'life0, 'async_trait>(
&'life0 self,
payload: Bytes,
) -> Pin<Box<dyn Future<Output = Result<Bytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn execute<'life0, 'async_trait>(
&'life0 self,
payload: Bytes,
) -> Pin<Box<dyn Future<Output = Result<Bytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Send
payload to a worker and return the response bytes.
Uses the RPC method name “dispatch” by default.Source§fn execute_value<'life0, 'life1, 'async_trait>(
&'life0 self,
method: &'life1 str,
payload: Value,
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn execute_value<'life0, 'life1, 'async_trait>(
&'life0 self,
method: &'life1 str,
payload: Value,
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Send structured data directly (no serialization). Read more
Source§fn execute_value_traced<'life0, 'life1, 'async_trait>(
&'life0 self,
method: &'life1 str,
payload: Value,
) -> Pin<Box<dyn Future<Output = Result<(Value, Arc<str>)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn execute_value_traced<'life0, 'life1, 'async_trait>(
&'life0 self,
method: &'life1 str,
payload: Value,
) -> Pin<Box<dyn Future<Output = Result<(Value, Arc<str>)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Like
Self::execute_value, but also returns the request_id under which the
request was executed — the same id exposed to PHP via folk_request_id(). Read moreSource§fn execute_streamed<'life0, 'life1, 'async_trait>(
&'life0 self,
method: &'life1 str,
payload: Value,
) -> Pin<Box<dyn Future<Output = Result<(Receiver<ResponseChunk>, Arc<str>)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn execute_streamed<'life0, 'life1, 'async_trait>(
&'life0 self,
method: &'life1 str,
payload: Value,
) -> Pin<Box<dyn Future<Output = Result<(Receiver<ResponseChunk>, Arc<str>)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Send a request and receive the response as a stream of
ResponseChunks. Read moreSource§fn execute_streamed_with_body<'life0, 'life1, 'async_trait>(
&'life0 self,
method: &'life1 str,
payload: Value,
body_rx: Receiver<Bytes>,
) -> Pin<Box<dyn Future<Output = Result<(Receiver<ResponseChunk>, Arc<str>)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn execute_streamed_with_body<'life0, 'life1, 'async_trait>(
&'life0 self,
method: &'life1 str,
payload: Value,
body_rx: Receiver<Bytes>,
) -> Pin<Box<dyn Future<Output = Result<(Receiver<ResponseChunk>, Arc<str>)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Like
Self::execute_streamed, but the request body is delivered to PHP as a
stream of Bytes chunks rather than embedded in payload. Read moreSource§fn execute_streamed_with_parts<'life0, 'life1, 'async_trait>(
&'life0 self,
method: &'life1 str,
payload: Value,
parts_rx: Receiver<RequestPart>,
) -> Pin<Box<dyn Future<Output = Result<(Receiver<ResponseChunk>, Arc<str>)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn execute_streamed_with_parts<'life0, 'life1, 'async_trait>(
&'life0 self,
method: &'life1 str,
payload: Value,
parts_rx: Receiver<RequestPart>,
) -> Pin<Box<dyn Future<Output = Result<(Receiver<ResponseChunk>, Arc<str>)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Like
execute_streamed_with_body, but the request body is a parsed
multipart/form-data stream rather than opaque bytes. Read moreAuto Trait Implementations§
impl Freeze for NoopExecutor
impl RefUnwindSafe for NoopExecutor
impl Send for NoopExecutor
impl Sync for NoopExecutor
impl Unpin for NoopExecutor
impl UnsafeUnpin for NoopExecutor
impl UnwindSafe for NoopExecutor
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