Module create

Module create 

Source
Expand description

Deterministic payload discovery for torrent creation.

Structs§

CancellationToken
Cooperative cancellation handle shared with long-running core operations.
CreateMetrics
Per-phase elapsed time for creation.
CreateOptions
Reproducible v1 creation options.
CreateOptionsBuilder
Builder for CreateOptions.
CreateResult
Canonical creation result.
Creator
Torrent creator over one payload path.
HashProgress
Monotonic progress snapshot for sequential hashing.
ManifestEntry
Metadata needed to stream a payload file later without keeping it open.
ManifestOptions
Options controlling deterministic payload discovery.
ManifestOptionsBuilder
Builder for ManifestOptions.
NoProgress
Zero-overhead progress sink for callers that do not need updates.
ParallelHashOptions
Bounded per-operation v1 hashing pipeline settings.
PayloadManifest
Deterministically sorted payload snapshot.
V1HashResult
Ordered SHA-1 piece hashes and hashing metrics.
V2HashResult
Per-file BEP 52 Merkle result.

Enums§

CreateMode
Torrent protocol representation to create.
DurabilityPolicy
Durability requested after atomic destination publication.
EmptyDirectoryPolicy
Policy for empty directories, which cannot be represented in metainfo.
EmptyFilePolicy
Policy for zero-length files.
HashThreads
Per-operation v1 hashing worker selection.
HiddenPolicy
Policy for dot-prefixed path components.
OverwritePolicy
Destination replacement policy for atomic creation.
PieceLength
Automatic or caller-selected piece length.
PieceLengthMode
Protocol constraints applied to an explicit piece length.
RootName
How the torrent root name is selected.
SpecialFilePolicy
Policy for sockets, devices, FIFOs, and other non-file entries.
SymlinkPolicy
Policy for symbolic links.

Constants§

PIECE_LENGTH_POLICY_ID
Stable identifier for the automatic piece-length selection table.
V2_BLOCK_LENGTH
BEP 52 leaf block length in bytes.

Traits§

ProgressSink
Presentation-free observer for hashing progress.

Functions§

automatic_piece_length
Selects a stable automatic piece length for total payload bytes.
hash_v1_parallel
Bounded parallel v1 piece hashing with ordered collection.
hash_v1_sequential
Sequential correctness oracle for v1 piece hashing.
hash_v2_file_sequential
Hashes one file into a BEP 52 pieces root and optional piece layer.
scan_manifest
Scans a file or directory into a deterministic manifest.
sort_manifest_entries
Sorts entries and rejects duplicate torrent paths.
v2_zero_hash
Returns the BEP 52 all-zero subtree hash at level above leaves.
validate_piece_length
Validates a caller-selected piece length.
write_atomic
Atomically writes bytes using BTPC’s overwrite and durability policies.