[][src]Struct epitok::event::Event

pub struct Event {
    pub code: Code,
    pub students: Vec<Student>,
    // some fields omitted
}

Event

Information about an event

Fields

code: Code

Code of event

students: Vec<Student>

Registered students

Implementations

impl Event[src]

pub fn code(&self) -> String[src]

Get URL code

Output format

/module/2019/X-XXX-000/XXX-0-0/acti-000000/event-000000

pub fn intra_page(&self) -> String[src]

Get URL to intra pretty page

Output format

/module/2019/X-XXX-000/XXX-0-0/acti-000000

pub fn title(&self) -> &str[src]

Get name

pub fn module(&self) -> &str[src]

Get module name

pub fn start(&self) -> &str[src]

Get start time in HH:MM format

pub fn end(&self) -> &str[src]

Get finish time in HH:MM format

pub fn students(&mut self) -> &mut Vec<Student>[src]

Get mutable list of students

pub fn set_student_presence(&mut self, login: &str, presence: Presence) -> bool[src]

Set presence type of a student

Arguments

  • login - Student email address
  • presence - Type of presence to set

pub fn set_student_present(&mut self, login: &str) -> bool[src]

Set student present

Arguments

  • login - Student email address

pub fn set_student_missing(&mut self, login: &str) -> bool[src]

Set student missing

Arguments

  • login - Student email address

pub fn set_student_none(&mut self, login: &str) -> bool[src]

Remove student presence

Arguments

  • login - Student email address

pub fn set_student_not_applicable(&mut self, login: &str) -> bool[src]

Set student N/A

Arguments

  • login - Student email address

pub fn set_all_students_present(&mut self)[src]

Set all students as present

pub fn set_all_students_missing(&mut self)[src]

Set all students as missing

pub fn set_all_students_none(&mut self)[src]

Remove presences for all students

pub fn set_all_students_not_applicable(&mut self)[src]

Set presences for all students as Not applicable

pub fn set_remaining_students_present(&mut self)[src]

Set students who do not have a presence status as present

pub fn set_remaining_students_missing(&mut self)[src]

Set students who do not have a presence status as missing

pub async fn fetch_students<'_, '_>(
    &'_ mut self,
    autologin: &'_ str
) -> Result<usize, Box<dyn Error>>
[src]

Fetch list of students from an existing event

By default when you fetch an event, its students list is empty. It can be populated using this function.

pub async fn save_changes<'_, '_>(
    &'_ mut self,
    autologin: &'_ str
) -> Result<(), Box<dyn Error>>
[src]

Save changes to the intra (upload them)

Arguments

  • autologin - Autologin link. If you use the epitok::auth::Auth struct, use its get_autologin method

Trait Implementations

impl Debug for Event[src]

Auto Trait Implementations

impl RefUnwindSafe for Event

impl Send for Event

impl Sync for Event

impl Unpin for Event

impl UnwindSafe for Event

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.