pub struct StageCandidate {
pub name: String,
pub overhead_tokens: u32,
pub savings_tokens: u32,
pub applicable: bool,
}Expand description
A stage candidate with its estimated cost and benefit.
Fields§
§name: StringStage name.
overhead_tokens: u32Estimated overhead in tokens (headers, legends, markers).
savings_tokens: u32Estimated savings in tokens.
applicable: boolWhether this stage is applicable to the content type.
Implementations§
Source§impl StageCandidate
impl StageCandidate
Sourcepub fn net_benefit(&self) -> i32
pub fn net_benefit(&self) -> i32
Net benefit: savings minus overhead. Negative means the stage hurts.
Trait Implementations§
Source§impl Clone for StageCandidate
impl Clone for StageCandidate
Source§fn clone(&self) -> StageCandidate
fn clone(&self) -> StageCandidate
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 moreAuto Trait Implementations§
impl Freeze for StageCandidate
impl RefUnwindSafe for StageCandidate
impl Send for StageCandidate
impl Sync for StageCandidate
impl Unpin for StageCandidate
impl UnsafeUnpin for StageCandidate
impl UnwindSafe for StageCandidate
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