pub struct PollSession {
pub id: u64,
pub poll_id: Option<u64>,
pub course_id: Option<u64>,
pub course_section_id: Option<u64>,
pub is_published: Option<bool>,
pub has_public_results: Option<bool>,
pub results: Option<Value>,
/* private fields */
}Expand description
A session of a Canvas poll (tied to a specific course/section).
Fields§
§id: u64§poll_id: Option<u64>§course_id: Option<u64>§course_section_id: Option<u64>§is_published: Option<bool>§has_public_results: Option<bool>§results: Option<Value>Implementations§
Source§impl PollSession
impl PollSession
Sourcepub async fn update(&self, params: PollSessionParams) -> Result<PollSession>
pub async fn update(&self, params: PollSessionParams) -> Result<PollSession>
Sourcepub async fn open(&self) -> Result<PollSession>
pub async fn open(&self) -> Result<PollSession>
Sourcepub async fn close(&self) -> Result<PollSession>
pub async fn close(&self) -> Result<PollSession>
Close this poll session to responses.
§Canvas API
GET /api/v1/polls/:poll_id/poll_sessions/:id/close
Sourcepub async fn get_submission(&self, submission_id: u64) -> Result<PollSubmission>
pub async fn get_submission(&self, submission_id: u64) -> Result<PollSubmission>
Fetch a single poll submission.
§Canvas API
GET /api/v1/polls/:poll_id/poll_sessions/:poll_session_id/poll_submissions/:id
Sourcepub async fn create_submission(
&self,
params: PollSubmissionParams,
) -> Result<PollSubmission>
pub async fn create_submission( &self, params: PollSubmissionParams, ) -> Result<PollSubmission>
Create a poll submission for this session.
§Canvas API
POST /api/v1/polls/:poll_id/poll_sessions/:poll_session_id/poll_submissions
Trait Implementations§
Source§impl Clone for PollSession
impl Clone for PollSession
Source§fn clone(&self) -> PollSession
fn clone(&self) -> PollSession
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 PollSession
impl Debug for PollSession
Source§impl<'de> Deserialize<'de> for PollSession
impl<'de> Deserialize<'de> for PollSession
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 PollSession
impl !RefUnwindSafe for PollSession
impl Send for PollSession
impl Sync for PollSession
impl Unpin for PollSession
impl UnsafeUnpin for PollSession
impl !UnwindSafe for PollSession
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