pub struct KernelMetadataBuilder { /* private fields */ }Expand description
Builder for kernel metadata.
Implementations§
Source§impl KernelMetadataBuilder
impl KernelMetadataBuilder
Sourcepub fn mode(self, mode: KernelMode) -> Self
pub fn mode(self, mode: KernelMode) -> Self
Set the kernel mode.
Sourcepub fn description(self, description: impl Into<String>) -> Self
pub fn description(self, description: impl Into<String>) -> Self
Set the description.
Sourcepub fn throughput(self, ops_per_sec: u64) -> Self
pub fn throughput(self, ops_per_sec: u64) -> Self
Set the expected throughput.
Sourcepub fn latency_us(self, latency_us: f64) -> Self
pub fn latency_us(self, latency_us: f64) -> Self
Set the target latency.
Sourcepub fn gpu_native(self, required: bool) -> Self
pub fn gpu_native(self, required: bool) -> Self
Set whether GPU-native execution is required.
Sourcepub fn build(self) -> KernelMetadata
pub fn build(self) -> KernelMetadata
Sourcepub fn try_build(self) -> Option<KernelMetadata>
pub fn try_build(self) -> Option<KernelMetadata>
Try to build the metadata.
Returns None if required fields are missing.
Trait Implementations§
Source§impl Default for KernelMetadataBuilder
impl Default for KernelMetadataBuilder
Source§fn default() -> KernelMetadataBuilder
fn default() -> KernelMetadataBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for KernelMetadataBuilder
impl RefUnwindSafe for KernelMetadataBuilder
impl Send for KernelMetadataBuilder
impl Sync for KernelMetadataBuilder
impl Unpin for KernelMetadataBuilder
impl UnwindSafe for KernelMetadataBuilder
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
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> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.