pub struct TestAttributeBuilder { /* private fields */ }Expand description
Builder for constructing test IacAttribute values with sensible defaults.
Implementations§
Source§impl TestAttributeBuilder
impl TestAttributeBuilder
Sourcepub fn new(name: &str, iac_type: IacType) -> Self
pub fn new(name: &str, iac_type: IacType) -> Self
Create a new builder with the given name and type. All flags default to false.
Sourcepub fn json_encoded(self) -> Self
pub fn json_encoded(self) -> Self
Mark the attribute as carrying JSON-encoded string content.
Sourcepub fn description(self, desc: &str) -> Self
pub fn description(self, desc: &str) -> Self
Set the attribute description.
Sourcepub fn default_value(self, val: Value) -> Self
pub fn default_value(self, val: Value) -> Self
Set a default value.
Sourcepub fn enum_values(self, values: Vec<String>) -> Self
pub fn enum_values(self, values: Vec<String>) -> Self
Set enum constraint values.
Sourcepub fn update_only(self) -> Self
pub fn update_only(self) -> Self
Mark the attribute as update-only.
Sourcepub fn build(self) -> IacAttribute
pub fn build(self) -> IacAttribute
Build the IacAttribute.
Auto Trait Implementations§
impl Freeze for TestAttributeBuilder
impl RefUnwindSafe for TestAttributeBuilder
impl Send for TestAttributeBuilder
impl Sync for TestAttributeBuilder
impl Unpin for TestAttributeBuilder
impl UnsafeUnpin for TestAttributeBuilder
impl UnwindSafe for TestAttributeBuilder
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