pub struct Builder { /* private fields */ }Expand description
A build-script helper for one or more receiver schema sets.
Implementations§
Source§impl Builder
impl Builder
pub fn new() -> Self
Sourcepub fn set(self, path: impl Into<PathBuf>) -> Self
pub fn set(self, path: impl Into<PathBuf>) -> Self
Add a schema set, either a YAML file or a directory of YAML files.
Sourcepub fn custom_predictor(
self,
name: impl Into<String>,
path: impl Into<String>,
) -> Self
pub fn custom_predictor( self, name: impl Into<String>, path: impl Into<String>, ) -> Self
Register a custom predictor implementation path for code generation.
Sourcepub fn check(&self) -> Result<(), BuildError>
pub fn check(&self) -> Result<(), BuildError>
Run the same collision checks as predsync schema_check.
Sourcepub fn generate(&self, file_name: impl AsRef<Path>) -> Result<(), BuildError>
pub fn generate(&self, file_name: impl AsRef<Path>) -> Result<(), BuildError>
Generate file_name inside Cargo’s OUT_DIR and emit rerun directives.
Sourcepub fn generate_to(&self, output: impl AsRef<Path>) -> Result<(), BuildError>
pub fn generate_to(&self, output: impl AsRef<Path>) -> Result<(), BuildError>
Generate one source file at an explicit path.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Builder
impl RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl UnsafeUnpin 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