pub struct IslType { /* private fields */ }Expand description
Represents both named and anonymous IslTypes and can be converted to a resolved type definition
Named ISL type grammar: type:: { name: <NAME>, <CONSTRAINT>...}
Anonymous ISL type grammar: { <CONSTRAINT>... }
Implementations§
Source§impl IslType
impl IslType
pub fn name(&self) -> Option<&str>
pub fn constraints(&self) -> &[IslConstraint]
pub fn open_content(&self) -> Vec<(String, Element)>
Trait Implementations§
Source§impl From<IslType> for SchemaContent
impl From<IslType> for SchemaContent
Source§impl WriteAsIon for IslType
impl WriteAsIon for IslType
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 moreAuto Trait Implementations§
impl Freeze for IslType
impl RefUnwindSafe for IslType
impl Send for IslType
impl Sync for IslType
impl Unpin for IslType
impl UnsafeUnpin for IslType
impl UnwindSafe for IslType
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