pub struct Builder { /* private fields */ }
Expand description
A simple struct used to build DTrace probes into Rust code in a build.rs script.
Implementations§
source§impl Builder
impl Builder
sourcepub fn new<P: AsRef<Path>>(file: P) -> Self
pub fn new<P: AsRef<Path>>(file: P) -> Self
Construct a new builder from a path to a D provider definition file.
sourcepub fn out_file<P: AsRef<Path>>(self, file: P) -> Self
pub fn out_file<P: AsRef<Path>>(self, file: P) -> Self
Set the output filename of the generated Rust code. The default has the same stem as the
provider file, with the ".rs"
extension.
sourcepub fn probe_format(self, format: &str) -> Self
pub fn probe_format(self, format: &str) -> Self
Set the format for the name of generated probe macros.
The provided format may include the tokens {provider}
and {probe}
, which will be
substituted with the names of the provider and probe. The default is "{probe}"
.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl UnwindSafe for Builder
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