pub struct ResourceClient<K> { /* private fields */ }Expand description
A client for interacting with the data in a specific resource stored as a child element of a VEN on the VTN.
To retrieve or create a resource, refer to the VenClient.
Implementations§
Source§impl<K: ClientKind> ResourceClient<K>
impl<K: ClientKind> ResourceClient<K>
Sourcepub fn id(&self) -> &ResourceId
pub fn id(&self) -> &ResourceId
Get the resource ID
Sourcepub fn created_date_time(&self) -> DateTime<Utc>
pub fn created_date_time(&self) -> DateTime<Utc>
Get the time the resource 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 resource was last updated on the VTN
Sourcepub fn content(&self) -> &BlResourceRequest
pub fn content(&self) -> &BlResourceRequest
Read the content of the resource
Sourcepub fn content_mut(&mut self) -> &mut BlResourceRequest
pub fn content_mut(&mut self) -> &mut BlResourceRequest
Modify the data of the resource.
Make sure to call update
after your modifications to store them on the VTN.
Trait Implementations§
Source§impl<K: Clone> Clone for ResourceClient<K>
impl<K: Clone> Clone for ResourceClient<K>
Source§fn clone(&self) -> ResourceClient<K>
fn clone(&self) -> ResourceClient<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 ResourceClient<K>
impl<K> !UnwindSafe for ResourceClient<K>
impl<K> Freeze for ResourceClient<K>
impl<K> Send for ResourceClient<K>
impl<K> Sync for ResourceClient<K>
impl<K> Unpin for ResourceClient<K>
impl<K> UnsafeUnpin for ResourceClient<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