pub struct OutputFieldRule { /* private fields */ }Expand description
Validation rules for one named field in a structured output object.
Implementations§
Source§impl OutputFieldRule
impl OutputFieldRule
pub fn new( required: bool, allowed_string_values: impl IntoIterator<Item = impl Into<String>>, ) -> Result<Self, DomainError>
pub const fn required(&self) -> bool
pub fn allowed_string_values(&self) -> &BTreeSet<String>
Trait Implementations§
Source§impl Clone for OutputFieldRule
impl Clone for OutputFieldRule
Source§impl Debug for OutputFieldRule
impl Debug for OutputFieldRule
Source§impl Default for OutputFieldRule
impl Default for OutputFieldRule
Source§impl<'de> Deserialize<'de> for OutputFieldRule
impl<'de> Deserialize<'de> for OutputFieldRule
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for OutputFieldRule
Source§impl PartialEq for OutputFieldRule
impl PartialEq for OutputFieldRule
Source§impl Serialize for OutputFieldRule
impl Serialize for OutputFieldRule
impl StructuralPartialEq for OutputFieldRule
Auto Trait Implementations§
impl Freeze for OutputFieldRule
impl RefUnwindSafe for OutputFieldRule
impl Send for OutputFieldRule
impl Sync for OutputFieldRule
impl Unpin for OutputFieldRule
impl UnsafeUnpin for OutputFieldRule
impl UnwindSafe for OutputFieldRule
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