mirror of
https://github.com/girlbossceo/conduwuit.git
synced 2025-12-13 02:39:02 -05:00
22 lines
333 B
Rust
22 lines
333 B
Rust
use std::{ops::Deref, sync::Arc};
|
|
|
|
use conduit_service::Services;
|
|
|
|
#[derive(Clone)]
|
|
pub struct State {
|
|
services: Arc<Services>,
|
|
}
|
|
|
|
impl State {
|
|
pub fn new(services: Arc<Services>) -> Self {
|
|
Self {
|
|
services,
|
|
}
|
|
}
|
|
}
|
|
|
|
impl Deref for State {
|
|
type Target = Arc<Services>;
|
|
|
|
fn deref(&self) -> &Self::Target { &self.services }
|
|
}
|