Struct MemoryEstimate
pub struct MemoryEstimate {
pub primary_bytes: u64,
pub auxiliary_bytes: u64,
pub peak_bytes: u64,
pub confidence: f32,
}Expand description
Memory estimate for a workload.
Fields§
§primary_bytes: u64Primary memory requirement (main data structures).
auxiliary_bytes: u64Auxiliary memory (temporary buffers, working space).
peak_bytes: u64Peak memory usage (during execution).
confidence: f32Confidence level (0.0-1.0) of this estimate.
Implementations§
§impl MemoryEstimate
impl MemoryEstimate
pub fn new() -> MemoryEstimate
pub fn new() -> MemoryEstimate
Creates a new empty memory estimate.
pub fn primary(bytes: u64) -> MemoryEstimate
pub fn primary(bytes: u64) -> MemoryEstimate
Creates an estimate with only primary memory.
pub fn with_primary(self, bytes: u64) -> MemoryEstimate
pub fn with_primary(self, bytes: u64) -> MemoryEstimate
Builder method to set primary memory.
pub fn with_auxiliary(self, bytes: u64) -> MemoryEstimate
pub fn with_auxiliary(self, bytes: u64) -> MemoryEstimate
Builder method to set auxiliary memory.
pub fn with_peak(self, bytes: u64) -> MemoryEstimate
pub fn with_peak(self, bytes: u64) -> MemoryEstimate
Builder method to set peak memory.
pub fn with_confidence(self, confidence: f32) -> MemoryEstimate
pub fn with_confidence(self, confidence: f32) -> MemoryEstimate
Builder method to set confidence.
pub fn total_bytes(&self) -> u64
pub fn total_bytes(&self) -> u64
Total estimated memory in bytes.
pub fn combine(&self, other: &MemoryEstimate) -> MemoryEstimate
pub fn combine(&self, other: &MemoryEstimate) -> MemoryEstimate
Combines two estimates (for composite workloads).
pub fn scale(&self, factor: f64) -> MemoryEstimate
pub fn scale(&self, factor: f64) -> MemoryEstimate
Scales the estimate by a factor.
Trait Implementations§
§impl Clone for MemoryEstimate
impl Clone for MemoryEstimate
§fn clone(&self) -> MemoryEstimate
fn clone(&self) -> MemoryEstimate
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for MemoryEstimate
impl Debug for MemoryEstimate
§impl Default for MemoryEstimate
impl Default for MemoryEstimate
§fn default() -> MemoryEstimate
fn default() -> MemoryEstimate
Returns the “default value” for a type. Read more
§impl PartialEq for MemoryEstimate
impl PartialEq for MemoryEstimate
impl Copy for MemoryEstimate
impl StructuralPartialEq for MemoryEstimate
Auto Trait Implementations§
impl Freeze for MemoryEstimate
impl RefUnwindSafe for MemoryEstimate
impl Send for MemoryEstimate
impl Sync for MemoryEstimate
impl Unpin for MemoryEstimate
impl UnwindSafe for MemoryEstimate
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
§fn deserialize(
&self,
deserializer: &mut D,
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize( &self, deserializer: &mut D, ) -> Result<With<T, W>, <D as Fallible>::Error>
Deserializes using the given deserializer
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§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.