pub struct ConstantFactory;Expand description
The constant generator: emits the same configured value for every row.
It is the minimal end-to-end exemplar of the factory/compiled split — a
factory that reads one optional value argument and compiles it into a
[CompiledConstant] that overwrites the output slot with a fixed value.
Trait Implementations§
Source§impl GeneratorFactory for ConstantFactory
impl GeneratorFactory for ConstantFactory
Source§fn descriptor(&self) -> &'static GeneratorDescriptor
fn descriptor(&self) -> &'static GeneratorDescriptor
This generator’s static description.
Source§fn compile(
&self,
config: &GeneratorConfig,
_context: &CompileContext<'_>,
) -> Result<Box<dyn CompiledGenerator>, DiagnosticBag>
fn compile( &self, config: &GeneratorConfig, _context: &CompileContext<'_>, ) -> Result<Box<dyn CompiledGenerator>, DiagnosticBag>
Validate
config and build a runtime generator, or return a
DiagnosticBag describing every problem found.Auto Trait Implementations§
impl Freeze for ConstantFactory
impl RefUnwindSafe for ConstantFactory
impl Send for ConstantFactory
impl Sync for ConstantFactory
impl Unpin for ConstantFactory
impl UnsafeUnpin for ConstantFactory
impl UnwindSafe for ConstantFactory
Blanket Implementations§
impl<T> Allocation for T
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
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