Struct Builder
pub struct Builder { /* private fields */ }Expand description
A build-script helper for one or more receiver schema sets.
Implementations§
§impl Builder
impl Builder
pub fn new() -> Builder
pub fn set(self, path: impl Into<PathBuf>) -> Builder
pub fn set(self, path: impl Into<PathBuf>) -> Builder
Add a schema set, either a YAML file or a directory of YAML files.
pub fn custom_predictor(
self,
name: impl Into<String>,
path: impl Into<String>,
) -> Builder
pub fn custom_predictor( self, name: impl Into<String>, path: impl Into<String>, ) -> Builder
Register a custom predictor implementation path for code generation.
pub fn check(&self) -> Result<(), BuildError>
pub fn check(&self) -> Result<(), BuildError>
Run the same collision checks as predsync schema_check.
pub 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.
pub 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