pub struct ModelCompiler { /* private fields */ }Expand description
Compiles a SyntheticModel into a GenerationPlan.
Holds the ExtensionRegistry used to resolve column generators and
planners while compiling structure, counts, ownership, and dependencies.
Implementations§
Source§impl ModelCompiler
impl ModelCompiler
Sourcepub fn new(registry: ExtensionRegistry) -> Self
pub fn new(registry: ExtensionRegistry) -> Self
A compiler backed by an explicit registry.
Sourcepub fn standard() -> Self
pub fn standard() -> Self
A compiler backed by ExtensionRegistry::standard.
Sourcepub fn registry(&self) -> &ExtensionRegistry
pub fn registry(&self) -> &ExtensionRegistry
The registry this compiler resolves operators against.
Sourcepub fn compile(
&self,
model: SyntheticModel,
options: CompileOptions,
) -> Result<GenerationPlan, DiagnosticBag>
pub fn compile( &self, model: SyntheticModel, options: CompileOptions, ) -> Result<GenerationPlan, DiagnosticBag>
Compile model under options, gathering every independent error
before returning Err. On success, warnings survive in
GenerationPlan::diagnostics.
Auto Trait Implementations§
impl !RefUnwindSafe for ModelCompiler
impl !UnwindSafe for ModelCompiler
impl Freeze for ModelCompiler
impl Send for ModelCompiler
impl Sync for ModelCompiler
impl Unpin for ModelCompiler
impl UnsafeUnpin for ModelCompiler
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more