pub struct CostEstimate {
pub total_usd: f64,
pub node_costs: HashMap<String, NodeCost>,
pub category_costs: CategoryCosts,
pub token_estimates: TokenEstimates,
}Expand description
Cost breakdown for a workflow execution
Fields§
§total_usd: f64Total estimated cost in USD
node_costs: HashMap<String, NodeCost>Cost breakdown by node
category_costs: CategoryCostsCost breakdown by category
token_estimates: TokenEstimatesToken usage estimates
Implementations§
Source§impl CostEstimate
impl CostEstimate
Sourcepub fn format_summary(&self) -> String
pub fn format_summary(&self) -> String
Format cost estimate as a human-readable string
Sourcepub fn top_expensive_nodes(&self, limit: usize) -> Vec<&NodeCost>
pub fn top_expensive_nodes(&self, limit: usize) -> Vec<&NodeCost>
Get the most expensive nodes
Trait Implementations§
Source§impl Clone for CostEstimate
impl Clone for CostEstimate
Source§fn clone(&self) -> CostEstimate
fn clone(&self) -> CostEstimate
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 moreSource§impl Debug for CostEstimate
impl Debug for CostEstimate
Source§impl<'de> Deserialize<'de> for CostEstimate
impl<'de> Deserialize<'de> for CostEstimate
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 CostEstimate
impl RefUnwindSafe for CostEstimate
impl Send for CostEstimate
impl Sync for CostEstimate
impl Unpin for CostEstimate
impl UnwindSafe for CostEstimate
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