pub struct ObjectPath(/* private fields */);Expand description
One validated encrypted-object path in the layout of §§5, 10, 12, 13, 16 and 17.
Implementations§
Source§impl ObjectPath
impl ObjectPath
Sourcepub fn slot(store: StoreId, number: NonZero<u64>) -> ObjectPath
pub fn slot(store: StoreId, number: NonZero<u64>) -> ObjectPath
One create-once slot in the store’s shared sequence (§5).
Sourcepub fn slot_number(&self) -> Option<Slot>
pub fn slot_number(&self) -> Option<Slot>
The positive number of a sequence slot.
Sourcepub fn floor(store: StoreId) -> ObjectPath
pub fn floor(store: StoreId) -> ObjectPath
The store’s conditionally replaced floor (§16.4).
Sourcepub fn snapshot_id(&self) -> Option<SnapshotId>
pub fn snapshot_id(&self) -> Option<SnapshotId>
The identity carried by a snapshot path.
Sourcepub fn snapshot(
store: StoreId,
audience: Audience,
device: DeviceId,
number: NonZero<u64>,
) -> ObjectPath
pub fn snapshot( store: StoreId, audience: Audience, device: DeviceId, number: NonZero<u64>, ) -> ObjectPath
A snapshot written by a device (§16).
Sourcepub fn file(store: StoreId, device: DeviceId, object: ObjectId) -> ObjectPath
pub fn file(store: StoreId, device: DeviceId, object: ObjectId) -> ObjectPath
A stored object: encrypted file bytes named by a random id (§17.5).
Sourcepub fn join_request(
store: StoreId,
inviting: DeviceId,
invite: InviteId,
) -> ObjectPath
pub fn join_request( store: StoreId, inviting: DeviceId, invite: InviteId, ) -> ObjectPath
An encrypted join request under the device that made its invite and the invite’s id (§13.2).
Sourcepub fn device_gone(store: StoreId, device: DeviceId) -> ObjectPath
pub fn device_gone(store: StoreId, device: DeviceId) -> ObjectPath
The marker of a device gone for good, beside the join requests to its invites (§13.2).
Sourcepub fn join_request_invite(&self) -> Option<InviteId>
pub fn join_request_invite(&self) -> Option<InviteId>
The invite named by a join request’s path.
Sourcepub fn parse(value: &str) -> Result<ObjectPath, PathError>
pub fn parse(value: &str) -> Result<ObjectPath, PathError>
Parse a listed or recorded path without permitting traversal or other layouts.
Sourcepub fn is_replaceable(&self) -> bool
pub fn is_replaceable(&self) -> bool
Only the floor can be replaced (D10).
Sourcepub fn object_id(&self) -> Option<ObjectId>
pub fn object_id(&self) -> Option<ObjectId>
The stored object’s id, the last part of a stored file’s path.
Sourcepub fn components(&self) -> Vec<&str>
pub fn components(&self) -> Vec<&str>
The canonical path components, for providers with folder objects.
Trait Implementations§
Source§impl Clone for ObjectPath
impl Clone for ObjectPath
Source§fn clone(&self) -> ObjectPath
fn clone(&self) -> ObjectPath
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ObjectPath
impl Debug for ObjectPath
Source§impl<'de> Deserialize<'de> for ObjectPath
impl<'de> Deserialize<'de> for ObjectPath
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ObjectPath, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ObjectPath, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl From<ObjectPath> for String
impl From<ObjectPath> for String
Source§fn from(path: ObjectPath) -> String
fn from(path: ObjectPath) -> String
Source§impl Hash for ObjectPath
impl Hash for ObjectPath
Source§impl Ord for ObjectPath
impl Ord for ObjectPath
Source§fn cmp(&self, other: &ObjectPath) -> Ordering
fn cmp(&self, other: &ObjectPath) -> 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 ObjectPath
impl PartialEq for ObjectPath
Source§impl PartialOrd for ObjectPath
impl PartialOrd for ObjectPath
Source§impl Serialize for ObjectPath
impl Serialize for ObjectPath
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Source§impl TryFrom<String> for ObjectPath
impl TryFrom<String> for ObjectPath
impl Eq for ObjectPath
impl StructuralPartialEq for ObjectPath
Auto Trait Implementations§
impl Freeze for ObjectPath
impl RefUnwindSafe for ObjectPath
impl Send for ObjectPath
impl Sync for ObjectPath
impl Unpin for ObjectPath
impl UnsafeUnpin for ObjectPath
impl UnwindSafe for ObjectPath
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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