pub struct Letter {
pub id: usize,
pub created: usize,
pub owner: usize,
pub receivers: Vec<usize>,
pub subject: String,
pub content: String,
pub read_by: Vec<usize>,
pub replying_to: usize,
pub likes: isize,
pub dislikes: isize,
}Expand description
A letter is the most basic structure of the mail system. Letters are sent and received by users.
Fields§
§id: usize§created: usize§owner: usize§receivers: Vec<usize>§subject: String§content: String§read_by: Vec<usize>The ID of every use who has read the letter. Can be checked in the UI
with user.id in letter.read_by.
This field can be updated by anyone in the letter’s receivers field.
Other fields in the letter can only be updated by the letter’s owner.
replying_to: usizeThe ID of the letter this letter is replying to.
likes: isize§dislikes: isizeImplementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Letter
impl<'de> Deserialize<'de> for Letter
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 Letter
impl RefUnwindSafe for Letter
impl Send for Letter
impl Sync for Letter
impl Unpin for Letter
impl UnwindSafe for Letter
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