pub enum Asset {
Jig(JigResponse),
Playlist(PlaylistResponse),
Resource(ResourceResponse),
Course(CourseResponse),
}
Expand description
Asset
Variants§
Jig(JigResponse)
JIG ID associated with the module.
Playlist(PlaylistResponse)
Playlist ID associated with the module.
Resource(ResourceResponse)
Resource ID associated with the module.
Course(CourseResponse)
Course ID associated with the module.
Implementations§
Source§impl Asset
impl Asset
Sourcepub fn asset_type(&self) -> AssetType
pub fn asset_type(&self) -> AssetType
get asset type
Sourcepub fn unwrap_jig(&self) -> &JigResponse
pub fn unwrap_jig(&self) -> &JigResponse
get jig value as ref
Sourcepub fn unwrap_resource(&self) -> &ResourceResponse
pub fn unwrap_resource(&self) -> &ResourceResponse
get resource value as ref
Sourcepub fn unwrap_playlist(&self) -> &PlaylistResponse
pub fn unwrap_playlist(&self) -> &PlaylistResponse
get playlist value as ref
Sourcepub fn unwrap_course(&self) -> &CourseResponse
pub fn unwrap_course(&self) -> &CourseResponse
get course value as ref
Sourcepub fn is_playlist(&self) -> bool
pub fn is_playlist(&self) -> bool
check if is playlist
Sourcepub fn is_resource(&self) -> bool
pub fn is_resource(&self) -> bool
check if is resource
Sourcepub fn published_at(&self) -> Option<DateTime<Utc>>
pub fn published_at(&self) -> Option<DateTime<Utc>>
get id
Sourcepub fn display_name(&self) -> &String
pub fn display_name(&self) -> &String
get display_name
Sourcepub fn description(&self) -> &String
pub fn description(&self) -> &String
get description
Sourcepub fn cover(&self) -> Option<&LiteModule>
pub fn cover(&self) -> Option<&LiteModule>
get cover
Sourcepub fn privacy_level(&self) -> &PrivacyLevel
pub fn privacy_level(&self) -> &PrivacyLevel
get privacy_level
Sourcepub fn other_keywords(&self) -> &String
pub fn other_keywords(&self) -> &String
get other_keywords
Sourcepub fn translated_keywords(&self) -> &String
pub fn translated_keywords(&self) -> &String
get translated_keywords
Sourcepub fn age_ranges(&self) -> &Vec<AgeRangeId>
pub fn age_ranges(&self) -> &Vec<AgeRangeId>
get age_ranges
Sourcepub fn affiliations(&self) -> &Vec<AffiliationId>
pub fn affiliations(&self) -> &Vec<AffiliationId>
get affiliations
Sourcepub fn categories(&self) -> &Vec<CategoryId>
pub fn categories(&self) -> &Vec<CategoryId>
get categories
get author_id
get author_name
Sourcepub fn additional_resources(&self) -> &Vec<AdditionalResource>
pub fn additional_resources(&self) -> &Vec<AdditionalResource>
get additional_resources
Sourcepub fn translated_description(&self) -> &HashMap<String, String>
pub fn translated_description(&self) -> &HashMap<String, String>
get translated_description
Sourcepub fn live_up_to_date(&self) -> bool
pub fn live_up_to_date(&self) -> bool
get live_up_to_date
whether the current asset is a premium asset
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Asset
impl<'de> Deserialize<'de> for Asset
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.
Source§impl From<JigResponse> for Asset
impl From<JigResponse> for Asset
Source§fn from(jig: JigResponse) -> Self
fn from(jig: JigResponse) -> Self
Converts to this type from the input type.
Source§impl From<PlaylistResponse> for Asset
impl From<PlaylistResponse> for Asset
Source§fn from(playlist: PlaylistResponse) -> Self
fn from(playlist: PlaylistResponse) -> Self
Converts to this type from the input type.
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 Asset
impl RefUnwindSafe for Asset
impl Send for Asset
impl Sync for Asset
impl Unpin for Asset
impl UnwindSafe for Asset
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