blob: 423beaf3c65b894a231b8ef361f284142c6332f5 (
plain) (
tree)
|
|
use std::{
ops::{Deref, DerefMut},
sync::Arc,
};
use jid::BareJID;
use leptos::prelude::*;
use crate::files::Files;
#[derive(Clone)]
pub struct Client {
// TODO: not pub
pub client: filamento::Client<Files>,
pub resource: ArcRwSignal<Option<String>>,
pub jid: Arc<BareJID>,
pub file_store: Files,
}
impl Deref for Client {
type Target = filamento::Client<Files>;
fn deref(&self) -> &Self::Target {
&self.client
}
}
impl DerefMut for Client {
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.client
}
}
|