pub struct User { /* private fields */ }
Expand description
Kréta, app user
Implementations§
source§impl User
impl User
sourcepub fn new(username: &str, password: &str, school_id: &str) -> Self
pub fn new(username: &str, password: &str, school_id: &str) -> Self
create new instance of User
sourcepub fn load(username: &str) -> Option<Self>
pub fn load(username: &str) -> Option<Self>
load User
with User::username
or User::name()
and save it to config_path()
sourcepub fn load_conf() -> Option<Self>
pub fn load_conf() -> Option<Self>
load User
configured in config_path()
sourcepub fn msgs(
&self,
from: Option<DateTime<Local>>,
to: Option<DateTime<Local>>
) -> Res<Vec<Msg>>
pub fn msgs( &self, from: Option<DateTime<Local>>, to: Option<DateTime<Local>> ) -> Res<Vec<Msg>>
Fetch all Msg
s between from
and to
.
sourcepub fn evals(
&self,
from: Option<DateTime<Local>>,
to: Option<DateTime<Local>>
) -> Res<Vec<Eval>>
pub fn evals( &self, from: Option<DateTime<Local>>, to: Option<DateTime<Local>> ) -> Res<Vec<Eval>>
get all Eval
s with from
to
or all
sourcepub fn timetable(
&self,
from: DateTime<Local>,
to: DateTime<Local>
) -> Res<Vec<Lesson>>
pub fn timetable( &self, from: DateTime<Local>, to: DateTime<Local> ) -> Res<Vec<Lesson>>
get all Lesson
s from
to
which makes up a timetable
sourcepub fn all_announced(
&self,
from: Option<DateTime<Local>>,
to: Option<DateTime<Local>>
) -> Res<Vec<Ancd>>
pub fn all_announced( &self, from: Option<DateTime<Local>>, to: Option<DateTime<Local>> ) -> Res<Vec<Ancd>>
get [Announced
] tests from
to
or all
sourcepub fn download_attachments(&self, msg: &Msg) -> Res<()>
pub fn download_attachments(&self, msg: &Msg) -> Res<()>
Download all [Attachment
]s of this Msg
to download_dir()
.
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
source§impl PartialEq for User
impl PartialEq for User
impl StructuralPartialEq for User
Auto Trait Implementations§
impl Freeze for User
impl RefUnwindSafe for User
impl Send for User
impl Sync for User
impl Unpin 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