pub struct LocalClient { /* private fields */ }Implementations§
Source§impl LocalClient
impl LocalClient
Sourcepub async fn temporary(ctx: XetContext) -> Result<Arc<Self>>
pub async fn temporary(ctx: XetContext) -> Result<Arc<Self>>
Create a local client hosted in a temporary directory for testing. This is an async function to allow use with current-thread tokio runtime.
Sourcepub async fn new(ctx: XetContext, path: impl AsRef<Path>) -> Result<Arc<Self>>
pub async fn new(ctx: XetContext, path: impl AsRef<Path>) -> Result<Arc<Self>>
Create a local client hosted in a directory. Effectively, this directory is the CAS endpoint and persists across instances of LocalClient.
Sourcepub fn set_lifecycle_tag_deletion(&self, on: bool)
pub fn set_lifecycle_tag_deletion(&self, on: bool)
Toggle lifecycle-tag deletion mode (see Self::lifecycle_tag_deletion).
Source§impl LocalClient
impl LocalClient
Sourcepub async fn get_reconstruction_v1(
&self,
file_id: &MerkleHash,
bytes_range: Option<FileRange>,
) -> Result<Option<QueryReconstructionResponse>>
pub async fn get_reconstruction_v1( &self, file_id: &MerkleHash, bytes_range: Option<FileRange>, ) -> Result<Option<QueryReconstructionResponse>>
V1 reconstruction: returns per-range presigned URLs.
Sourcepub async fn get_reconstruction_v2(
&self,
file_id: &MerkleHash,
bytes_range: Option<FileRange>,
) -> Result<Option<QueryReconstructionResponseV2>>
pub async fn get_reconstruction_v2( &self, file_id: &MerkleHash, bytes_range: Option<FileRange>, ) -> Result<Option<QueryReconstructionResponseV2>>
V2 reconstruction: returns per-xorb multi-range fetch descriptors.
Trait Implementations§
Source§impl Client for LocalClient
impl Client for LocalClient
fn get_file_reconstruction_info<'life0, 'life1, 'async_trait>(
&'life0 self,
file_hash: &'life1 MerkleHash,
) -> Pin<Box<dyn Future<Output = Result<Option<(MDBFileInfo, Option<MerkleHash>)>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn query_for_global_dedup_shard<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_prefix: &'life1 str,
chunk_hash: &'life2 MerkleHash,
) -> Pin<Box<dyn Future<Output = Result<Option<Bytes>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn acquire_upload_permit<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ConnectionPermit>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn acquire_upload_permit<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ConnectionPermit>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Acquire an upload permit.
Source§fn upload_shard<'life0, 'async_trait>(
&'life0 self,
shard_data: Bytes,
_permit: ConnectionPermit,
progress_callback: Option<ShardUploadProgressCallback>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn upload_shard<'life0, 'async_trait>(
&'life0 self,
shard_data: Bytes,
_permit: ConnectionPermit,
progress_callback: Option<ShardUploadProgressCallback>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Upload a new shard. The optional callback receives v2 NDJSON progress events.
Source§fn upload_xorb<'life0, 'life1, 'async_trait>(
&'life0 self,
_prefix: &'life1 str,
serialized_xorb_object: SerializedXorbObject,
progress_callback: Option<ProgressCallback>,
_permit: ConnectionPermit,
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn upload_xorb<'life0, 'life1, 'async_trait>(
&'life0 self,
_prefix: &'life1 str,
serialized_xorb_object: SerializedXorbObject,
progress_callback: Option<ProgressCallback>,
_permit: ConnectionPermit,
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Upload a new xorb. Optional progress callback receives (delta, completed, total) in transfer bytes.
Source§fn get_reconstruction<'life0, 'life1, 'async_trait>(
&'life0 self,
file_id: &'life1 MerkleHash,
bytes_range: Option<FileRange>,
) -> Pin<Box<dyn Future<Output = Result<Option<QueryReconstructionResponseV2>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_reconstruction<'life0, 'life1, 'async_trait>(
&'life0 self,
file_id: &'life1 MerkleHash,
bytes_range: Option<FileRange>,
) -> Pin<Box<dyn Future<Output = Result<Option<QueryReconstructionResponseV2>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Returns reconstruction info always in V2 format.
Implementations may try V2 first and fall back to V1 + convert.
fn batch_get_reconstruction<'life0, 'life1, 'async_trait>(
&'life0 self,
file_ids: &'life1 [MerkleHash],
) -> Pin<Box<dyn Future<Output = Result<BatchQueryReconstructionResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn acquire_download_permit<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ConnectionPermit>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn get_file_term_data<'life0, 'async_trait>(
&'life0 self,
url_info: Box<dyn URLProvider>,
_download_permit: ConnectionPermit,
progress_callback: Option<ProgressCallback>,
uncompressed_size_if_known: Option<usize>,
) -> Pin<Box<dyn Future<Output = Result<(Bytes, Vec<u32>)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_file_term_data<'life0, 'async_trait>(
&'life0 self,
url_info: Box<dyn URLProvider>,
_download_permit: ConnectionPermit,
progress_callback: Option<ProgressCallback>,
uncompressed_size_if_known: Option<usize>,
) -> Pin<Box<dyn Future<Output = Result<(Bytes, Vec<u32>)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Optional progress callback receives (delta, completed, total) in transfer bytes.
When [uncompressed_size_if_known] is Some, the returned Bytes must have len() equal to that value.
Source§fn get_file_chunk_hashes<'life0, 'life1, 'async_trait>(
&'life0 self,
file_id: &'life1 MerkleHash,
dirty_ranges: Vec<FileRange>,
) -> Pin<Box<dyn Future<Output = Result<FileChunkHashesResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_file_chunk_hashes<'life0, 'life1, 'async_trait>(
&'life0 self,
file_id: &'life1 MerkleHash,
dirty_ranges: Vec<FileRange>,
) -> Pin<Box<dyn Future<Output = Result<FileChunkHashesResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Compute chunk-aligned dirty windows + opaque gap [
MerkleHashSubtree] summaries for the
given file, narrowed to dirty_ranges. Read moreSource§impl DeletionControlableClient for LocalClient
impl DeletionControlableClient for LocalClient
Source§fn verify_all_reachable<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn verify_all_reachable<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Verifies referential integrity of all shards on disk:
- For each XORB entry listed in any shard, the corresponding XORB file must exist on disk.
- For each file entry in any shard, every referenced XORB must exist on disk. (Global-dedup allows file entries to reference XORBs described in a different shard, so we do a cross-shard check against disk rather than a within-shard check.)
Source§fn list_shard_entries<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<MerkleHash>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_shard_entries<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<MerkleHash>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns all shard hashes from shard files on disk.
Source§fn get_shard_bytes<'life0, 'life1, 'async_trait>(
&'life0 self,
hash: &'life1 MerkleHash,
) -> Pin<Box<dyn Future<Output = Result<Bytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_shard_bytes<'life0, 'life1, 'async_trait>(
&'life0 self,
hash: &'life1 MerkleHash,
) -> Pin<Box<dyn Future<Output = Result<Bytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Returns a shard’s raw bytes by its hash.
Source§fn delete_shard_entry<'life0, 'life1, 'async_trait>(
&'life0 self,
hash: &'life1 MerkleHash,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_shard_entry<'life0, 'life1, 'async_trait>(
&'life0 self,
hash: &'life1 MerkleHash,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Deletes a shard file by its hash.
Source§fn list_file_shard_entries<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<(MerkleHash, MerkleHash)>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_file_shard_entries<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<(MerkleHash, MerkleHash)>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns (file_hash, shard_hash) tuples for all files across all shards.
Source§fn delete_file_entry<'life0, 'life1, 'async_trait>(
&'life0 self,
file_hash: &'life1 MerkleHash,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_file_entry<'life0, 'life1, 'async_trait>(
&'life0 self,
file_hash: &'life1 MerkleHash,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Soft-deletes a file entry by hash.
The file is hidden from reconstruction and listing paths without rewriting shard files.
Source§fn remove_shard_dedup_entries<'life0, 'life1, 'async_trait>(
&'life0 self,
shard_hash: &'life1 MerkleHash,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn remove_shard_dedup_entries<'life0, 'life1, 'async_trait>(
&'life0 self,
shard_hash: &'life1 MerkleHash,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Removes all global-dedup table entries contributed by the given shard.
Called by GC Stage 4 before replacing or discarding a shard.
Source§fn delete_xorb<'life0, 'life1, 'async_trait>(
&'life0 self,
hash: &'life1 MerkleHash,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_xorb<'life0, 'life1, 'async_trait>(
&'life0 self,
hash: &'life1 MerkleHash,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Deletes a XORB by hash.
Returns all XORB hashes with their associated object tags.
Source§fn delete_xorb_if_tag_matches<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
hash: &'life1 MerkleHash,
tag: &'life2 ObjectTag,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn delete_xorb_if_tag_matches<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
hash: &'life1 MerkleHash,
tag: &'life2 ObjectTag,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Deletes a XORB only if its current tag matches the provided tag.
Returns
Ok(true) if deleted, Ok(false) if the tag did not match.Returns all shard hashes with their associated object tags.
Source§fn delete_shard_if_tag_matches<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
hash: &'life1 MerkleHash,
tag: &'life2 ObjectTag,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn delete_shard_if_tag_matches<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
hash: &'life1 MerkleHash,
tag: &'life2 ObjectTag,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Deletes a shard only if its current tag matches the provided tag.
Returns
Ok(true) if deleted, Ok(false) if the tag did not match.Source§impl DirectAccessClient for LocalClient
impl DirectAccessClient for LocalClient
Source§fn set_fetch_term_url_expiration(&self, expiration: Duration)
fn set_fetch_term_url_expiration(&self, expiration: Duration)
Sets the expiration duration for fetch term URLs.
Source§fn set_global_dedup_shard_expiration(&self, expiration: Option<Duration>)
fn set_global_dedup_shard_expiration(&self, expiration: Option<Duration>)
Sets the expiration duration for global dedup shards. Read more
Source§fn set_max_ranges_per_fetch(&self, max_ranges: usize)
fn set_max_ranges_per_fetch(&self, max_ranges: usize)
Sets the maximum number of byte ranges per
XorbMultiRangeFetch entry
in V2 reconstruction responses. Read moreSource§fn disable_v2_endpoints(&self, status_code: u16)
fn disable_v2_endpoints(&self, status_code: u16)
Disables V2 endpoints (reconstruction and shard upload) with the given HTTP status code.
When disabled,
/v2/* handlers return this status, forcing clients to fall back to V1.
Pass 0 to re-enable.Source§fn v2_disabled_status_code(&self) -> u16
fn v2_disabled_status_code(&self) -> u16
Returns the HTTP status code V2 endpoints should return when disabled,
or 0 if V2 is enabled.
Source§fn get_reconstruction_v1<'life0, 'life1, 'async_trait>(
&'life0 self,
file_id: &'life1 MerkleHash,
bytes_range: Option<FileRange>,
) -> Pin<Box<dyn Future<Output = Result<Option<QueryReconstructionResponse>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_reconstruction_v1<'life0, 'life1, 'async_trait>(
&'life0 self,
file_id: &'life1 MerkleHash,
bytes_range: Option<FileRange>,
) -> Pin<Box<dyn Future<Output = Result<Option<QueryReconstructionResponse>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
V1 reconstruction: returns per-range presigned URLs.
Source§fn get_reconstruction_v2<'life0, 'life1, 'async_trait>(
&'life0 self,
file_id: &'life1 MerkleHash,
bytes_range: Option<FileRange>,
) -> Pin<Box<dyn Future<Output = Result<Option<QueryReconstructionResponseV2>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_reconstruction_v2<'life0, 'life1, 'async_trait>(
&'life0 self,
file_id: &'life1 MerkleHash,
bytes_range: Option<FileRange>,
) -> Pin<Box<dyn Future<Output = Result<Option<QueryReconstructionResponseV2>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
V2 reconstruction: returns per-xorb multi-range fetch descriptors.
Source§fn set_api_delay_range(&self, delay_range: Option<Range<Duration>>)
fn set_api_delay_range(&self, delay_range: Option<Range<Duration>>)
Sets a random delay range for all Client API calls. Read more
Source§fn apply_api_delay<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn apply_api_delay<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Applies the configured API delay if set. Read more
Source§fn list_xorbs<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<MerkleHash>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_xorbs<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<MerkleHash>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns all XORB hashes stored in this client.
Source§fn get_full_xorb<'life0, 'life1, 'async_trait>(
&'life0 self,
hash: &'life1 MerkleHash,
) -> Pin<Box<dyn Future<Output = Result<Bytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_full_xorb<'life0, 'life1, 'async_trait>(
&'life0 self,
hash: &'life1 MerkleHash,
) -> Pin<Box<dyn Future<Output = Result<Bytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get all uncompressed bytes from a XORB.
Source§fn get_xorb_ranges<'life0, 'life1, 'async_trait>(
&'life0 self,
hash: &'life1 MerkleHash,
chunk_ranges: Vec<(u32, u32)>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Bytes>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_xorb_ranges<'life0, 'life1, 'async_trait>(
&'life0 self,
hash: &'life1 MerkleHash,
chunk_ranges: Vec<(u32, u32)>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Bytes>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get uncompressed bytes from a XORB within chunk ranges.
Each tuple represents a chunk index range [start, end).
Source§fn xorb_length<'life0, 'life1, 'async_trait>(
&'life0 self,
hash: &'life1 MerkleHash,
) -> Pin<Box<dyn Future<Output = Result<u32>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn xorb_length<'life0, 'life1, 'async_trait>(
&'life0 self,
hash: &'life1 MerkleHash,
) -> Pin<Box<dyn Future<Output = Result<u32>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get the length of the uncompressed XORB data.
Source§fn xorb_exists<'life0, 'life1, 'async_trait>(
&'life0 self,
hash: &'life1 MerkleHash,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn xorb_exists<'life0, 'life1, 'async_trait>(
&'life0 self,
hash: &'life1 MerkleHash,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Check if a XORB exists.
Get the XorbObject footer/metadata for a XORB.
Source§fn get_file_size<'life0, 'life1, 'async_trait>(
&'life0 self,
hash: &'life1 MerkleHash,
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_file_size<'life0, 'life1, 'async_trait>(
&'life0 self,
hash: &'life1 MerkleHash,
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get the file size for a given file hash.
Source§fn get_file_data<'life0, 'life1, 'async_trait>(
&'life0 self,
hash: &'life1 MerkleHash,
byte_range: Option<FileRange>,
) -> Pin<Box<dyn Future<Output = Result<Bytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_file_data<'life0, 'life1, 'async_trait>(
&'life0 self,
hash: &'life1 MerkleHash,
byte_range: Option<FileRange>,
) -> Pin<Box<dyn Future<Output = Result<Bytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get file data, optionally within a byte range.
Source§fn get_xorb_raw_bytes<'life0, 'life1, 'async_trait>(
&'life0 self,
hash: &'life1 MerkleHash,
byte_range: Option<FileRange>,
) -> Pin<Box<dyn Future<Output = Result<Bytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_xorb_raw_bytes<'life0, 'life1, 'async_trait>(
&'life0 self,
hash: &'life1 MerkleHash,
byte_range: Option<FileRange>,
) -> Pin<Box<dyn Future<Output = Result<Bytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get raw (serialized) bytes from a XORB, optionally within a byte range. Read more
Source§fn xorb_raw_length<'life0, 'life1, 'async_trait>(
&'life0 self,
hash: &'life1 MerkleHash,
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn xorb_raw_length<'life0, 'life1, 'async_trait>(
&'life0 self,
hash: &'life1 MerkleHash,
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get the total length of the raw (serialized) XORB data.
Source§fn fetch_term_data<'life0, 'async_trait>(
&'life0 self,
hash: MerkleHash,
fetch_term: XorbReconstructionFetchInfo,
) -> Pin<Box<dyn Future<Output = Result<(Bytes, Vec<u32>)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn fetch_term_data<'life0, 'async_trait>(
&'life0 self,
hash: MerkleHash,
fetch_term: XorbReconstructionFetchInfo,
) -> Pin<Box<dyn Future<Output = Result<(Bytes, Vec<u32>)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Fetches term data for a given hash and fetch term.
Returns (data bytes, chunk byte indices) matching
Client::get_file_term_data.Source§impl Drop for LocalClient
impl Drop for LocalClient
Auto Trait Implementations§
impl !Freeze for LocalClient
impl !RefUnwindSafe for LocalClient
impl !UnwindSafe for LocalClient
impl Send for LocalClient
impl Sync for LocalClient
impl Unpin for LocalClient
impl UnsafeUnpin for LocalClient
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
Mutably borrows from an owned value. Read more
Source§impl<T> ClientTestingUtils for T
impl<T> ClientTestingUtils for T
Source§fn upload_random_file<'life0, 'life1, 'async_trait>(
&'life0 self,
term_spec: &'life1 [(u64, (u64, u64))],
chunk_size: usize,
) -> Pin<Box<dyn Future<Output = Result<RandomFileContents>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn upload_random_file<'life0, 'life1, 'async_trait>(
&'life0 self,
term_spec: &'life1 [(u64, (u64, u64))],
chunk_size: usize,
) -> Pin<Box<dyn Future<Output = Result<RandomFileContents>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Insert a random file into the local CAS. Read more
Source§impl<T> DropFlavorWrapper<T> for T
impl<T> DropFlavorWrapper<T> for T
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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>
Converts
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>
Converts
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