pub struct AgentControlServer { /* private fields */ }Implementations§
Source§impl AgentControlServer
impl AgentControlServer
Sourcepub fn start(bridge: ControlBridge, host: Host) -> Result<Self>
pub fn start(bridge: ControlBridge, host: Host) -> Result<Self>
Bind the inspection socket and announce the descriptor.
Nothing here needs a window: it creates a Unix listener, writes a descriptor file and serves frames through nagoya. A headless host that owns a document can call this and be inspected exactly like the real application, which is what lets a QA sweep run with no display server and still answer questions that require clicking.
Sourcepub fn start_with_events(
bridge: ControlBridge,
host: Host,
events: Arc<Latest<DebugEvent>>,
) -> Result<Self>
pub fn start_with_events( bridge: ControlBridge, host: Host, events: Arc<Latest<DebugEvent>>, ) -> Result<Self>
Start with a bounded latest-value diagnostic event source.
A watch receiver is deliberate: a slow inspector needs the newest revision, not an ever-growing queue of every frame it failed to read.
pub fn start_with_journal( bridge: ControlBridge, host: Host, events: Arc<DiagnosticJournal>, ) -> Result<Self>
Sourcepub fn descriptor_path(&self) -> &Path
pub fn descriptor_path(&self) -> &Path
Where this server announced itself.
A headless host prints this so a client can attach to that exact instance. Searching the descriptor directory instead races every other instance on the machine, and a component sweep runs one host after another, so the newest descriptor is not reliably the right one.
Was #[cfg(test)], because inside this crate the runtime already knows
where it wrote the descriptor and only a test needed to ask.
Sourcepub fn refresh_deep_profiling(&mut self)
pub fn refresh_deep_profiling(&mut self)
Reacquire the sampling session after an embedder changes permission.
The server can start before application settings or CLI overrides are
loaded. In that order _sampling begins as None; merely granting
permission later does not mutate an already-running server, so every
diagnostic snapshot keeps reporting script: null until restart.
Public because the embedder that owns the setting is no longer in this
crate. It was pub(crate), called by the runtime that lived beside it.
Sourcepub fn socket_path(&self) -> &Path
pub fn socket_path(&self) -> &Path
The socket this server is listening on.
A caller that already knows the descriptor path can derive this, and several do; saying it directly is cheaper than agreeing on the extension by convention.
Trait Implementations§
Source§impl Drop for AgentControlServer
impl Drop for AgentControlServer
Auto Trait Implementations§
impl !RefUnwindSafe for AgentControlServer
impl !UnwindSafe for AgentControlServer
impl Forget for AgentControlServer
impl Freeze for AgentControlServer
impl Move for AgentControlServer
impl Send for AgentControlServer
impl Sync for AgentControlServer
impl Unpin for AgentControlServer
impl UnsafeUnpin for AgentControlServer
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<T> ErasedDestructor for Twhere
T: 'static,
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> ⓘ
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> ⓘ
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