blob: b3ff6bb0fc96ef5ac56cba10b957584b09c4969b (
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
}
}
|