pub struct ReportClient { /* private fields */ }Expand description
Client to manage the data of a specific report
Can be created by a EventClient
let client = Client::with_url("https://your-vtn.com".try_into().unwrap(), None);
let event = client.get_event_by_id(&"event-1".parse().unwrap()).await.unwrap();
// retrieve all reports in that specific event, optionally filtered by the client name
let mut reports = event.get_report_list(Some("client-name")).await.unwrap();
let mut report = reports.remove(0);
// change report name
report.content_mut().report_name = Some("new-report-name".to_string());
report.update().await.unwrap()Implementations§
Source§impl ReportClient
impl ReportClient
Sourcepub fn created_date_time(&self) -> &DateTime<Utc>
pub fn created_date_time(&self) -> &DateTime<Utc>
Get the time the report was created on the VTN
Sourcepub fn modification_date_time(&self) -> &DateTime<Utc>
pub fn modification_date_time(&self) -> &DateTime<Utc>
Get the time the report was last modified on the VTN
Sourcepub fn content(&self) -> &ReportContent
pub fn content(&self) -> &ReportContent
Read the data of the report
Sourcepub fn content_mut(&mut self) -> &mut ReportContent
pub fn content_mut(&mut self) -> &mut ReportContent
Modify the data of the report.
Make sure to call update
after your modifications to store them on the VTN
Trait Implementations§
Source§impl Clone for ReportClient
impl Clone for ReportClient
Source§fn clone(&self) -> ReportClient
fn clone(&self) -> ReportClient
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ReportClient
impl !RefUnwindSafe for ReportClient
impl Send for ReportClient
impl Sync for ReportClient
impl Unpin for ReportClient
impl !UnwindSafe for ReportClient
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