pub struct ObjectKeyV43 {
pub object_id: u64,
pub data: ObjectKeyDataV43,
}
Fields§
§object_id: u64
The ID of the object referred to.
data: ObjectKeyDataV43
The type and data of the key.
Implementations§
Source§impl ObjectKeyV43
impl ObjectKeyV43
Sourcepub fn attribute(object_id: u64, attribute_id: u64, key: AttributeKey) -> Self
pub fn attribute(object_id: u64, attribute_id: u64, key: AttributeKey) -> Self
Creates an ObjectKey for an attribute.
Sourcepub fn extent(object_id: u64, attribute_id: u64, range: Range<u64>) -> Self
pub fn extent(object_id: u64, attribute_id: u64, range: Range<u64>) -> Self
Creates an ObjectKey for an extent.
Sourcepub fn from_extent(object_id: u64, attribute_id: u64, extent: ExtentKey) -> Self
pub fn from_extent(object_id: u64, attribute_id: u64, extent: ExtentKey) -> Self
Creates an ObjectKey from an extent.
Sourcepub fn child(object_id: u64, name: &str, casefold: bool) -> Self
pub fn child(object_id: u64, name: &str, casefold: bool) -> Self
Creates an ObjectKey for a child.
Sourcepub fn encrypted_child(object_id: u64, name: Vec<u8>, hash_code: u32) -> Self
pub fn encrypted_child(object_id: u64, name: Vec<u8>, hash_code: u32) -> Self
Creates an ObjectKey for an encrypted child.
The hash_code is important here – especially for fscrypt as it affects the name of locked files.
For case-insensitive lookups in large encrypted directories, we lose the ability to binary search for an entry of interest because encryption breaks our sort order. In these cases we prefix records with a 32-bit hash based on the stable casefolded name. Hash collisions aside, this lets us jump straight to the entry of interest, if it exists.
Sourcepub fn graveyard_entry(graveyard_object_id: u64, object_id: u64) -> Self
pub fn graveyard_entry(graveyard_object_id: u64, object_id: u64) -> Self
Creates a graveyard entry for an object.
Sourcepub fn graveyard_attribute_entry(
graveyard_object_id: u64,
object_id: u64,
attribute_id: u64,
) -> Self
pub fn graveyard_attribute_entry( graveyard_object_id: u64, object_id: u64, attribute_id: u64, ) -> Self
Creates a graveyard entry for an attribute.
Sourcepub fn project_limit(object_id: u64, project_id: u64) -> Self
pub fn project_limit(object_id: u64, project_id: u64) -> Self
Creates an ObjectKey for a ProjectLimit entry.
Sourcepub fn project_usage(object_id: u64, project_id: u64) -> Self
pub fn project_usage(object_id: u64, project_id: u64) -> Self
Creates an ObjectKey for a ProjectUsage entry.
pub fn extended_attribute(object_id: u64, name: Vec<u8>) -> Self
Sourcepub fn key_for_merge_into(&self) -> Self
pub fn key_for_merge_into(&self) -> Self
Returns the merge key for this key; that is, a key which is <= this key and any other possibly overlapping key, under Ord. This would be used for the hint in |merge_into|.
Trait Implementations§
Source§impl Clone for ObjectKeyV43
impl Clone for ObjectKeyV43
Source§fn clone(&self) -> ObjectKeyV43
fn clone(&self) -> ObjectKeyV43
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ObjectKeyV43
impl Debug for ObjectKeyV43
Source§impl<'de> Deserialize<'de> for ObjectKeyV43
impl<'de> Deserialize<'de> for ObjectKeyV43
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>,
Source§impl From<ObjectKeyV40> for ObjectKeyV43
impl From<ObjectKeyV40> for ObjectKeyV43
Source§fn from(from: ObjectKeyV40) -> Self
fn from(from: ObjectKeyV40) -> Self
Source§impl Hash for ObjectKeyV43
impl Hash for ObjectKeyV43
Source§impl Ord for ObjectKeyV43
impl Ord for ObjectKeyV43
Source§fn cmp(&self, other: &ObjectKeyV43) -> Ordering
fn cmp(&self, other: &ObjectKeyV43) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for ObjectKeyV43
impl PartialEq for ObjectKeyV43
Source§impl PartialOrd for ObjectKeyV43
impl PartialOrd for ObjectKeyV43
Source§impl Serialize for ObjectKeyV43
impl Serialize for ObjectKeyV43
Source§impl TypeFingerprint for ObjectKeyV43
impl TypeFingerprint for ObjectKeyV43
fn fingerprint() -> String
Source§impl Versioned for ObjectKeyV43
impl Versioned for ObjectKeyV43
impl Eq for ObjectKeyV43
impl StructuralPartialEq for ObjectKeyV43
Auto Trait Implementations§
impl Freeze for ObjectKeyV43
impl RefUnwindSafe for ObjectKeyV43
impl Send for ObjectKeyV43
impl Sync for ObjectKeyV43
impl Unpin for ObjectKeyV43
impl UnwindSafe for ObjectKeyV43
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more