pub struct CliRequest { /* private fields */ }Expand description
Builder for CLI-style PHP requests.
Configure arguments, stdin, environment, and INI overrides.
Implementations§
Source§impl CliRequest
impl CliRequest
pub fn new() -> Self
pub fn with_arg(self, s: impl Into<String>) -> Self
pub fn with_args<I, S>(self, iter: I) -> Self
pub fn with_stdin(self, bytes: impl Into<Vec<u8>>) -> Self
pub fn with_env(self, key: impl Into<String>, value: impl Into<String>) -> Self
pub fn with_envs<I, K, V>(self, iter: I) -> Self
pub fn with_ini(self, key: impl Into<String>, value: impl Into<String>) -> Self
pub fn with_ini_overrides<I, K, V>(self, iter: I) -> Self
pub fn with_working_dir(self, path: impl Into<PathBuf>) -> Self
pub fn build( self, script_path: impl AsRef<Path>, ) -> Result<ExecutionContext, CliRequestError>
Trait Implementations§
Source§impl Clone for CliRequest
impl Clone for CliRequest
Source§fn clone(&self) -> CliRequest
fn clone(&self) -> CliRequest
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 CliRequest
impl Debug for CliRequest
Auto Trait Implementations§
impl Freeze for CliRequest
impl RefUnwindSafe for CliRequest
impl Send for CliRequest
impl Sync for CliRequest
impl Unpin for CliRequest
impl UnwindSafe for CliRequest
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