pub trait Bindings {
// Required method
fn binding(
&self,
fn_name: &str,
asof: &str,
) -> Result<Option<Arc<Bound>>, ErrorCode>;
// Provided methods
fn cached(&self, fn_hash: &str, rest: &str) -> Option<Arc<Target>> { ... }
fn remember(&self, rest: &str, target: &Arc<Target>) { ... }
fn pinned(&self, fn_hash: &str) -> Result<Option<Arc<Bound>>, ErrorCode> { ... }
fn alias(&self, alias: &str) -> Option<String> { ... }
fn class(
&self,
name: &str,
asof: &str,
) -> Result<Option<Arc<BoundClass>>, ErrorCode> { ... }
fn aliases_tx(&self) -> Option<String> { ... }
fn lookup(
&self,
class: &str,
label: &str,
asof: &str,
) -> Result<Option<String>, ErrorCode> { ... }
fn class_name_of(
&self,
class_hash: &str,
asof: &str,
) -> Result<Option<String>, ErrorCode> { ... }
fn class_by_hash(
&self,
class_hash: &str,
) -> Result<Option<ClassDescriptor>, ErrorCode> { ... }
fn chain(
&self,
cell: &CellRef,
asof: &str,
) -> Result<Option<String>, ErrorCode> { ... }
}Expand description
Where names are looked up: the mesh’s store (and, for names under other hosts, the cross-mesh resolver in front of it).
Required Methods§
Provided Methods§
Sourcefn cached(&self, fn_hash: &str, rest: &str) -> Option<Arc<Target>>
fn cached(&self, fn_hash: &str, rest: &str) -> Option<Arc<Target>>
A target resolved before for the cell URI rest rest under function hash fn_hash
(parsing depends on nothing else). Provided: none.
Sourcefn remember(&self, rest: &str, target: &Arc<Target>)
fn remember(&self, rest: &str, target: &Arc<Target>)
Remembers a resolved target for Bindings::cached. Provided: nothing.
Sourcefn pinned(&self, fn_hash: &str) -> Result<Option<Arc<Bound>>, ErrorCode>
fn pinned(&self, fn_hash: &str) -> Result<Option<Arc<Bound>>, ErrorCode>
The descriptor whose function hash is fn_hash (a pin, spec-0.4.2), as a binding of
no time (since empty); Ok(None) when the mesh has none. Provided: none.
Sourcefn alias(&self, alias: &str) -> Option<String>
fn alias(&self, alias: &str) -> Option<String>
The fully qualified name an alias (without @) stands for. Provided: none.
Sourcefn class(
&self,
name: &str,
asof: &str,
) -> Result<Option<Arc<BoundClass>>, ErrorCode>
fn class( &self, name: &str, asof: &str, ) -> Result<Option<Arc<BoundClass>>, ErrorCode>
The class name is bound to as of asof (spec-0.5.0, 9.7, 16.3); Ok(None) when it is
not a class (a function name, or unbound). Provided: none.
Sourcefn aliases_tx(&self) -> Option<String>
fn aliases_tx(&self) -> Option<String>
The instant of the alias snapshot Bindings::alias answers from, for resolved.aliases_tx
(16.7); None when there is none (the configured map has no snapshot). Provided: none.
Sourcefn lookup(
&self,
class: &str,
label: &str,
asof: &str,
) -> Result<Option<String>, ErrorCode>
fn lookup( &self, class: &str, label: &str, asof: &str, ) -> Result<Option<String>, ErrorCode>
The key encoding the lookup method of class class maps label to as of asof
(16.7, D93): the value of the cell <class>/<lookup>(label: ...). Ok(None) when the
class has no lookup or the cell has no value. Provided: none.
Sourcefn class_name_of(
&self,
class_hash: &str,
asof: &str,
) -> Result<Option<String>, ErrorCode>
fn class_name_of( &self, class_hash: &str, asof: &str, ) -> Result<Option<String>, ErrorCode>
The first name the class hash is bound to as of asof (K5, the classes round): the name that
names the defining class of an inherited method, as super names its parent (16.3). Provided: none.
Sourcefn class_by_hash(
&self,
class_hash: &str,
) -> Result<Option<ClassDescriptor>, ErrorCode>
fn class_by_hash( &self, class_hash: &str, ) -> Result<Option<ClassDescriptor>, ErrorCode>
The flattened class descriptor held under this class hash, bound or not (K5). Provided: none.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".