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 floor_body(store: StoreId, device: DeviceId, number: NonZeroU64) -> Self
pub fn floor_body(store: StoreId, device: DeviceId, number: NonZeroU64) -> Self
One floor body, created once at a number of its writing device’s own (§16.4).
Sourcepub fn floor_body_id(&self) -> Option<(DeviceId, NonZeroU64)>
pub fn floor_body_id(&self) -> Option<(DeviceId, NonZeroU64)>
The writer and number a floor body’s path names.
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 their object 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 pointer can be replaced (D10).
Sourcepub fn device(&self) -> Option<DeviceId>
pub fn device(&self) -> Option<DeviceId>
The device named by a snapshot, floor body or uploaded file path.
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.