Skip to main content

read_reference

Function read_reference 

Source
pub fn read_reference(address: &str) -> Result<Vec<u8>, ContentRefusal>
Expand description

The bytes the content reference address names, read from the store of the window whose code is running.

A hash is never a capability by itself: only a store that answers for one workspace (tilo_content::ContentStore::workspace_scoped) resolves a reference, and it serves an address only when that workspace references it. So a caller can name only content readable in the workspace it acts in.

ยงErrors

A ContentRefusal saying why, in words for whoever passed it.