Skip to main content

pamoja_ladder_rung

Function pamoja_ladder_rung 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pamoja_ladder_rung( ladder: *mut PamojaLadder, transport: *mut PamojaTransport, ) -> PamojaStatus
Expand description

Adds a rung, which is tried after the rungs already added.

Add the cheapest, most-preferred link first and the costliest fallback last, because a send takes the first rung that accepts it.

§Arguments

  • ladder - the ladder to add to.
  • transport - the transport to add, consumed by this call.

§Returns

PamojaStatus::Ok once the rung is added.

§Safety

ladder must be a live handle, and transport a live transport handle that has not been freed or consumed. After this call the transport must not be used again, whatever the result.