pub struct CourseResponse {
pub id: CourseId,
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 plays: i64,
pub live_up_to_date: bool,
pub course_data: CourseData,
pub admin_data: CourseAdminData,
}
Expand description
The response returned when a request for GET
ing a Course is successful.
Fields§
§id: CourseId
The ID of the Course.
published_at: Option<DateTime<Utc>>
When (if at all) the Course has published a draft to live.
creator_id: Option<UserId>
The ID of the Course’s original creator (None
if unknown).
The current author
The author’s name, as “{given_name} {family_name}”.
likes: i64
Number of likes on Course
plays: i64
Number of plays Course
live_up_to_date: bool
Live is current to Draft
course_data: CourseData
The data of the requested Course.
admin_data: CourseAdminData
Admin data for a course
Trait Implementations§
Source§impl Clone for CourseResponse
impl Clone for CourseResponse
Source§fn clone(&self) -> CourseResponse
fn clone(&self) -> CourseResponse
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 CourseResponse
impl Debug for CourseResponse
Source§impl<'de> Deserialize<'de> for CourseResponse
impl<'de> Deserialize<'de> for CourseResponse
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<CourseResponse> for Asset
impl From<CourseResponse> for Asset
Source§fn from(course: CourseResponse) -> Self
fn from(course: CourseResponse) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for CourseResponse
impl RefUnwindSafe for CourseResponse
impl Send for CourseResponse
impl Sync for CourseResponse
impl Unpin for CourseResponse
impl UnwindSafe for CourseResponse
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