pub struct InputPartDescriptor { /* private fields */ }Expand description
Payload-free identity for one ordered prepared input part.
Implementations§
Source§impl InputPartDescriptor
impl InputPartDescriptor
Sourcepub fn new(
modality: InputModality,
payload_kind: InputPayloadKind,
payload: InputTensorIdentity,
metadata: impl IntoIterator<Item = (InputMetadataKey, InputTensorIdentity)>,
) -> Result<Self, PreparedInputError>
pub fn new( modality: InputModality, payload_kind: InputPayloadKind, payload: InputTensorIdentity, metadata: impl IntoIterator<Item = (InputMetadataKey, InputTensorIdentity)>, ) -> Result<Self, PreparedInputError>
Validates modality/payload compatibility and unique typed metadata.
Sourcepub fn new_with_extents(
modality: InputModality,
payload_kind: InputPayloadKind,
payload: InputTensorIdentity,
metadata: impl IntoIterator<Item = (InputMetadataKey, InputTensorIdentity)>,
extents: impl IntoIterator<Item = InputExtent>,
) -> Result<Self, PreparedInputError>
pub fn new_with_extents( modality: InputModality, payload_kind: InputPayloadKind, payload: InputTensorIdentity, metadata: impl IntoIterator<Item = (InputMetadataKey, InputTensorIdentity)>, extents: impl IntoIterator<Item = InputExtent>, ) -> Result<Self, PreparedInputError>
Validates tensor metadata plus host-known execution extents.
Sourcepub const fn modality(&self) -> InputModality
pub const fn modality(&self) -> InputModality
Part modality.
Sourcepub const fn payload_kind(&self) -> InputPayloadKind
pub const fn payload_kind(&self) -> InputPayloadKind
Primary tensor role.
Sourcepub const fn payload(&self) -> &InputTensorIdentity
pub const fn payload(&self) -> &InputTensorIdentity
Primary tensor identity.
Sourcepub const fn metadata(&self) -> &BTreeMap<InputMetadataKey, InputTensorIdentity>
pub const fn metadata(&self) -> &BTreeMap<InputMetadataKey, InputTensorIdentity>
Typed metadata identities in stable key order.
Sourcepub fn extents(&self) -> impl ExactSizeIterator<Item = InputExtent> + '_
pub fn extents(&self) -> impl ExactSizeIterator<Item = InputExtent> + '_
Host-known execution extents in stable wire order.
Sourcepub fn metadata_value(
&self,
key: InputMetadataKey,
) -> Option<&InputTensorIdentity>
pub fn metadata_value( &self, key: InputMetadataKey, ) -> Option<&InputTensorIdentity>
Looks up one typed metadata identity.
Sourcepub fn require_metadata(
&self,
part: usize,
key: InputMetadataKey,
) -> Result<&InputTensorIdentity, PreparedInputError>
pub fn require_metadata( &self, part: usize, key: InputMetadataKey, ) -> Result<&InputTensorIdentity, PreparedInputError>
Requires metadata selected by family policy.
Trait Implementations§
Source§impl Clone for InputPartDescriptor
impl Clone for InputPartDescriptor
Source§fn clone(&self) -> InputPartDescriptor
fn clone(&self) -> InputPartDescriptor
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 InputPartDescriptor
impl Debug for InputPartDescriptor
Source§impl<'de> Deserialize<'de> for InputPartDescriptor
impl<'de> Deserialize<'de> for InputPartDescriptor
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
impl Eq for InputPartDescriptor
Source§impl PartialEq for InputPartDescriptor
impl PartialEq for InputPartDescriptor
Source§impl Serialize for InputPartDescriptor
impl Serialize for InputPartDescriptor
impl StructuralPartialEq for InputPartDescriptor
Auto Trait Implementations§
impl Freeze for InputPartDescriptor
impl RefUnwindSafe for InputPartDescriptor
impl Send for InputPartDescriptor
impl Sync for InputPartDescriptor
impl Unpin for InputPartDescriptor
impl UnsafeUnpin for InputPartDescriptor
impl UnwindSafe for InputPartDescriptor
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