Expand description
Streaming remote attachment primitives.
Structs§
- Attachment
Decoder - Parses a protobuf envelope across arbitrary chunk boundaries.
- Attachment
Error - An attachment failure with a stable cause.
- Attachment
Options - Transfer limits. The caller supplies the snapshot default in
get. - Decoded
Meta - Metadata of an attachment envelope.
- GcmDecryptor
- Decrypts chunks while retaining the final 16 bytes as the tag.
- GcmEncryptor
- Encrypts chunks and returns the tag after the final chunk.
- KeyMaterial
- The random values used by the attachment encryption scheme.
- Native
Store - Files below one native attachments directory.
- Staged
File - A staged file that can be uploaded without loading it into memory.
- Store
File - A file found during attachment storage reconciliation.
- Store
Remove Error - A directory removal that failed.
- Store
Writer - A writable file used as the sink for a download.
- Transfer
- Native HTTP transfer. Downloads check each connected address.
- Upload
Request - Values from the backend’s signed upload response.
Enums§
- Attachment
Failure Cause - Stable cause of an attachment failure.
- Content
Chunk - Content events returned by the streaming attachment decoder.
- PutOutcome
- Store
Move Error - The result of a move that must not replace an existing file.
Traits§
Functions§
- attachment_
key - Hash all key material to name the local attachment directory.
- check_
content_ url - Check a published content URL without DNS or transfer policy.
- ciphertext_
len - create_
private_ directory - Create missing directory components with private permissions. Existing directories keep their permissions.
- download_
cap - Compute the bound before a download starts.
- download_
url - Append a ciphertext digest to the configured base URL.
- encoded_
prefix - Encode the protobuf fields before the attachment content.
- local_
file_ name - Apply the file name table to an optional remote name.
- plaintext_
rel_ path - Derive the relative plaintext path without reading storage or a network.
- remote_
attachment - Build the metadata published for a staged ciphertext.
- retained_
fields_ fit - Check the fields that the streaming decoder keeps before content bytes.
This uses the same envelope as
encoded_prefixand the decoder’s limit. - sanitize_
path_ component - Apply steps 2 to 8 of the file name table to a path component.
- sanitize_
path_ component_ with_ limit - Apply the file name table with a caller-selected UTF-8 byte limit.
- staged_
path - A path for staged ciphertext. It cannot collide with an attachment key.
- temporary_
path - A path for a temporary file. Temporary files never sit under key directories.