pub struct AddOnContext {
pub course_id: Option<String>,
pub item_id: Option<String>,
pub post_id: Option<String>,
pub student_context: Option<StudentContext>,
pub supports_student_work: Option<bool>,
pub teacher_context: Option<TeacherContext>,
}
Expand description
Attachment-relevant metadata for Classroom add-ons in the context of a specific post.
§Activities
This type is used in activities, which are methods you may call on this type or where this type is involved in. The list links the activity name, along with information about where it is used (one of request and response).
- announcements get add on context courses (response)
- course work get add on context courses (response)
- course work materials get add on context courses (response)
- posts get add on context courses (response)
Fields§
§course_id: Option<String>
Immutable. Identifier of the course.
item_id: Option<String>
Immutable. Identifier of the announcement, courseWork, or courseWorkMaterial under which the attachment is attached.
post_id: Option<String>
Immutable. Deprecated, use item_id instead.
student_context: Option<StudentContext>
Add-on context corresponding to the requesting user’s role as a student. Its presence implies that the requesting user is a student in the course.
supports_student_work: Option<bool>
Optional. Whether the post allows the teacher to see student work and passback grades.
teacher_context: Option<TeacherContext>
Add-on context corresponding to the requesting user’s role as a teacher. Its presence implies that the requesting user is a teacher in the course.
Trait Implementations§
Source§impl Clone for AddOnContext
impl Clone for AddOnContext
Source§fn clone(&self) -> AddOnContext
fn clone(&self) -> AddOnContext
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for AddOnContext
impl Debug for AddOnContext
Source§impl Default for AddOnContext
impl Default for AddOnContext
Source§fn default() -> AddOnContext
fn default() -> AddOnContext
Source§impl<'de> Deserialize<'de> for AddOnContext
impl<'de> Deserialize<'de> for AddOnContext
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>,
Source§impl Serialize for AddOnContext
impl Serialize for AddOnContext
impl ResponseResult for AddOnContext
Auto Trait Implementations§
impl Freeze for AddOnContext
impl RefUnwindSafe for AddOnContext
impl Send for AddOnContext
impl Sync for AddOnContext
impl Unpin for AddOnContext
impl UnwindSafe for AddOnContext
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more