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 Agentwhere
Atomic<usize>: RefUnwindSafe,
Mutex<Vec<Agent>>: RefUnwindSafe,
NonZero<i32>: RefUnwindSafe,
Utc: RefUnwindSafe,
impl Send for Agent
impl Sync for Agent
impl Unpin for Agent
impl UnsafeUnpin for Agentwhere
*const ArcInner<AgentInner> is !null: UnsafeUnpin,
PhantomData<ArcInner<AgentInner>>: UnsafeUnpin,
impl UnwindSafe for Agentwhere
Arc<AgentInner>: UnwindSafe,
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