Struct pavex_cli_client::client::Client
source · pub struct Client { /* private fields */ }
Expand description
A fluent API for configuring and executing pavex
’s CLI commands.
Implementations§
source§impl Client
impl Client
sourcepub fn generate(
self,
blueprint: Blueprint,
output_directory: PathBuf,
) -> GenerateBuilder
pub fn generate( self, blueprint: Blueprint, output_directory: PathBuf, ) -> GenerateBuilder
Start building the configuration for the code-generator.
You must specify:
- The
Blueprint
for the application that you want to generate; - The directory where the generated code should be written.
source§impl Client
impl Client
Setters for optional configuration knobs on Client
.
sourcepub fn pavex_cli_path(self, path: PathBuf) -> Self
pub fn pavex_cli_path(self, path: PathBuf) -> Self
Set the path to the pavex
executable.
If this is not set, we will assume that pavex
is in the PATH
.
sourcepub fn color(self, color: Color) -> Self
pub fn color(self, color: Color) -> Self
Set whether to use colors in the output of Pavex’s code generator.
If this is not set, Pavex will automatically determine whether to use colors or not.
sourcepub fn debug(self) -> Self
pub fn debug(self) -> Self
Enable debug mode.
This will print additional debug information when running pavex
commands.
sourcepub fn no_debug(self) -> Self
pub fn no_debug(self) -> Self
Disable debug mode.
pavex
will not print additional debug information when running commands.
This is the default behaviour.
sourcepub fn new_command(self, path: PathBuf) -> NewBuilder
pub fn new_command(self, path: PathBuf) -> NewBuilder
Start building the configuration for the new
command.
You must specify the path where the new project should be created.
sourcepub fn no_log(self) -> Self
pub fn no_log(self) -> Self
Disable logging.
pavex
will not emit internal log messages to the console.
This is the default behaviour.
sourcepub fn log_filter(self, filter: String) -> Self
pub fn log_filter(self, filter: String) -> Self
Set the log filter.
Control which logs are emitted if --log
or --perf-profile
are enabled.
If no filter is specified, Pavex will default to info,pavex=trace
.
sourcepub fn perf_profile(self) -> Self
pub fn perf_profile(self) -> Self
Enable performance profiling.
pavex
will serialize to disk tracing information to profile command execution.
sourcepub fn no_perf_profile(self) -> Self
pub fn no_perf_profile(self) -> Self
Disable performance profiling.
pavex
will not serialize to disk tracing information to profile command execution.
This is the default behaviour.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
impl RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl UnwindSafe for Client
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)