pub(crate) struct ActorRegistry(RwLock<ActorRegistryInner>);Tuple Fields§
§0: RwLock<ActorRegistryInner>Implementations§
Source§impl ActorRegistry
impl ActorRegistry
fn read(&self) -> RwLockReadGuard<'_, ActorRegistryInner>
fn write(&self) -> WriteGuard<'_>
Source§impl ActorRegistry
impl ActorRegistry
Sourcepub(crate) fn register<T: Actor>(&self, actor: T) -> Arc<T>
pub(crate) fn register<T: Actor>(&self, actor: T) -> Arc<T>
Add an actor to the registry of known actors that can receive messages.
Sourcepub(crate) fn find<T: Actor>(&self, name: &str) -> DowncastableActorArc<T>
pub(crate) fn find<T: Actor>(&self, name: &str) -> DowncastableActorArc<T>
Find an actor by registered name
Sourcepub(crate) fn encode<T: ActorEncode<S>, S: Serialize>(&self, name: &str) -> S
pub(crate) fn encode<T: ActorEncode<S>, S: Serialize>(&self, name: &str) -> S
Find an actor by registered name and return its serialization
Sourcepub(crate) fn handle_message(
&self,
msg: &Map<String, Value>,
stream: &mut DevtoolsConnection,
stream_id: StreamId,
) -> Result<(), ()>
pub(crate) fn handle_message( &self, msg: &Map<String, Value>, stream: &mut DevtoolsConnection, stream_id: StreamId, ) -> Result<(), ()>
Attempt to process a message as directed by its to property. If the actor is not found, does not support the
message, or failed to handle the message, send an error reply instead.
pub(crate) fn register_script_actor(&self, script_id: String, actor: String)
pub(crate) fn script_to_actor(&self, script_id: &str) -> String
pub(crate) fn script_actor_registered(&self, script_id: &str) -> bool
pub(crate) fn actor_to_script(&self, actor: String) -> String
pub(crate) fn register_source_actor( &self, pipeline_id: PipelineId, actor_name: &str, )
pub(crate) fn source_actor_names_for_pipeline( &self, pipeline_id: PipelineId, ) -> Vec<String>
pub(crate) fn set_inline_source_content( &self, pipeline_id: PipelineId, content: String, )
pub(crate) fn inline_source_content( &self, pipeline_id: PipelineId, ) -> Option<String>
Sourcepub(crate) fn remove(&self, _name: String)
pub(crate) fn remove(&self, _name: String)
This is a no-op, we don’t currently handle removals from the actor registry
pub(crate) fn cleanup(&self, stream_id: StreamId)
Trait Implementations§
Source§impl Default for ActorRegistry
impl Default for ActorRegistry
Source§fn default() -> ActorRegistry
fn default() -> ActorRegistry
Returns the “default value” for a type. Read more
Source§impl MallocSizeOf for ActorRegistry
impl MallocSizeOf for ActorRegistry
Source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.
Auto Trait Implementations§
impl !Freeze for ActorRegistry
impl !RefUnwindSafe for ActorRegistry
impl Send for ActorRegistry
impl Sync for ActorRegistry
impl Unpin for ActorRegistry
impl UnsafeUnpin for ActorRegistry
impl !UnwindSafe for ActorRegistry
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 moreSource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
Source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
Source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
Source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert