mirror of
https://github.com/logos-messaging/libchat.git
synced 2026-06-28 12:09:30 +00:00
19 lines
354 B
Rust
19 lines
354 B
Rust
|
|
use libchat::ChatError;
|
||
|
|
use libchat::Context;
|
||
|
|
|
||
|
|
pub struct ChatClient {
|
||
|
|
ctx: Context,
|
||
|
|
}
|
||
|
|
|
||
|
|
impl ChatClient {
|
||
|
|
pub fn new(name: impl Into<String>) -> Self {
|
||
|
|
Self {
|
||
|
|
ctx: Context::new_with_name(name),
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
pub fn create_bundle(&mut self) -> Result<Vec<u8>, ChatError> {
|
||
|
|
self.ctx.create_intro_bundle()
|
||
|
|
}
|
||
|
|
}
|