(mut self, callback: F)
| 620 | } |
| 621 | |
| 622 | pub fn with_get_last_model<F, Fut>(mut self, callback: F) -> Self |
| 623 | where |
| 624 | F: Fn(String) -> Fut + Send + Sync + 'static, |
| 625 | Fut: std::future::Future<Output = Result<Option<String>, ToolError>> + Send + 'static, |
| 626 | { |
| 627 | self.get_last_model = Some(Arc::new(move |session_id| Box::pin(callback(session_id)))); |
| 628 | self |
| 629 | } |
| 630 | |
| 631 | pub async fn do_get_last_model(&self) -> Option<String> { |
| 632 | if let Some(ref callback) = self.get_last_model { |
no test coverage detected