Interface for querying current matching status and listening for status changes for publishers and queriers.
Matching is supported for publisher and querier entities.
Summary
Functions
Declares a matching listener for a publisher or querier.
Returns the current matching status for a publisher or querier.
Undeclares the matching listener identified by the given ID.
Types
@type entity_id() :: Zenohex.Publisher.id() | Zenohex.Querier.id()
@type listener_id() :: reference()
Functions
@spec declare_listener(entity_id(), pid()) :: {:ok, listener_id()} | {:error, reason :: term()}
Declares a matching listener for a publisher or querier.
Status updates are delivered to pid as Zenohex.Matching.Status.t/0 messages.
Important
The returned listener_id must be held for as long as the listener is in use.
If it is not held and gets garbage-collected by the BEAM,
the underlying listener in Rust will be automatically dropped.
Returns the current matching status for a publisher or querier.
@spec undeclare_listener(listener_id()) :: :ok | {:error, reason :: term()}
Undeclares the matching listener identified by the given ID.