Archived
1
0
This repository has been archived on 2025-01-25. You can view files and clone it, but cannot push or open issues or pull requests.
Pslink/app/src/pages/mod.rs
2021-08-12 15:48:02 +02:00

30 lines
805 B
Rust

//! Containing the individual pages for the admin app so far one to list the links and one to list the users.
pub mod home;
pub mod list_links;
pub mod list_users;
/// Unwrap a result and return it's content, or return from the function with another expression.
#[macro_export]
macro_rules! unwrap_or_return {
( $e:expr, $result:expr) => {
match $e {
Ok(x) => x,
Err(_) => return $result,
}
};
}
/// Unwrap a result and return it's content, or return from the function with another expression.
#[macro_export]
macro_rules! unwrap_or_send {
( $e:expr, $result:expr, $orders:expr) => {
match $e {
Some(x) => x,
None => {
$orders.send_msg($result);
return;
}
}
};
}