Enum trane::data::BasicAsset
source · pub enum BasicAsset {
MarkdownAsset {
path: String,
},
InlinedAsset {
content: String,
},
InlinedUniqueAsset {
content: Ustr,
},
}Expand description
An asset attached to a unit, which could be used to store instructions, or present the material introduced by a course or lesson.
Variants§
MarkdownAsset
An asset containing the path to a markdown file.
InlinedAsset
An asset containing its content as a string.
InlinedUniqueAsset
An asset containing its content as a unique string. Useful for generating assets that are replicated across many units.
Trait Implementations§
source§impl Clone for BasicAsset
impl Clone for BasicAsset
source§fn clone(&self) -> BasicAsset
fn clone(&self) -> BasicAsset
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 BasicAsset
impl Debug for BasicAsset
source§impl<'de> Deserialize<'de> for BasicAsset
impl<'de> Deserialize<'de> for BasicAsset
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<BasicAsset> for BasicAsset
impl From<BasicAsset> for BasicAsset
source§fn from(basic_asset: BasicAsset) -> Self
fn from(basic_asset: BasicAsset) -> Self
Converts to this type from the input type.
source§impl From<BasicAsset> for BasicAsset
impl From<BasicAsset> for BasicAsset
source§fn from(basic_asset: BasicAsset) -> Self
fn from(basic_asset: BasicAsset) -> Self
Converts to this type from the input type.
source§impl NormalizePaths for BasicAsset
impl NormalizePaths for BasicAsset
source§fn normalize_paths(&self, working_dir: &Path) -> Result<Self>
fn normalize_paths(&self, working_dir: &Path) -> Result<Self>
Converts all relative paths in the object to absolute paths.
source§impl PartialEq for BasicAsset
impl PartialEq for BasicAsset
source§fn eq(&self, other: &BasicAsset) -> bool
fn eq(&self, other: &BasicAsset) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl Serialize for BasicAsset
impl Serialize for BasicAsset
source§impl VerifyPaths for BasicAsset
impl VerifyPaths for BasicAsset
impl StructuralPartialEq for BasicAsset
Auto Trait Implementations§
impl RefUnwindSafe for BasicAsset
impl Send for BasicAsset
impl Sync for BasicAsset
impl Unpin for BasicAsset
impl UnwindSafe for BasicAsset
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<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.