#[non_exhaustive]pub struct DaemonHandle {
pub state: Arc<RwLock<DaemonState>>,
pub folder_registry: Arc<RwLock<FolderRegistry>>,
pub shutdown_sender: Sender<()>,
pub sync_trigger: UnboundedSender<Option<String>>,
pub reload_requested: Arc<AtomicBool>,
}Expand description
Shared daemon state used by the IPC server.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.state: Arc<RwLock<DaemonState>>§folder_registry: Arc<RwLock<FolderRegistry>>§shutdown_sender: Sender<()>§sync_trigger: UnboundedSender<Option<String>>§reload_requested: Arc<AtomicBool>Implementations§
Source§impl DaemonHandle
impl DaemonHandle
Sourcepub fn new(state: DaemonState) -> Self
pub fn new(state: DaemonState) -> Self
Create a handle with fresh control channels.
pub fn with_channels( state: Arc<RwLock<DaemonState>>, folder_registry: Arc<RwLock<FolderRegistry>>, shutdown_sender: Sender<()>, sync_trigger: UnboundedSender<Option<String>>, ) -> Self
pub const fn with_channels_and_reload( state: Arc<RwLock<DaemonState>>, folder_registry: Arc<RwLock<FolderRegistry>>, shutdown_sender: Sender<()>, sync_trigger: UnboundedSender<Option<String>>, reload_requested: Arc<AtomicBool>, ) -> Self
Sourcepub async fn set_status(&self, status: DaemonStatus)
pub async fn set_status(&self, status: DaemonStatus)
Update the lifecycle status returned by future status requests.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for DaemonHandle
impl !UnwindSafe for DaemonHandle
impl Freeze for DaemonHandle
impl Send for DaemonHandle
impl Sync for DaemonHandle
impl Unpin for DaemonHandle
impl UnsafeUnpin for DaemonHandle
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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