blob: d90d26dce45b9c469ca0ef4ee7714857eee28057 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
// Copyright (C) 2021-2021 The Whirlsplash Collective
// SPDX-License-Identifier: GPL-3.0-only
use {crate::cmd::extendable::Parsable, std::str::from_utf8};
#[derive(Debug)]
pub struct RoomIdRequest {
pub room_name: String,
}
impl Parsable for RoomIdRequest {
fn parse(data: Vec<u8>) -> Self {
Self {
room_name: from_utf8(&data[4..data[0] as usize]).unwrap().to_string(),
}
}
}
|