Skip to content

Unicast[A: Any #share]

[Source]

Send data to a single subscriber.

class ref Unicast[A: Any #share]

Constructors

create

[Source]

Create a Unicast for a given ManagedPublisher.

new ref create(
  pub: ManagedPublisher[A] tag,
  qbound: U64 val = call)
: Unicast[A] ref^

Parameters

Returns


Public Functions

min_request

[Source]

Returns the lowest request count of all subscribers.

fun box min_request()
: U64 val

Returns


max_request

[Source]

Returns the highest request count of all subscribers.

fun box max_request()
: U64 val

Returns


queue_bound

[Source]

Returns the queue bound.

fun box queue_bound()
: U64 val

Returns


queue_size

[Source]

Returns the current queue size.

fun box queue_size()
: U64 val

Returns


subscriber_count

[Source]

Returns the current subscriber count.

fun box subscriber_count()
: U64 val

Returns


publish

[Source]

Send data to the subscriber.

fun ref publish(
  a: A)
: None val

Parameters

  • a: A

Returns


on_complete

[Source]

A ManagedPublisher should call this when it has no more data to produce.

fun ref on_complete()
: None val

Returns


on_error

[Source]

A ManagedPublisher should call this when its internal state has resulted in an error that should be propagated to all subscribers.

fun ref on_error(
  e: ReactiveError val)
: None val

Parameters

Returns


on_subscribe

[Source]

A ManagedPublisher should call this when it receives Publisher.subscribe.

fun ref on_subscribe(
  sub: Subscriber[A] tag)
: None val

Parameters

Returns


on_request

[Source]

A ManagedPublisher should call this when it receives ManagedPublisher._on_request.

fun ref on_request(
  sub: Subscriber[A] tag,
  n: U64 val)
: None val

Parameters

Returns


on_cancel

[Source]

A ManagedPublisher should call this when it receives ManagedPublisher._on_cancel.

fun ref on_cancel(
  sub: Subscriber[A] tag)
: None val

Parameters

Returns