pub struct Agent(/* private fields */);Implementations§
Source§impl Agent
impl Agent
Sourcepub fn new(
parent: Option<&Agent>,
id: &str,
bible: &str,
repository: Repository,
status: Option<AgentStatus>,
) -> Agent
pub fn new( parent: Option<&Agent>, id: &str, bible: &str, repository: Repository, status: Option<AgentStatus>, ) -> Agent
A new agent under parent, which gains it as a child. status defaults to IDLE.
pub fn parent(&self) -> Option<Agent>
pub fn id(&self) -> &str
pub fn children(&self) -> Vec<Agent>
pub fn bible(&self) -> &str
pub fn status(&self) -> AgentStatus
pub fn repository(&self) -> &Repository
pub async fn ticket(&self, _issue: &str) -> Result<Ticket>
pub async fn delete(&self) -> Result<()>
pub async fn balance( &self, _query: TimeRangeOrPage, ) -> Result<Vec<BalancePoint>>
pub async fn contracts(&self, _query: TimeRangeOrPage) -> Result<Vec<Contract>>
pub async fn loans(&self, _query: TimeRangeOrPage) -> Result<Vec<Loan>>
pub async fn tickets(&self, _query: TimeRangeOrPage) -> Result<Vec<Ticket>>
Trait Implementations§
Auto Trait Implementations§
impl Forget for Agent
impl Freeze for Agent
impl Move for Agent
impl RefUnwindSafe for Agent
impl Send for Agent
impl Sync for Agent
impl Unpin for Agent
impl UnsafeUnpin for Agent
impl UnwindSafe for Agent
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