pub trait Resolve:
Send
+ Sync
+ AsAny {
// Required methods
fn resolve<'a>(
&'a self,
address: Address,
this: &'a Arc<dyn Resolve>,
) -> FailFuture<'a, ByteNode>;
fn resolve_data(&self, address: Address) -> FailFuture<'_, Vec<u8>>;
// Provided methods
fn try_resolve_local(
&self,
address: Address,
this: &Arc<dyn Resolve>,
) -> Result<Option<ByteNode>> { ... }
fn topology_hash(&self) -> Option<Hash> { ... }
fn into_topovec(self: Arc<Self>) -> Option<TopoVec> { ... }
}Required Methods§
Sourcefn resolve<'a>(
&'a self,
address: Address,
this: &'a Arc<dyn Resolve>,
) -> FailFuture<'a, ByteNode>
fn resolve<'a>( &'a self, address: Address, this: &'a Arc<dyn Resolve>, ) -> FailFuture<'a, ByteNode>
Resolve the address. For an Object, this is what gets used as PointInput.
this points to same thing as self. Provided for ease of cloning [Hash]-based
Resolves.
Sourcefn resolve_data(&self, address: Address) -> FailFuture<'_, Vec<u8>>
fn resolve_data(&self, address: Address) -> FailFuture<'_, Vec<u8>>
Resolve data only (without a nested Resolve).
Provided Methods§
Sourcefn try_resolve_local(
&self,
address: Address,
this: &Arc<dyn Resolve>,
) -> Result<Option<ByteNode>>
fn try_resolve_local( &self, address: Address, this: &Arc<dyn Resolve>, ) -> Result<Option<ByteNode>>
Attempt resolving assuming something is local. Returns None when it’s not known to be
local.
Sourcefn topology_hash(&self) -> Option<Hash>
fn topology_hash(&self) -> Option<Hash>
Topology hash of the underyling sequence if this resolver is index-based.
Trait Implementations§
impl InlineOutput for dyn Resolve + '_
Source§impl ListHashes for dyn Resolve + '_
impl ListHashes for dyn Resolve + '_
Source§fn list_hashes(&self, f: &mut (impl ?Sized + FnMut(Hash)))
fn list_hashes(&self, f: &mut (impl ?Sized + FnMut(Hash)))
[
Hash]-only part of Topological::traverse.Source§fn topology_hash(&self) -> Hash
fn topology_hash(&self) -> Hash
[
Hash] of all [Hash]es the object refers to other objects by.Source§fn point_count(&self) -> usize
fn point_count(&self) -> usize
How many others this object refers to.
Source§impl MaybeHasNiche for dyn Resolve + '_
impl MaybeHasNiche for dyn Resolve + '_
Source§impl ToOutput for dyn Resolve + '_
No-op matching the ParseInline.
impl ToOutput for dyn Resolve + '_
No-op matching the ParseInline.
Source§fn to_output(&self, _: &mut (impl ?Sized + Output))
fn to_output(&self, _: &mut (impl ?Sized + Output))
Provide object’s byte representation to an
Output.Source§fn mangle_hash(&self) -> Hash
fn mangle_hash(&self) -> Hash
“Mangle hash” of the object. This is used to introduce runtime distinction between
data-identical objects similarly to compile-time
Tagged::HASH.Source§fn output<T: FromOutput<Output: Default>>(&self) -> T
fn output<T: FromOutput<Output: Default>>(&self) -> T
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".