pub struct TimedGateId(pub String);Expand description
Timed-gate id: timed-gate/<kebab> (stage-5 timed_gates section,
spec-0016 §4). Unique within the stage-5 timed-gate namespace.
Tuple Fields§
§0: StringImplementations§
Source§impl TimedGateId
impl TimedGateId
Sourcepub fn is_valid_syntax(&self) -> bool
pub fn is_valid_syntax(&self) -> bool
True if the id is well-formed: <prefix>/<kebab>.
Sourcepub fn syntax_form(&self) -> String
pub fn syntax_form(&self) -> String
The form THIS id has to take, for the diagnostic that rejected
one — `npc/<kebab>`, `dlg/<kebab>`, and so on.
A refusal that says only “ids must be lowercase kebab-case with
their type prefix” and then lists three examples of other types
has told the author the general rule and withheld the one fact
they were missing: which prefix THIS field takes. The prefix is
a property of the id type, so the answer is derived from the
type at every site rather than hand-written per site — the
per-section refusals that already name their own prefix
(wave/, trap/, loot/, …) are that fact copied by hand,
which is exactly why the general path never had it.
Trait Implementations§
Source§impl Clone for TimedGateId
impl Clone for TimedGateId
Source§fn clone(&self) -> TimedGateId
fn clone(&self) -> TimedGateId
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TimedGateId
impl Debug for TimedGateId
Source§impl<'de> Deserialize<'de> for TimedGateId
impl<'de> Deserialize<'de> for TimedGateId
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>,
Source§impl Display for TimedGateId
impl Display for TimedGateId
impl Eq for TimedGateId
Source§impl Hash for TimedGateId
impl Hash for TimedGateId
Source§impl JsonSchema for TimedGateId
impl JsonSchema for TimedGateId
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more