pub struct SystemModules {
pub sysinfo: Arc<Mutex<SystemInfo>>,
pub health: Arc<Mutex<Health>>,
pub camera: Arc<Mutex<Camera>>,
pub twitter: Arc<Mutex<Twitter>>,
pub discord: Arc<Mutex<Discord>>,
pub line: Arc<Mutex<Line>>,
pub openai: Arc<Mutex<OpenAi>>,
pub http: Arc<Mutex<HttpServer>>,
event_target_list: Vec<Arc<Mutex<dyn SystemModule>>>,
}
Expand description
タスクのエントリポイントに渡される引数からアクセス可能な SystemModule のリスト。 デッドロックに注意。
§デッドロックについて
それぞれの SystemModule はアクセスする前にロックを取得する必要があるが、 複数同時にロックする場合、その順番に気を付けないと デッドロックを引き起こす可能性がある。
Fields§
§sysinfo: Arc<Mutex<SystemInfo>>
§health: Arc<Mutex<Health>>
§camera: Arc<Mutex<Camera>>
§twitter: Arc<Mutex<Twitter>>
§discord: Arc<Mutex<Discord>>
§line: Arc<Mutex<Line>>
§openai: Arc<Mutex<OpenAi>>
§http: Arc<Mutex<HttpServer>>
§event_target_list: Vec<Arc<Mutex<dyn SystemModule>>>
全 SystemModule にイベントを配送するための参照のリストを作る。
Implementations§
Source§impl SystemModules
impl SystemModules
Auto Trait Implementations§
impl Freeze for SystemModules
impl !RefUnwindSafe for SystemModules
impl Send for SystemModules
impl Sync for SystemModules
impl Unpin for SystemModules
impl !UnwindSafe for SystemModules
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more