pub enum AgentPricingModel {
Free,
PerExecution {
price: u128,
},
PerToken {
price_per_token: u128,
},
Subscription {
monthly_rate: u128,
},
RevenueShare {
creator_share_bps: u16,
},
}Expand description
Pricing model for using an agent template
Variants§
Free
Free to use
PerExecution
Fixed price per execution
PerToken
Price per token processed
Subscription
Subscription-based (monthly rate in TNZO)
Revenue sharing with the template creator
Implementations§
Source§impl AgentPricingModel
impl AgentPricingModel
Sourcepub fn fee_for_invocation(&self, tokens: u64) -> u128
pub fn fee_for_invocation(&self, tokens: u64) -> u128
Gross fee (in TNZO base units) charged for a single invocation.
For PerToken, tokens is multiplied by the unit price.
Subscription and RevenueShare return 0 here — they are
settled out-of-band (subscription channel, downstream revenue split).
Trait Implementations§
Source§impl Clone for AgentPricingModel
impl Clone for AgentPricingModel
Source§fn clone(&self) -> AgentPricingModel
fn clone(&self) -> AgentPricingModel
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 AgentPricingModel
impl Debug for AgentPricingModel
Source§impl Default for AgentPricingModel
impl Default for AgentPricingModel
Source§fn default() -> AgentPricingModel
fn default() -> AgentPricingModel
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for AgentPricingModel
impl<'de> Deserialize<'de> for AgentPricingModel
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 AgentPricingModel
Source§impl PartialEq for AgentPricingModel
impl PartialEq for AgentPricingModel
Source§fn eq(&self, other: &AgentPricingModel) -> bool
fn eq(&self, other: &AgentPricingModel) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for AgentPricingModel
impl Serialize for AgentPricingModel
impl StructuralPartialEq for AgentPricingModel
Auto Trait Implementations§
impl Freeze for AgentPricingModel
impl RefUnwindSafe for AgentPricingModel
impl Send for AgentPricingModel
impl Sync for AgentPricingModel
impl Unpin for AgentPricingModel
impl UnsafeUnpin for AgentPricingModel
impl UnwindSafe for AgentPricingModel
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