pub enum TreasurySubcommand {
Open {
manager: String,
cap: String,
},
Allot {
manager: String,
to: String,
amount: u64,
},
Reallocate {
manager: String,
from: String,
to: String,
amount: u64,
},
Status {
manager: String,
},
Credit {
to: String,
settlement: PathBuf,
claim_cents: Option<u64>,
},
Subdelegate {
manager: String,
parent: String,
child: String,
amount: u64,
},
Reclaim {
manager: String,
agent: String,
},
}Expand description
Treasury subcommands.
Variants§
Open
Establish a manager’s aggregate cap.
Allot
Commit a slice of the cap to a sub-agent (refused if Σ + amount > cap).
Reallocate
Move a slice from one sub-agent to another (constant-sum; refused on underflow).
Status
Report parent cap, committed, free pool, slices, and the aggregate invariant.
Credit
Credit a recorded x402 inbound settlement to a sub-agent’s verifiable P&L.
Subdelegate
Sub-delegate a child slice from a sub-agent (Σ children ≤ the parent’s slice).
Reclaim
Reclaim a revoked sub-agent’s slice back to the free pool (idempotent).
Trait Implementations§
Source§impl Clone for TreasurySubcommand
impl Clone for TreasurySubcommand
Source§fn clone(&self) -> TreasurySubcommand
fn clone(&self) -> TreasurySubcommand
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 TreasurySubcommand
impl Debug for TreasurySubcommand
Source§impl FromArgMatches for TreasurySubcommand
impl FromArgMatches for TreasurySubcommand
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
Assign values from
ArgMatches to self.Source§fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
Assign values from
ArgMatches to self.Source§impl Subcommand for TreasurySubcommand
impl Subcommand for TreasurySubcommand
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Append to
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Test whether
Self can parse a specific subcommandAuto Trait Implementations§
impl Freeze for TreasurySubcommand
impl RefUnwindSafe for TreasurySubcommand
impl Send for TreasurySubcommand
impl Sync for TreasurySubcommand
impl Unpin for TreasurySubcommand
impl UnsafeUnpin for TreasurySubcommand
impl UnwindSafe for TreasurySubcommand
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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