pub struct ReferenceInfo {
pub type_: Ident,
pub min_occurs: MinOccurs,
pub max_occurs: MaxOccurs,
}Expand description
Type information that defines a reference to another type.
Fields§
§type_: IdentType that is referenced.
min_occurs: MinOccursMinimum occurrence of the referenced type.
max_occurs: MaxOccursMaximum occurrence of the referenced type.
Implementations§
Source§impl ReferenceInfo
impl ReferenceInfo
Sourcepub fn new<T>(type_: T) -> Self
pub fn new<T>(type_: T) -> Self
Create a new ReferenceInfo instance from the passed type_.
Sourcepub fn is_single(&self) -> bool
pub fn is_single(&self) -> bool
Returns true if this is a reference references a single type, false otherwise.
This means that it is more or less just a type definition or renaming of an existing type.
Sourcepub fn min_occurs(self, min: MinOccurs) -> Self
pub fn min_occurs(self, min: MinOccurs) -> Self
Sets the minimum occurrence of the referenced type.
Sourcepub fn max_occurs(self, max: MaxOccurs) -> Self
pub fn max_occurs(self, max: MaxOccurs) -> Self
Sets the maximum occurrence of the referenced type.
Trait Implementations§
Source§impl Clone for ReferenceInfo
impl Clone for ReferenceInfo
Source§fn clone(&self) -> ReferenceInfo
fn clone(&self) -> ReferenceInfo
Returns a copy 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 ReferenceInfo
impl Debug for ReferenceInfo
Source§impl From<ReferenceInfo> for Type
impl From<ReferenceInfo> for Type
Source§fn from(value: ReferenceInfo) -> Self
fn from(value: ReferenceInfo) -> Self
Converts to this type from the input type.
Source§impl TypeEq for ReferenceInfo
impl TypeEq for ReferenceInfo
Source§fn type_eq(&self, other: &Self, types: &Types) -> bool
fn type_eq(&self, other: &Self, types: &Types) -> bool
Check if this instance is equal to the
other instance using the passed
types to resolve identifiers.Source§fn type_eq_iter<'a, X, Y>(x: X, y: Y, types: &Types) -> boolwhere
Self: 'a,
X: IntoIterator<Item = &'a Self>,
Y: IntoIterator<Item = &'a Self>,
fn type_eq_iter<'a, X, Y>(x: X, y: Y, types: &Types) -> boolwhere
Self: 'a,
X: IntoIterator<Item = &'a Self>,
Y: IntoIterator<Item = &'a Self>,
Check if the two passed iterators contain type equal elements.
Auto Trait Implementations§
impl Freeze for ReferenceInfo
impl RefUnwindSafe for ReferenceInfo
impl Send for ReferenceInfo
impl Sync for ReferenceInfo
impl Unpin for ReferenceInfo
impl UnwindSafe for ReferenceInfo
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