Skip to main content

pamoja_event_bus_subscribe

Function pamoja_event_bus_subscribe 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pamoja_event_bus_subscribe( bus: *const PamojaEventBus, ) -> *mut PamojaEventBus
Expand description

Takes another endpoint on the same bus.

The new endpoint sees events published from now on, not those already sent, so subscribe before publishing anything the subscriber needs to see.

§Arguments

  • bus - an existing endpoint on the bus to join.

§Returns

A handle the caller must release with pamoja_event_bus_free, or null if bus is null.

§Safety

bus must be a live handle from pamoja_event_bus_new or this function, or null.