mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2025-03-22 13:40:44 +00:00
23 lines
504 B
Rust
23 lines
504 B
Rust
|
//! # Group creation result
|
||
|
//!
|
||
|
//! Result of the creation of a new group
|
||
|
|
||
|
use serde::Serialize;
|
||
|
|
||
|
use crate::data::group_id::GroupID;
|
||
|
|
||
|
#[derive(Serialize)]
|
||
|
pub struct GroupCreationResult {
|
||
|
success: String,
|
||
|
id: u64,
|
||
|
}
|
||
|
|
||
|
impl GroupCreationResult {
|
||
|
/// Construct a new instance of this object
|
||
|
pub fn new(id: &GroupID) -> GroupCreationResult {
|
||
|
GroupCreationResult {
|
||
|
success: "The group has been successfully created!".to_string(),
|
||
|
id: id.id(),
|
||
|
}
|
||
|
}
|
||
|
}
|