pub struct ReportClient<K> { /* private fields */ }Expand description
Client to manage the data of a specific report
Can be created by a EventClient
let client = Client::<BusinessLogic>::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<K: ClientKind> ReportClient<K>
impl<K: ClientKind> ReportClient<K>
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) -> &ReportRequest
pub fn content(&self) -> &ReportRequest
Read the data of the report
Sourcepub fn content_mut(&mut self) -> &mut ReportRequest
pub fn content_mut(&mut self) -> &mut ReportRequest
Modify the data of the report.
Make sure to call update
after your modifications to store them on the VTN
Trait Implementations§
Source§impl<K: Clone> Clone for ReportClient<K>
impl<K: Clone> Clone for ReportClient<K>
Source§fn clone(&self) -> ReportClient<K>
fn clone(&self) -> ReportClient<K>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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<K> !RefUnwindSafe for ReportClient<K>
impl<K> !UnwindSafe for ReportClient<K>
impl<K> Freeze for ReportClient<K>
impl<K> Send for ReportClient<K>
impl<K> Sync for ReportClient<K>
impl<K> Unpin for ReportClient<K>
impl<K> UnsafeUnpin for ReportClient<K>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more