mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2024-11-23 22:09:22 +00:00
18 lines
426 B
Rust
18 lines
426 B
Rust
|
//! Count the number of unread conversations of a given user
|
||
|
//!
|
||
|
//! @author Pierre Hubert
|
||
|
use serde::Serialize;
|
||
|
|
||
|
#[derive(Serialize)]
|
||
|
pub struct ResultCountUnreadConversations {
|
||
|
nb_unread: usize
|
||
|
}
|
||
|
|
||
|
impl ResultCountUnreadConversations {
|
||
|
/// Generate an new instance
|
||
|
pub fn new(count: usize) -> ResultCountUnreadConversations {
|
||
|
ResultCountUnreadConversations {
|
||
|
nb_unread: count
|
||
|
}
|
||
|
}
|
||
|
}
|