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: NonZeroU64) -> Self
pub fn slot(store: StoreId, number: NonZeroU64) -> Self
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 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: NonZeroU64,
) -> Self
pub fn snapshot( store: StoreId, audience: Audience, device: DeviceId, number: NonZeroU64, ) -> Self
A snapshot written by a device (§16).
Sourcepub fn file(store: StoreId, device: DeviceId, object: ObjectId) -> Self
pub fn file(store: StoreId, device: DeviceId, object: ObjectId) -> Self
A stored object: encrypted file bytes named by a random id (§17.5).
Sourcepub fn join_request(
store: StoreId,
inviting: DeviceId,
invite: InviteId,
) -> Self
pub fn join_request( store: StoreId, inviting: DeviceId, invite: InviteId, ) -> Self
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) -> Self
pub fn device_gone(store: StoreId, device: DeviceId) -> Self
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<Self, PathError>
pub fn parse(value: &str) -> Result<Self, 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 more