pub struct CacheKey(pub [u8; 32]);Expand description
Content-addressable hash identifying a computation.
Tuple Fields§
§0: [u8; 32]Implementations§
Source§impl CacheKey
impl CacheKey
Sourcepub fn from_parts(parts: &[&[u8]]) -> Self
pub fn from_parts(parts: &[&[u8]]) -> Self
Create a cache key by hashing arbitrary byte slices.
Sourcepub fn for_state(config_hash: &CacheKey, data_hash: &CacheKey) -> Self
pub fn for_state(config_hash: &CacheKey, data_hash: &CacheKey) -> Self
Create a cache key for a filter’s trained state. key = hash(filter_config_hash + training_data_hash)
Sourcepub fn for_output(
config_hash: &CacheKey,
state_hash: &CacheKey,
input_hash: &CacheKey,
) -> Self
pub fn for_output( config_hash: &CacheKey, state_hash: &CacheKey, input_hash: &CacheKey, ) -> Self
Create a cache key for a filter’s output. key = hash(filter_config_hash + state_hash + input_data_hash)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for CacheKey
impl<'de> Deserialize<'de> for CacheKey
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for CacheKey
impl StructuralPartialEq for CacheKey
Auto Trait Implementations§
impl Freeze for CacheKey
impl RefUnwindSafe for CacheKey
impl Send for CacheKey
impl Sync for CacheKey
impl Unpin for CacheKey
impl UnsafeUnpin for CacheKey
impl UnwindSafe for CacheKey
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more