1
0
mirror of https://gitlab.com/comunic/comunicapiv3 synced 2025-03-22 13:40:44 +00:00
comunicapiv3/src/api_data/res_create_group.rs

23 lines
504 B
Rust
Raw Normal View History

2020-06-24 09:08:31 +02:00
//! # 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(),
}
}
}