pub enum PythonBatchRef {
CachedMicroshardGroup {
shard_paths: Vec<PathBuf>,
microshard_ids: Vec<String>,
ordinals: Vec<u32>,
bytes_len: u64,
},
MicroEpoch {
lease_id: String,
microshard_ids: Vec<String>,
ordinals: Vec<u32>,
bytes_len: u64,
pipeline_kind: LeaseDataPipelineKind,
payload: Value,
},
}Expand description
One lease-loaded micro-epoch batch passed to the Python worker.
Variants§
CachedMicroshardGroup
Cached shard group materialized by the Rust shard cache.
Fields
MicroEpoch
Lease-scoped micro-epoch descriptor rebuilt inside Python.
Fields
§
pipeline_kind: LeaseDataPipelineKindHigh-level pipeline kind associated with this lease.
Implementations§
Source§impl PythonBatchRef
impl PythonBatchRef
Sourcepub fn cached_microshard_group(group: &[CachedMicroShard]) -> Self
pub fn cached_microshard_group(group: &[CachedMicroShard]) -> Self
Builds a shard-backed batch ref.
Sourcepub fn micro_epoch(
lease: &AssignmentLease,
cached_microshards: &[CachedMicroShard],
pipeline_kind: LeaseDataPipelineKind,
payload: Value,
) -> Self
pub fn micro_epoch( lease: &AssignmentLease, cached_microshards: &[CachedMicroShard], pipeline_kind: LeaseDataPipelineKind, payload: Value, ) -> Self
Builds a generic micro-epoch descriptor for Python-side dataloader reconstruction.
Trait Implementations§
Source§impl Clone for PythonBatchRef
impl Clone for PythonBatchRef
Source§fn clone(&self) -> PythonBatchRef
fn clone(&self) -> PythonBatchRef
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PythonBatchRef
impl Debug for PythonBatchRef
Source§impl<'de> Deserialize<'de> for PythonBatchRef
impl<'de> Deserialize<'de> for PythonBatchRef
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for PythonBatchRef
impl RefUnwindSafe for PythonBatchRef
impl Send for PythonBatchRef
impl Sync for PythonBatchRef
impl Unpin for PythonBatchRef
impl UnsafeUnpin for PythonBatchRef
impl UnwindSafe for PythonBatchRef
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> CanonicalSchema for Twhere
T: Serialize,
impl<T> CanonicalSchema for Twhere
T: Serialize,
Source§fn to_cbor_vec(&self) -> Result<Vec<u8>, SchemaError>
fn to_cbor_vec(&self) -> Result<Vec<u8>, SchemaError>
Serializes the value into canonical CBOR bytes.
Source§fn content_id(&self) -> Result<ContentId, SchemaError>
fn content_id(&self) -> Result<ContentId, SchemaError>
Computes the canonical content identifier for the value.