pub trait TestActor<APP>:
DBProvider
+ Agent<RcApp = Result<Arc<APP>, SimErrorAny>>
+ Debug{
Show 21 methods
// Required methods
fn progress(&self) -> Result<Arc<Option<ProgressBar>>, SimError>;
fn current_day(&self) -> i32;
fn set_title(&self, title: &ScriptTitle) -> Result<(), SimError>;
fn prelude(&self) -> Result<(), SimError>;
fn set_current_day<'life0, 'async_trait>(
&'life0 self,
day: i32,
) -> Pin<Box<dyn Future<Output = Result<(), SimError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn add_customer<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
db: &'life1 DatabaseConnection,
customer: &'life2 Customer,
) -> Pin<Box<dyn Future<Output = Result<(), SimError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn add_inventory_record<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
db: &'life1 DatabaseConnection,
inventory_record: &'life2 InventoryRecord,
) -> Pin<Box<dyn Future<Output = Result<(), SimError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn add_order<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
db: &'life1 DatabaseConnection,
order: &'life2 Order,
) -> Pin<Box<dyn Future<Output = Result<(), SimError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn add_product<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
db: &'life1 DatabaseConnection,
product: &'life2 Product,
) -> Pin<Box<dyn Future<Output = Result<(), SimError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn add_session<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
db: &'life1 DatabaseConnection,
session: &'life2 Session,
) -> Pin<Box<dyn Future<Output = Result<(), SimError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn check_inventory<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
db: &'life1 DatabaseConnection,
product_id: i32,
stock: i64,
comment: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), SimError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn update_inventory_record<'life0, 'life1, 'async_trait>(
&'life0 self,
db: &'life1 DatabaseConnection,
product_id: i32,
quantity: i64,
) -> Pin<Box<dyn Future<Output = Result<(), SimError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn collect_sessions<'life0, 'life1, 'async_trait>(
&'life0 self,
db: &'life1 DatabaseConnection,
) -> Pin<Box<dyn Future<Output = Result<(), SimError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn update_order<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
db: &'life1 DatabaseConnection,
order: &'life2 Order,
) -> Pin<Box<dyn Future<Output = Result<(), SimError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn update_product_view_count<'life0, 'life1, 'async_trait>(
&'life0 self,
db: &'life1 DatabaseConnection,
product_id: i32,
) -> Pin<Box<dyn Future<Output = Result<(), SimError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn update_session<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
db: &'life1 DatabaseConnection,
session: &'life2 Session,
) -> Pin<Box<dyn Future<Output = Result<(), SimError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn step_complete<'life0, 'life1, 'async_trait>(
&'life0 self,
db: &'life1 DatabaseConnection,
step_num: usize,
) -> Pin<Box<dyn Future<Output = Result<(), SimError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
// Provided methods
fn inv_rec_compare(
&self,
inventory_record: &Option<InventoryRecord>,
product_id: i32,
stock: i64,
comment: &str,
) -> Result<(), SimError> { ... }
fn act<'life0, 'life1, 'async_trait>(
&'life0 self,
screenplay: &'life1 [Step],
) -> Pin<Box<dyn Future<Output = Result<(), SimError>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn curtain_call<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), SimError>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn collect_session_stubs<'life0, 'life1, 'async_trait>(
&'life0 self,
db: &'life1 DatabaseConnection,
) -> Pin<Box<dyn Future<Output = Result<(), SimError>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
}Required Methods§
fn progress(&self) -> Result<Arc<Option<ProgressBar>>, SimError>
fn current_day(&self) -> i32
fn set_title(&self, title: &ScriptTitle) -> Result<(), SimError>
fn prelude(&self) -> Result<(), SimError>
fn set_current_day<'life0, 'async_trait>(
&'life0 self,
day: i32,
) -> Pin<Box<dyn Future<Output = Result<(), SimError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn add_customer<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
db: &'life1 DatabaseConnection,
customer: &'life2 Customer,
) -> Pin<Box<dyn Future<Output = Result<(), SimError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn add_inventory_record<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
db: &'life1 DatabaseConnection,
inventory_record: &'life2 InventoryRecord,
) -> Pin<Box<dyn Future<Output = Result<(), SimError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn add_order<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
db: &'life1 DatabaseConnection,
order: &'life2 Order,
) -> Pin<Box<dyn Future<Output = Result<(), SimError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn add_product<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
db: &'life1 DatabaseConnection,
product: &'life2 Product,
) -> Pin<Box<dyn Future<Output = Result<(), SimError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn add_session<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
db: &'life1 DatabaseConnection,
session: &'life2 Session,
) -> Pin<Box<dyn Future<Output = Result<(), SimError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn check_inventory<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
db: &'life1 DatabaseConnection,
product_id: i32,
stock: i64,
comment: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), SimError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn update_inventory_record<'life0, 'life1, 'async_trait>(
&'life0 self,
db: &'life1 DatabaseConnection,
product_id: i32,
quantity: i64,
) -> Pin<Box<dyn Future<Output = Result<(), SimError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn collect_sessions<'life0, 'life1, 'async_trait>(
&'life0 self,
db: &'life1 DatabaseConnection,
) -> Pin<Box<dyn Future<Output = Result<(), SimError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update_order<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
db: &'life1 DatabaseConnection,
order: &'life2 Order,
) -> Pin<Box<dyn Future<Output = Result<(), SimError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn update_product_view_count<'life0, 'life1, 'async_trait>(
&'life0 self,
db: &'life1 DatabaseConnection,
product_id: i32,
) -> Pin<Box<dyn Future<Output = Result<(), SimError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update_session<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
db: &'life1 DatabaseConnection,
session: &'life2 Session,
) -> Pin<Box<dyn Future<Output = Result<(), SimError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn step_complete<'life0, 'life1, 'async_trait>(
&'life0 self,
db: &'life1 DatabaseConnection,
step_num: usize,
) -> Pin<Box<dyn Future<Output = Result<(), SimError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Provided Methods§
fn inv_rec_compare( &self, inventory_record: &Option<InventoryRecord>, product_id: i32, stock: i64, comment: &str, ) -> Result<(), SimError>
fn act<'life0, 'life1, 'async_trait>(
&'life0 self,
screenplay: &'life1 [Step],
) -> Pin<Box<dyn Future<Output = Result<(), SimError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn curtain_call<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), SimError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Sourcefn collect_session_stubs<'life0, 'life1, 'async_trait>(
&'life0 self,
db: &'life1 DatabaseConnection,
) -> Pin<Box<dyn Future<Output = Result<(), SimError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn collect_session_stubs<'life0, 'life1, 'async_trait>(
&'life0 self,
db: &'life1 DatabaseConnection,
) -> Pin<Box<dyn Future<Output = Result<(), SimError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Collect sessions that are older than the current day and have no customer ID
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.