Skip to main content

AssetSink

Trait AssetSink 

Source
pub trait AssetSink {
    // Required method
    fn put(&mut self, hash: AssetHash, asset: &Asset) -> Result<()>;
}
Expand description

Where payloads are written. Separate from AssetSource because a read-only session has one and not the other.

Required Methods§

Source

fn put(&mut self, hash: AssetHash, asset: &Asset) -> Result<()>

File asset under hash, durably, if it is not already there.

§Errors

The write that did not land.

Implementors§