pub struct TemplateBuilder { /* private fields */ }Expand description
Template builder for fluent API
Implementations§
Source§impl TemplateBuilder
impl TemplateBuilder
Sourcepub fn string_field(self, name: impl Into<String>) -> Self
pub fn string_field(self, name: impl Into<String>) -> Self
Add a string field
Sourcepub fn required_string(self, name: impl Into<String>) -> Self
pub fn required_string(self, name: impl Into<String>) -> Self
Add a required string field
Sourcepub fn integer_field(self, name: impl Into<String>) -> Self
pub fn integer_field(self, name: impl Into<String>) -> Self
Add an integer field
Sourcepub fn float_field(self, name: impl Into<String>) -> Self
pub fn float_field(self, name: impl Into<String>) -> Self
Add a float field
Sourcepub fn boolean_field(self, name: impl Into<String>) -> Self
pub fn boolean_field(self, name: impl Into<String>) -> Self
Add a boolean field
Sourcepub fn field_with_default(
self,
name: impl Into<String>,
field_type: FieldType,
default: FactValue,
) -> Self
pub fn field_with_default( self, name: impl Into<String>, field_type: FieldType, default: FactValue, ) -> Self
Add a field with custom default
Sourcepub fn array_field(
self,
name: impl Into<String>,
element_type: FieldType,
) -> Self
pub fn array_field( self, name: impl Into<String>, element_type: FieldType, ) -> Self
Add an array field
Auto Trait Implementations§
impl Freeze for TemplateBuilder
impl RefUnwindSafe for TemplateBuilder
impl Send for TemplateBuilder
impl Sync for TemplateBuilder
impl Unpin for TemplateBuilder
impl UnwindSafe for TemplateBuilder
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