[−][src]Struct asuran::repository::ChunkID
Key used for indexing a Chunk
in a repository
These are usually derived via an HMAC of the chunks plain text, and are used for
reduplication. If two chunks have the same ChunkID
, it is assumed that they
are identical.
Methods
impl ChunkID
[src]
pub fn new(input_id: &[u8]) -> ChunkID
[src]
Will create a new key from a slice.
Keys longer than 32 bytes will be truncated. Keys shorter than 32 bytes will be padded at the end with zeros.
pub fn get_id(&self) -> &[u8]
[src]
Provides a reference to a key's raw bytes
pub fn verify(&self, slice: &[u8]) -> bool
[src]
Verifies equaliy of this key with the first 32 bytes of a slice
pub fn manifest_id() -> ChunkID
[src]
Returns the special all-zero key used for the manifest
Trait Implementations
impl Clone for ChunkID
[src]
impl Copy for ChunkID
[src]
impl Debug for ChunkID
[src]
impl<'de> Deserialize<'de> for ChunkID
[src]
fn deserialize<__D>(
__deserializer: __D
) -> Result<ChunkID, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
[src]
__deserializer: __D
) -> Result<ChunkID, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
impl Eq for ChunkID
[src]
impl Hash for ChunkID
[src]
fn hash<__H>(&self, state: &mut __H) where
__H: Hasher,
[src]
__H: Hasher,
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<ChunkID> for ChunkID
[src]
impl Serialize for ChunkID
[src]
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
[src]
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
impl StructuralEq for ChunkID
[src]
impl StructuralPartialEq for ChunkID
[src]
Auto Trait Implementations
impl RefUnwindSafe for ChunkID
impl Send for ChunkID
impl Sync for ChunkID
impl Unpin for ChunkID
impl UnwindSafe for ChunkID
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
fn equivalent(&self, key: &K) -> bool
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,
fn vzip(self) -> V
impl<T> WithSubscriber for T
[src]
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]
S: Into<Dispatch>,