pub struct Foreign { /* private fields */ }Expand description
The cross-mesh resolver of a mesh.
Implementations§
Source§impl Foreign
impl Foreign
Sourcepub fn is_foreign(&self, name: &str) -> bool
pub fn is_foreign(&self, name: &str) -> bool
Whether name (a function name) is under a host this mesh does not own, and
cross-mesh resolution is on.
Sourcepub fn any_cells(&self) -> bool
pub fn any_cells(&self) -> bool
Whether any foreign cell was ever imported (lineage checks are skipped otherwise).
Sourcepub fn take_invalidated(&self) -> Vec<String>
pub fn take_invalidated(&self) -> Vec<String>
The cells whose versions grew since the last call: the caller reports each to the
engine (stored_version_added).
Sourcepub fn keys_for(
&self,
host: &str,
refresh: bool,
) -> Result<KeyDoc, ForeignError>
pub fn keys_for( &self, host: &str, refresh: bool, ) -> Result<KeyDoc, ForeignError>
The key document of host, from the cache while it is fresh, else fetched (SPEC 9.3).
refresh fetches it again unless it was fetched within the refetch interval.
Sourcepub fn mesh(&self, host: &str) -> Result<MeshDoc, ForeignError>
pub fn mesh(&self, host: &str) -> Result<MeshDoc, ForeignError>
The mesh document of host, resolved with its key document (SPEC 9.6), cached.
Sourcepub fn ensure_name(&self, name: &str) -> Result<(), ForeignError>
pub fn ensure_name(&self, name: &str) -> Result<(), ForeignError>
Brings the bindings of a foreign name up to date (when not confirmed within the TTL).
Sourcepub fn ensure_cell(&self, cell: &Cell) -> Result<bool, ForeignError>
pub fn ensure_cell(&self, cell: &Cell) -> Result<bool, ForeignError>
Brings the versions of a foreign stored cell up to date (when not confirmed within the
TTL). Ok(true) when versions were added.
Sourcepub fn refresh_deps(
&self,
receipt_hash: &str,
asof: &str,
) -> Result<bool, ForeignError>
pub fn refresh_deps( &self, receipt_hash: &str, asof: &str, ) -> Result<bool, ForeignError>
Confirms the foreign cells an answer rests on, for an answer as of asof: those not
confirmed within the TTL and confirmed before asof are fetched again. Ok(true) when
versions were added (the caller answers again).