pub struct Section {
pub id: u64,
pub course_id: Option<u64>,
pub name: Option<String>,
pub sis_section_id: Option<String>,
pub integration_id: Option<String>,
pub sis_import_id: Option<u64>,
pub start_at: Option<DateTime<Utc>>,
pub end_at: Option<DateTime<Utc>>,
pub restrict_enrollments_to_section_dates: Option<bool>,
pub nonxlist_course_id: Option<u64>,
pub total_students: Option<u64>,
/* private fields */
}Expand description
A section within a Canvas course.
Fields§
§id: u64§course_id: Option<u64>§name: Option<String>§sis_section_id: Option<String>§integration_id: Option<String>§sis_import_id: Option<u64>§start_at: Option<DateTime<Utc>>§end_at: Option<DateTime<Utc>>§restrict_enrollments_to_section_dates: Option<bool>§nonxlist_course_id: Option<u64>§total_students: Option<u64>Implementations§
Source§impl Section
impl Section
Sourcepub async fn edit(&self, params: UpdateSectionParams) -> Result<Section>
pub async fn edit(&self, params: UpdateSectionParams) -> Result<Section>
Sourcepub async fn enroll_user(&self, params: EnrollUserParams) -> Result<Enrollment>
pub async fn enroll_user(&self, params: EnrollUserParams) -> Result<Enrollment>
Sourcepub fn get_enrollments(&self) -> PageStream<Enrollment>
pub fn get_enrollments(&self) -> PageStream<Enrollment>
Sourcepub async fn cross_list_section(&self, new_course_id: u64) -> Result<Section>
pub async fn cross_list_section(&self, new_course_id: u64) -> Result<Section>
Move this section to another course (cross-list).
§Canvas API
POST /api/v1/sections/:id/crosslist/:new_course_id
Sourcepub async fn decross_list_section(&self) -> Result<Section>
pub async fn decross_list_section(&self) -> Result<Section>
Sourcepub async fn get_assignment_override(&self, assignment_id: u64) -> Result<Value>
pub async fn get_assignment_override(&self, assignment_id: u64) -> Result<Value>
Get the assignment override for a specific assignment in this section.
§Canvas API
GET /api/v1/sections/:course_section_id/assignments/:assignment_id/override
Sourcepub fn get_multiple_submissions(&self) -> PageStream<Submission>
pub fn get_multiple_submissions(&self) -> PageStream<Submission>
Stream submissions for multiple assignments in this section.
§Canvas API
GET /api/v1/sections/:section_id/students/submissions
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Section
impl<'de> Deserialize<'de> for Section
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 Freeze for Section
impl !RefUnwindSafe for Section
impl Send for Section
impl Sync for Section
impl Unpin for Section
impl UnsafeUnpin for Section
impl !UnwindSafe for Section
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