pub struct Hooks {
pub live: PathBuf,
pub stop: PathBuf,
pub input: Box<dyn Fn(bool) -> Result<Poll> + Send + Sync>,
pub resident: Option<Resident>,
/* private fields */
}Expand description
Connection between a chat and its RPC driver.
Fields§
§live: PathBufWhere the in-progress reply is published.
stop: PathBufA file whose appearance asks the driver to abort the agent.
input: Box<dyn Fn(bool) -> Result<Poll> + Send + Sync>Takes input queued since the last call; called on every tick with whether the session is idle (no prompt owed and settled).
resident: Option<Resident>Outlive the turn; None ends it once the session is settled.
Implementations§
Auto Trait Implementations§
impl !Freeze for Hooks
impl !RefUnwindSafe for Hooks
impl !UnwindSafe for Hooks
impl Forget for Hooks
impl Move for Hooks
impl Send for Hooks
impl Sync for Hooks
impl Unpin for Hooks
impl UnsafeUnpin for Hookswhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const dyn Fn(bool) -> Result<Poll, Error> + Send + Sync is !null: UnsafeUnpin,
PhantomData<dyn Fn(bool) -> Result<Poll, Error> + Send + Sync>: UnsafeUnpin,
*const dyn Fn(&str, Option<u64>, &SeatState) + Send + Sync is !null: UnsafeUnpin,
PhantomData<dyn Fn(&str, Option<u64>, &SeatState) + Send + Sync>: UnsafeUnpin,
Align1<u8>: UnsafeUnpin,
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
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