pub struct Located { /* private fields */ }Expand description
A name behind the path of the instance it is in: a target of a part
placed in the part — however deep — or of the part itself, its path
empty. Spelled /asm/bolt:model, and /:model for the part itself
(Located::parse, its Display), and saved and sent to a front end
so.
The tables of one part — its state, its inputs — name what is its own
bare, b.pose, and what is of a part placed in it located,
/bolt:b.pose (Located::key, key_behind).
Implementations§
Source§impl Located
impl Located
Sourcepub fn in_instance(path: impl Into<String>, name: impl Into<String>) -> Self
pub fn in_instance(path: impl Into<String>, name: impl Into<String>) -> Self
The name name of the instance at path: asm/bolt, empty for the
part itself.
Sourcepub fn path(&self) -> &str
pub fn path(&self) -> &str
The path of the instance it is in, without the leading separator:
asm/bolt, empty for the part itself.
Sourcepub fn behind(&self, instance: &str) -> Self
pub fn behind(&self, instance: &str) -> Self
The same name of the instance instance of the part — of the
instance at that path, if it is already of one: what a name of a
placed part is, read from the part it is placed in.
Sourcepub fn parse(text: &str) -> GeopResult<Self>
pub fn parse(text: &str) -> GeopResult<Self>
The name text spells: /asm/bolt:model, or /:model for the
part itself. Anything else is an error, a bare model too: a name
that does not say where it is would be read in the wrong part.
Sourcepub fn key(&self) -> String
pub fn key(&self) -> String
It as a key of a part’s own table: its bare name for one of the part itself, else as it is spelled.
Sourcepub fn of_key(key: &str) -> GeopResult<Self>
pub fn of_key(key: &str) -> GeopResult<Self>
The name a key of a part’s own table names (Located::key).