pub struct LessonUpload {
pub id: i32,
pub name: String,
pub state: bool,
pub url: String,
pub uploaded: Option<String>,
pub date: Option<DateTime<Utc>>,
pub info: Option<LessonUploadInfo>,
}Fields§
§id: i32§name: String§state: boolTrue if open and false if closed
url: String§uploaded: Option<String>§date: Option<DateTime<Utc>>§info: Option<LessonUploadInfo>Implementations§
Source§impl LessonUpload
impl LessonUpload
pub async fn get_info(&self, client: &Client) -> Result<LessonUploadInfo, Error>
Sourcepub async fn upload(
&self,
files: Vec<&Path>,
client: &Client,
) -> Result<Vec<LessonUploadFileStatus>, Error>
pub async fn upload( &self, files: Vec<&Path>, client: &Client, ) -> Result<Vec<LessonUploadFileStatus>, Error>
Takes a vector of file paths (max. 5) and uploads these files to Lanis.
LessonUpload::get_info must be called before calling this function
Trait Implementations§
Source§impl Clone for LessonUpload
impl Clone for LessonUpload
Source§fn clone(&self) -> LessonUpload
fn clone(&self) -> LessonUpload
Returns a duplicate of the value. Read more
1.0.0 · 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 LessonUpload
impl Debug for LessonUpload
Source§impl Hash for LessonUpload
impl Hash for LessonUpload
Source§impl Ord for LessonUpload
impl Ord for LessonUpload
Source§fn cmp(&self, other: &LessonUpload) -> Ordering
fn cmp(&self, other: &LessonUpload) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for LessonUpload
impl PartialEq for LessonUpload
Source§impl PartialOrd for LessonUpload
impl PartialOrd for LessonUpload
impl Eq for LessonUpload
impl StructuralPartialEq for LessonUpload
Auto Trait Implementations§
impl Freeze for LessonUpload
impl RefUnwindSafe for LessonUpload
impl Send for LessonUpload
impl Sync for LessonUpload
impl Unpin for LessonUpload
impl UnwindSafe for LessonUpload
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.