Skip to main content

pamoja_gateway_station_message_set_text

Function pamoja_gateway_station_message_set_text 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pamoja_gateway_station_message_set_text( message: *mut PamojaGatewayStationMessage, field: u8, text: *const u8, text_len: usize, ) -> PamojaStatus
Expand description

Sets a piece of text a message carries.

§Arguments

  • message - the message.
  • field - which text, one of the PAMOJA_GATEWAY_STATION_TEXT_* constants.
  • text - the text, UTF-8.
  • text_len - how many bytes text holds.

§Returns

PamojaStatus::Ok once set, or PamojaStatus::InvalidArgument when the kind carries no such text or the text is not UTF-8.

§Safety

message must be a live handle, and text must point to text_len readable bytes.