mik1e80/dnssd/src/engine does not have a README file

    EngineError

    pub suberror EngineError {
    Closed
    InvalidServiceType
    ResourceLimit(String)
    UnknownSubscription
    RateLimited
    InvalidTime
    }

    impl Show for EngineError

    EngineError::output

    #deprecated("`EngineError::output` is deprecated, use `Show::output` instead.")
    fn EngineError::output(self : EngineError, logger : &Logger) -> Unit

    EngineError::to_string

    #deprecated("`EngineError::to_string` is deprecated, use `Show::to_string` instead.")
    fn EngineError::to_string(self : EngineError) -> String

    Default implementation for Show::to_string, uses a StringBuilder

    EndpointCandidate

    pub struct EndpointCandidate {
    scope : String
    target :
    DnsName

    port : Int
    address : Bytes
    requires_ipv6_zone : Bool
    }

    Engine

    pub struct Engine {
    // private fields
    }

    Engine::advance

    fn Engine::advance(self : Engine, now : Int64) -> Unit raise

    Engine::browse

    fn Engine::browse(self : Engine, service_type :
    DnsName
    , scope : String, now : Int64) -> Int raise

    Engine::cancel

    fn Engine::cancel(self : Engine, id : Int, now : Int64) -> Unit raise

    Engine::close

    fn Engine::close(self : Engine) -> Unit

    Engine::dropped_events

    fn Engine::dropped_events(self : Engine) -> Int64

    Engine::ingest

    fn Engine::ingest(self : Engine, packet : Bytes, scope : String, now : Int64, source? :
    PacketSource
    ?) -> Unit raise

    Engine::ingest_message

    fn Engine::ingest_message(self : Engine, message :
    Message
    , scope : String, now : Int64, source? :
    PacketSource
    ?) -> Unit raise

    Engine::is_negative

    fn Engine::is_negative(self : Engine, scope : String, name :
    DnsName
    , rr_type : Int) -> Bool

    Valid IN NSEC evidence for a single name/type/scope; never authentication.

    Engine::new

    fn Engine::new(cache_capacity? : Int, service_capacity? : Int, event_capacity? : Int, query_capacity? : Int, seed? : UInt, packet_limit? : Int) -> Engine raise

    Engine::next_deadline

    fn Engine::next_deadline(self : Engine) -> Int64?

    Engine::poll_envelope

    fn Engine::poll_envelope(self : Engine) -> EventEnvelope?

    Engine::poll_event

    fn Engine::poll_event(self : Engine) -> Event?

    Engine::poll_outbound

    fn Engine::poll_outbound(self : Engine) -> Outbound?

    Bytes are encoded at polling time, with current remaining TTLs. Drain/send the whole TC continuation burst before changing engine input.

    Engine::resolve

    fn Engine::resolve(self : Engine, instance :
    DnsName
    , scope : String, now : Int64, timeout_ms? : Int) -> Int raise

    Resolve an already named instance without requiring a PTR response. The timeout covers initial resolution; after success it remains subscribed until cancel/close so updates keep the same event contract as browse.

    Engine::snapshots

    fn Engine::snapshots(self : Engine) -> Array[ServiceSnapshot]

    Engine::state_view

    fn Engine::state_view(self : Engine) -> StateView

    Engine::stats

    fn Engine::stats(self : Engine) -> EngineStats

    EngineStats

    pub struct EngineStats {
    cached_records : Int
    services : Int
    subscriptions : Int
    queued_events : Int
    query_jobs : Int
    queued_questions : Int
    queued_datagrams : Int
    dropped_events : Int64
    rate_dropped : Int64
    deferred_queries : Int
    }

    Logical state counts; these are not byte counts or process RSS.

    Event

    pub(all) enum Event {
    Seen(ServiceSnapshot)
    Resolved(ServiceSnapshot)
    Updated(ServiceSnapshot, String)
    Unavailable(ServiceSnapshot, String)
    Removed(ServiceSnapshot, String)
    Diagnostic(String, String)
    ResolveTimedOut(Int)
    }

    EventEnvelope

    pub struct EventEnvelope {
    epoch : Int64
    sequence : Int64
    event : Event
    }

    Outbound

    pub struct Outbound {
    scope : String
    name :
    DnsName

    rr_type : Int
    bytes : Bytes
    }

    QueryJob

    type QueryJob

    QuestionSpec

    type QuestionSpec

    RecordObservation

    pub struct RecordObservation {
    owner :
    DnsName

    rr_type : Int
    received_at : Int64
    source :
    PacketSource

    }

    ServiceSnapshot

    pub struct ServiceSnapshot {
    scope : String
    service_type :
    DnsName

    instance :
    DnsName

    target :
    DnsName
    ?
    port : Int?
    srv_candidates : Array[SrvCandidate]
    txt :
    TxtRecord
    ?
    addresses : Array[Bytes]
    missing : Array[String]
    complete : Bool
    remaining_ttl_ms : Int64
    observations : Array[RecordObservation]
    observations_truncated : Bool
    }

    Unauthenticated observations within one network generation. Complete means required records are present; it does not imply reachable or trusted. Apply endpoint/address policy and authentication before connecting.

    ServiceSnapshot::endpoints

    fn ServiceSnapshot::endpoints(self : ServiceSnapshot, accept : (Bytes, Int) -> Bool, ipv4_only? : Bool) -> Array[EndpointCandidate]

    Explicit application filtering of advertised endpoints, independent of the sender filter. Requires a complete snapshot; preserves SRV candidate order. IPv6 is opt-in and link-local addresses still require adapter zone mapping. A returned candidate is neither reachable nor authenticated by this method.

    SrvCandidate

    pub struct SrvCandidate {
    priority : Int
    weight : Int
    port : Int
    target :
    DnsName

    addresses : Array[Bytes]
    }

    One SRV alternative, in connection-attempt order. Addresses belong only to this target; an empty list means address resolution is still pending.

    StateView

    pub struct StateView {
    epoch : Int64
    sequence : Int64
    snapshots : Array[ServiceSnapshot]
    }

    Atomic synchronous snapshot and event watermark for asynchronous consumers. After replacing from this view, discard queued envelopes with sequence <= its watermark or an older epoch. Versions are local to this Engine.

    Subscription

    type Subscription

    valid_service_type

    fn valid_service_type(name :
    DnsName
    ) -> Bool

    Accept a base local service type or an opaque subtype._sub.base name.