pub struct IslValidValuesConstraint { /* private fields */ }Expand description
Represents the valid_values constraint
Implementations§
Source§impl IslValidValuesConstraint
impl IslValidValuesConstraint
Sourcepub fn new(valid_values: Vec<ValidValue>) -> IonSchemaResult<Self>
pub fn new(valid_values: Vec<ValidValue>) -> IonSchemaResult<Self>
Provides a way to programmatically construct valid_values constraint
pub fn values(&self) -> &Vec<ValidValue>
pub fn from_ion_element( value: &Element, isl_version: IslVersion, ) -> IonSchemaResult<Self>
Trait Implementations§
Source§impl Clone for IslValidValuesConstraint
impl Clone for IslValidValuesConstraint
Source§fn clone(&self) -> IslValidValuesConstraint
fn clone(&self) -> IslValidValuesConstraint
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for IslValidValuesConstraint
impl Debug for IslValidValuesConstraint
Source§impl PartialEq for IslValidValuesConstraint
impl PartialEq for IslValidValuesConstraint
Source§impl WriteAsIon for IslValidValuesConstraint
impl WriteAsIon for IslValidValuesConstraint
Source§fn write_as_ion<V: ValueWriter>(&self, writer: V) -> IonResult<()>
fn write_as_ion<V: ValueWriter>(&self, writer: V) -> IonResult<()>
Maps this value to the Ion data model using the provided
ValueWriter implementation.Source§fn encode_as<E, C>(
&self,
config: C,
) -> Result<<E as Encoding>::Output, IonError>
fn encode_as<E, C>( &self, config: C, ) -> Result<<E as Encoding>::Output, IonError>
Encodes this value as an Ion stream with
self as the single top-level value.
If the requested encoding is binary of any version, returns a Vec<u8> containing the
encoded bytes. If the requested encoding is text of any version, returns a String instead. Read moreimpl StructuralPartialEq for IslValidValuesConstraint
Auto Trait Implementations§
impl Freeze for IslValidValuesConstraint
impl RefUnwindSafe for IslValidValuesConstraint
impl Send for IslValidValuesConstraint
impl Sync for IslValidValuesConstraint
impl Unpin for IslValidValuesConstraint
impl UnwindSafe for IslValidValuesConstraint
Blanket Implementations§
Source§impl<T> Annotatable for Twhere
T: WriteAsIon + ?Sized,
impl<T> Annotatable for Twhere
T: WriteAsIon + ?Sized,
Source§fn annotated_with<'a, A>(&'a self, annotations: A) -> Annotated<'a, T, A>where
A: 'a,
&'a A: AnnotationSeq<'a>,
fn annotated_with<'a, A>(&'a self, annotations: A) -> Annotated<'a, T, A>where
A: 'a,
&'a A: AnnotationSeq<'a>,
Pairs a reference to the provided value with a slice containing annotations. Read more
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