mirror of
https://github.com/deuxfleurs-org/garage.git
synced 2026-08-18 17:26:16 +00:00
Implement table gc, currently for block_ref and version only
This commit is contained in:
@@ -71,6 +71,14 @@ impl FixedBytes32 {
|
||||
pub fn to_vec(&self) -> Vec<u8> {
|
||||
self.0.to_vec()
|
||||
}
|
||||
pub fn try_from(by: &[u8]) -> Option<Self> {
|
||||
if by.len() != 32 {
|
||||
return None;
|
||||
}
|
||||
let mut ret = [0u8; 32];
|
||||
ret.copy_from_slice(by);
|
||||
Some(Self(ret))
|
||||
}
|
||||
}
|
||||
|
||||
pub type UUID = FixedBytes32;
|
||||
|
||||
Reference in New Issue
Block a user