pub enum OpeningSpec {
Named(String),
Declared(DeclaredOpening),
}Expand description
A portal’s opening: a named standard, or a size the seam declares.
Variants§
Named(String)
A named standard from the metrics table’s opening set.
Declared(DeclaredOpening)
A size the seam declares itself.
Implementations§
Source§impl OpeningSpec
impl OpeningSpec
Sourcepub fn resolve(
&self,
table: &Metrics,
reads: &mut Reads,
) -> Result<Opening, UnknownMetric>
pub fn resolve( &self, table: &Metrics, reads: &mut Reads, ) -> Result<Opening, UnknownMetric>
The opening’s size: the named standard’s, through Metrics::resolve
(the one path from a name to an entry), or the declared one.
§Errors
crate::metrics::UnknownMetric for a name the table does not define,
which the caller turns into DW0812.
Trait Implementations§
Source§impl Clone for OpeningSpec
impl Clone for OpeningSpec
Source§impl Debug for OpeningSpec
impl Debug for OpeningSpec
Source§impl<'de> Deserialize<'de> for OpeningSpec
impl<'de> Deserialize<'de> for OpeningSpec
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 OpeningSpec
Source§impl JsonSchema for OpeningSpec
impl JsonSchema for OpeningSpec
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for OpeningSpec
impl PartialEq for OpeningSpec
Source§impl Serialize for OpeningSpec
impl Serialize for OpeningSpec
impl StructuralPartialEq for OpeningSpec
Auto Trait Implementations§
impl Freeze for OpeningSpec
impl RefUnwindSafe for OpeningSpec
impl Send for OpeningSpec
impl Sync for OpeningSpec
impl Unpin for OpeningSpec
impl UnsafeUnpin for OpeningSpec
impl UnwindSafe for OpeningSpec
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