pub struct RawDefinition {
pub versions: BTreeSet<Version>,
pub version_ranges: Vec<VersionRange>,
pub layouts: BTreeSet<Layout>,
pub entries: Vec<RawEntry>,
}Expand description
Definition for specific set of versions.
Use Definition for a more cohesive API that removes some tedium.
Fields§
§versions: BTreeSet<Version>Specific valid versions.
version_ranges: Vec<VersionRange>Valid version ranges.
layouts: BTreeSet<Layout>Valid layouts.
entries: Vec<RawEntry>Entries in the definition.
Implementations§
Source§impl RawDefinition
impl RawDefinition
Sourcepub fn new(
versions: BTreeSet<Version>,
version_ranges: Vec<VersionRange>,
layouts: BTreeSet<Layout>,
entries: Vec<RawEntry>,
) -> Self
pub fn new( versions: BTreeSet<Version>, version_ranges: Vec<VersionRange>, layouts: BTreeSet<Layout>, entries: Vec<RawEntry>, ) -> Self
Constructor for definition.
Sourcepub fn to_definition(
&self,
columns: &HashMap<String, RawColumn>,
) -> Result<Definition, ConversionError>
pub fn to_definition( &self, columns: &HashMap<String, RawColumn>, ) -> Result<Definition, ConversionError>
Convert to a Definition.
This is far more ergonomic API for using the definitions.
§Errors
Errors if the file does not uphold the invariants described in ConversionError.
Trait Implementations§
Source§impl Clone for RawDefinition
impl Clone for RawDefinition
Source§fn clone(&self) -> RawDefinition
fn clone(&self) -> RawDefinition
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 RawDefinition
impl Debug for RawDefinition
Source§impl Default for RawDefinition
impl Default for RawDefinition
Source§fn default() -> RawDefinition
fn default() -> RawDefinition
Returns the “default value” for a type. Read more
Source§impl Hash for RawDefinition
impl Hash for RawDefinition
Source§impl Ord for RawDefinition
impl Ord for RawDefinition
Source§fn cmp(&self, other: &RawDefinition) -> Ordering
fn cmp(&self, other: &RawDefinition) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for RawDefinition
impl PartialEq for RawDefinition
Source§impl PartialOrd for RawDefinition
impl PartialOrd for RawDefinition
impl Eq for RawDefinition
impl StructuralPartialEq for RawDefinition
Auto Trait Implementations§
impl Freeze for RawDefinition
impl RefUnwindSafe for RawDefinition
impl Send for RawDefinition
impl Sync for RawDefinition
impl Unpin for RawDefinition
impl UnwindSafe for RawDefinition
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