pub struct RiphtSapi { /* private fields */ }Expand description
PHP SAPI instance. Initialize once, execute scripts repeatedly.
Implementations§
Source§impl RiphtSapi
impl RiphtSapi
pub fn instance() -> Self
Sourcepub fn shutdown()
pub fn shutdown()
Shuts down the PHP engine. Calling execute() after this is undefined behavior.
pub fn set_ini( &self, key: impl Into<Vec<u8>>, value: impl Into<Vec<u8>>, ) -> Result<(), SapiError>
pub fn get_ini(&self, key: &str) -> Option<String>
pub fn executor(&self) -> Result<Executor<'_>, SapiError>
pub fn execute( &self, ctx: ExecutionContext, ) -> Result<ExecutionResult, ExecutionError>
pub fn execute_streaming<F>( &self, ctx: ExecutionContext, on_output: F, ) -> Result<ExecutionResult, ExecutionError>
pub fn execute_with_hooks<H: ExecutionHooks + 'static>( &self, ctx: ExecutionContext, hooks: H, ) -> Result<ExecutionResult, ExecutionError>
pub fn is_initialized(&self) -> bool
Auto Trait Implementations§
impl Freeze for RiphtSapi
impl RefUnwindSafe for RiphtSapi
impl !Send for RiphtSapi
impl !Sync for RiphtSapi
impl Unpin for RiphtSapi
impl UnwindSafe for RiphtSapi
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