Struct headless_lms_models::pages::NewCoursePage
source · pub struct NewCoursePage<'a> {
pub content: Vec<GutenbergBlock>,
pub course_id: Uuid,
pub order_number: i32,
pub title: &'a str,
pub hidden: bool,
pub url_path: &'a str,
}
Fields§
§content: Vec<GutenbergBlock>
§course_id: Uuid
§order_number: i32
§title: &'a str
§url_path: &'a str
Implementations§
source§impl<'a> NewCoursePage<'a>
impl<'a> NewCoursePage<'a>
sourcepub fn new(
course_id: Uuid,
order_number: i32,
url_path: &'a str,
title: &'a str
) -> Self
pub fn new( course_id: Uuid, order_number: i32, url_path: &'a str, title: &'a str ) -> Self
Creates NewCoursePage
with provided values that is public by default.
sourcepub fn followed_by(&self, url_path: &'a str, title: &'a str) -> Self
pub fn followed_by(&self, url_path: &'a str, title: &'a str) -> Self
Creates a new NewCoursePage
for the same course as this one and increments the page number.
sourcepub fn set_content(self, content: Vec<GutenbergBlock>) -> Self
pub fn set_content(self, content: Vec<GutenbergBlock>) -> Self
Sets the content of this page.
Sets the hidden status of this page.
Trait Implementations§
source§impl<'a> Debug for NewCoursePage<'a>
impl<'a> Debug for NewCoursePage<'a>
source§impl<'de: 'a, 'a> Deserialize<'de> for NewCoursePage<'a>
impl<'de: 'a, 'a> Deserialize<'de> for NewCoursePage<'a>
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
Auto Trait Implementations§
impl<'a> RefUnwindSafe for NewCoursePage<'a>
impl<'a> Send for NewCoursePage<'a>
impl<'a> Sync for NewCoursePage<'a>
impl<'a> Unpin for NewCoursePage<'a>
impl<'a> UnwindSafe for NewCoursePage<'a>
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