pub struct User {
pub id: u64,
pub name: Option<String>,
pub sortable_name: Option<String>,
pub short_name: Option<String>,
pub sis_user_id: Option<String>,
pub login_id: Option<String>,
pub email: Option<String>,
pub avatar_url: Option<String>,
pub locale: Option<String>,
pub last_login: Option<DateTime<Utc>>,
pub time_zone: Option<String>,
pub bio: Option<String>,
/* private fields */
}Expand description
A Canvas user.
Fields§
§id: u64§name: Option<String>§sortable_name: Option<String>§short_name: Option<String>§sis_user_id: Option<String>§login_id: Option<String>§email: Option<String>§avatar_url: Option<String>§locale: Option<String>§last_login: Option<DateTime<Utc>>§time_zone: Option<String>§bio: Option<String>Implementations§
Source§impl User
impl User
Sourcepub fn get_courses(&self) -> PageStream<Course>
pub fn get_courses(&self) -> PageStream<Course>
Sourcepub fn get_enrollments(&self) -> PageStream<Enrollment>
pub fn get_enrollments(&self) -> PageStream<Enrollment>
Sourcepub fn get_communication_channels(&self) -> PageStream<CommunicationChannel>
pub fn get_communication_channels(&self) -> PageStream<CommunicationChannel>
Stream all communication channels for this user.
§Canvas API
GET /api/v1/users/:id/communication_channels
Sourcepub async fn create_communication_channel(
&self,
address: &str,
channel_type: &str,
) -> Result<CommunicationChannel>
pub async fn create_communication_channel( &self, address: &str, channel_type: &str, ) -> Result<CommunicationChannel>
Create a communication channel for this user.
address is the email address, phone number, etc.
channel_type is "email", "sms", "push", etc.
§Canvas API
POST /api/v1/users/:id/communication_channels
Trait Implementations§
Source§impl<'de> Deserialize<'de> for User
impl<'de> Deserialize<'de> for User
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 User
impl !RefUnwindSafe for User
impl Send for User
impl Sync for User
impl Unpin for User
impl UnsafeUnpin for User
impl !UnwindSafe for User
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