pub struct ResourceResponse {
pub id: ResourceId,
pub published_at: Option<DateTime<Utc>>,
pub creator_id: Option<UserId>,
pub author_id: Option<UserId>,
pub author_name: Option<String>,
pub likes: i64,
pub views: i64,
pub live_up_to_date: bool,
pub is_liked: bool,
pub resource_data: ResourceData,
pub admin_data: ResourceAdminData,
}
Expand description
The response returned when a request for GET
ing a resource is successful.
Fields§
§id: ResourceId
The ID of the Resource.
published_at: Option<DateTime<Utc>>
When (if at all) the Resource has published a draft to live.
creator_id: Option<UserId>
The ID of the Resource’s original creator (None
if unknown).
The current author
The author’s name, as “{given_name} {family_name}”.
likes: i64
Number of likes on Resource
views: i64
Number of views for a Resource
live_up_to_date: bool
Live is current to Draft
is_liked: bool
Liked by current user.
resource_data: ResourceData
The data of the requested Resource.
admin_data: ResourceAdminData
Admin data for Resource
Trait Implementations§
Source§impl Clone for ResourceResponse
impl Clone for ResourceResponse
Source§fn clone(&self) -> ResourceResponse
fn clone(&self) -> ResourceResponse
Returns a copy 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 moreSource§impl Debug for ResourceResponse
impl Debug for ResourceResponse
Source§impl<'de> Deserialize<'de> for ResourceResponse
impl<'de> Deserialize<'de> for ResourceResponse
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<ResourceResponse> for Asset
impl From<ResourceResponse> for Asset
Source§fn from(resource: ResourceResponse) -> Self
fn from(resource: ResourceResponse) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ResourceResponse
impl RefUnwindSafe for ResourceResponse
impl Send for ResourceResponse
impl Sync for ResourceResponse
impl Unpin for ResourceResponse
impl UnwindSafe for ResourceResponse
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