pub struct ForesterHttpApi {
pub base: String,
}Expand description
The api to Forester instance of http server It is used to get access to the blackboard and to trace events.
#Example
use forester_http::api::ForesterHttpApi;
async fn main() {
let api = ForesterHttpApi::new("http://localhost:10000".to_string());
let _ = reqwest::get(api.print_trace()).await;
}
Fields§
§base: StringThe base url of the Forester instance. Typically it is http://localhost:10000
Implementations§
Source§impl ForesterHttpApi
impl ForesterHttpApi
Sourcepub fn trace_event(&self) -> String
pub fn trace_event(&self) -> String
creates a new trace event
Sourcepub fn print_trace(&self) -> String
pub fn print_trace(&self) -> String
prints the trace or if the file is big the tail of the trace (last 100 lines)
pub fn new(base: String) -> Self
Auto Trait Implementations§
impl Freeze for ForesterHttpApi
impl RefUnwindSafe for ForesterHttpApi
impl Send for ForesterHttpApi
impl Sync for ForesterHttpApi
impl Unpin for ForesterHttpApi
impl UnwindSafe for ForesterHttpApi
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