Skip to main content

HookSession

Struct HookSession 

Source
pub struct HookSession {
    pub session_id: String,
    pub config: Option<Value>,
    pub search_dirs: Vec<PathBuf>,
    pub project_untrusted: bool,
    pub process: Arc<dyn Process>,
    pub network: Arc<dyn Network>,
    pub prompts: Arc<dyn PromptHookExecutor>,
    pub agents: Arc<dyn AgentHookExecutor>,
    pub telemetry: Arc<dyn TelemetrySink>,
    pub wake: Option<UnboundedReceiver<()>>,
}
Expand description

What a session’s own hooks are built from.

Fields§

§session_id: String§config: Option<Value>

The settings’ hooks, an untrusted project’s already withheld.

§search_dirs: Vec<PathBuf>

Where a command hook’s bare script name is looked up, in order.

§project_untrusted: bool§process: Arc<dyn Process>§network: Arc<dyn Network>§prompts: Arc<dyn PromptHookExecutor>§agents: Arc<dyn AgentHookExecutor>§telemetry: Arc<dyn TelemetrySink>§wake: Option<UnboundedReceiver<()>>

Signalled when background work ends, to re-run waiting rewake hooks.

Auto Trait Implementations§

§

impl !RefUnwindSafe for HookSession

§

impl !UnwindSafe for HookSession

§

impl Forget for HookSession

§

impl Freeze for HookSession
where *const u8 is !null: Freeze, PhantomData<u8>: Freeze, PhantomData<Value>: Freeze, *const LeafNode<String, Value> is !null: Freeze, PhantomData<(Owned, LeafOrInternal)>: Freeze, PhantomData<Box<(String, Value)>>: Freeze, PhantomData<PathBuf>: Freeze, *const ArcInner<dyn Process> is !null: Freeze, PhantomData<ArcInner<dyn Process>>: Freeze, *const ArcInner<dyn Network> is !null: Freeze, PhantomData<ArcInner<dyn Network>>: Freeze, *const ArcInner<dyn PromptHookExecutor> is !null: Freeze, PhantomData<ArcInner<dyn PromptHookExecutor>>: Freeze, *const ArcInner<dyn AgentHookExecutor> is !null: Freeze, PhantomData<ArcInner<dyn AgentHookExecutor>>: Freeze, *const ArcInner<dyn TelemetrySink> is !null: Freeze, PhantomData<ArcInner<dyn TelemetrySink>>: Freeze, *const ArcInner<Chan<(), Semaphore>> is !null: Freeze, PhantomData<ArcInner<Chan<(), Semaphore>>>: Freeze,

§

impl Move for HookSession

§

impl Send for HookSession
where RawVecInner: Send, NodeRef<Owned, String, Value, LeafOrInternal>: Send, BoxRaw<(String, Value)>: Send, Arc<dyn Process>: Send, Arc<dyn Network>: Send, Arc<dyn PromptHookExecutor>: Send, Arc<dyn AgentHookExecutor>: Send, Arc<dyn TelemetrySink>: Send, Arc<Chan<(), Semaphore>>: Send,

§

impl Sync for HookSession
where RawVecInner: Sync, NodeRef<Owned, String, Value, LeafOrInternal>: Sync, BoxRaw<(String, Value)>: Sync, Arc<dyn Process>: Sync, Arc<dyn Network>: Sync, Arc<dyn PromptHookExecutor>: Sync, Arc<dyn AgentHookExecutor>: Sync, Arc<dyn TelemetrySink>: Sync, Arc<Chan<(), Semaphore>>: Sync,

§

impl Unpin for HookSession
where *const u8 is !null: Unpin, *const LeafNode<String, Value> is !null: Unpin, Box<(String, Value)>: Unpin, Arc<dyn Process>: Unpin, Arc<dyn Network>: Unpin, Arc<dyn PromptHookExecutor>: Unpin, Arc<dyn AgentHookExecutor>: Unpin, Arc<dyn TelemetrySink>: Unpin, Arc<Chan<(), Semaphore>>: Unpin,

§

impl UnsafeUnpin for HookSession
where *const u8 is !null: UnsafeUnpin, PhantomData<u8>: UnsafeUnpin, PhantomData<Value>: UnsafeUnpin, *const LeafNode<String, Value> is !null: UnsafeUnpin, PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin, PhantomData<Box<(String, Value)>>: UnsafeUnpin, PhantomData<PathBuf>: UnsafeUnpin, *const ArcInner<dyn Process> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn Process>>: UnsafeUnpin, *const ArcInner<dyn Network> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn Network>>: UnsafeUnpin, *const ArcInner<dyn PromptHookExecutor> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn PromptHookExecutor>>: UnsafeUnpin, *const ArcInner<dyn AgentHookExecutor> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn AgentHookExecutor>>: UnsafeUnpin, *const ArcInner<dyn TelemetrySink> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn TelemetrySink>>: UnsafeUnpin, *const ArcInner<Chan<(), Semaphore>> is !null: UnsafeUnpin, PhantomData<ArcInner<Chan<(), Semaphore>>>: UnsafeUnpin,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more