rename function to ...try to indicate possible null return
This commit is contained in:
parent
b4730ffdf3
commit
7a836783e1
9 changed files with 82 additions and 83 deletions
|
@ -717,20 +717,6 @@ size_t sp_bitmap_height(struct Bitmap */*notnull*/ instance);
|
|||
*/
|
||||
BitVec */*notnull*/ sp_bitmap_into_bitvec(struct Bitmap */*notnull*/ bitmap);
|
||||
|
||||
/**
|
||||
* Creates a [BitmapCommand] and immediately turns that into a [Packet].
|
||||
*
|
||||
* The provided [Bitmap] gets consumed.
|
||||
*
|
||||
* Returns NULL in case of an error.
|
||||
*
|
||||
* This function is part of the `bitmap` module.
|
||||
*/
|
||||
struct Packet *sp_bitmap_into_packet(struct Bitmap */*notnull*/ bitmap,
|
||||
size_t x,
|
||||
size_t y,
|
||||
CompressionCode compression);
|
||||
|
||||
/**
|
||||
* Loads a [Bitmap] with the specified dimensions from the provided data.
|
||||
*
|
||||
|
@ -806,6 +792,20 @@ void sp_bitmap_set(struct Bitmap */*notnull*/ instance,
|
|||
size_t y,
|
||||
bool value);
|
||||
|
||||
/**
|
||||
* Creates a [BitmapCommand] and immediately turns that into a [Packet].
|
||||
*
|
||||
* The provided [Bitmap] gets consumed.
|
||||
*
|
||||
* Returns NULL in case of an error.
|
||||
*
|
||||
* This function is part of the `bitmap` module.
|
||||
*/
|
||||
struct Packet *sp_bitmap_try_into_packet(struct Bitmap */*notnull*/ bitmap,
|
||||
size_t x,
|
||||
size_t y,
|
||||
CompressionCode compression);
|
||||
|
||||
/**
|
||||
* Calls method [`servicepoint::Bitmap::width`].
|
||||
*
|
||||
|
@ -1089,19 +1089,6 @@ Brightness sp_brightnessgrid_get(BrightnessGrid */*notnull*/ instance,
|
|||
*/
|
||||
size_t sp_brightnessgrid_height(BrightnessGrid */*notnull*/ instance);
|
||||
|
||||
/**
|
||||
* Creates a [BrightnessGridCommand] and immediately turns that into a [Packet].
|
||||
*
|
||||
* The provided [BrightnessGrid] gets consumed.
|
||||
*
|
||||
* Returns NULL in case of an error.
|
||||
*
|
||||
* This function is part of the `brightnessgrid` module.
|
||||
*/
|
||||
struct Packet *sp_brightnessgrid_into_packet(BrightnessGrid */*notnull*/ grid,
|
||||
size_t x,
|
||||
size_t y);
|
||||
|
||||
/**
|
||||
* Loads a [BrightnessGrid] with the specified dimensions from the provided data.
|
||||
*
|
||||
|
@ -1159,6 +1146,19 @@ void sp_brightnessgrid_set(BrightnessGrid */*notnull*/ instance,
|
|||
size_t y,
|
||||
Brightness value);
|
||||
|
||||
/**
|
||||
* Creates a [BrightnessGridCommand] and immediately turns that into a [Packet].
|
||||
*
|
||||
* The provided [BrightnessGrid] gets consumed.
|
||||
*
|
||||
* Returns NULL in case of an error.
|
||||
*
|
||||
* This function is part of the `brightnessgrid` module.
|
||||
*/
|
||||
struct Packet *sp_brightnessgrid_try_into_packet(BrightnessGrid */*notnull*/ grid,
|
||||
size_t x,
|
||||
size_t y);
|
||||
|
||||
/**
|
||||
* Calls method [`servicepoint::BrightnessGrid::width`].
|
||||
*
|
||||
|
@ -1303,19 +1303,6 @@ uint32_t sp_chargrid_get(CharGrid */*notnull*/ instance, size_t x, size_t y);
|
|||
*/
|
||||
size_t sp_chargrid_height(CharGrid */*notnull*/ instance);
|
||||
|
||||
/**
|
||||
* Creates a [CharGridCommand] and immediately turns that into a [Packet].
|
||||
*
|
||||
* The provided [CharGrid] gets consumed.
|
||||
*
|
||||
* Returns NULL in case of an error.
|
||||
*
|
||||
* This function is part of the `chargrid` module.
|
||||
*/
|
||||
struct Packet *sp_chargrid_into_packet(CharGrid */*notnull*/ grid,
|
||||
size_t x,
|
||||
size_t y);
|
||||
|
||||
/**
|
||||
* Loads a [CharGrid] with the specified dimensions from the provided data.
|
||||
*
|
||||
|
@ -1367,6 +1354,19 @@ void sp_chargrid_set(CharGrid */*notnull*/ instance,
|
|||
size_t y,
|
||||
uint32_t value);
|
||||
|
||||
/**
|
||||
* Creates a [CharGridCommand] and immediately turns that into a [Packet].
|
||||
*
|
||||
* The provided [CharGrid] gets consumed.
|
||||
*
|
||||
* Returns NULL in case of an error.
|
||||
*
|
||||
* This function is part of the `chargrid` module.
|
||||
*/
|
||||
struct Packet *sp_chargrid_try_into_packet(CharGrid */*notnull*/ grid,
|
||||
size_t x,
|
||||
size_t y);
|
||||
|
||||
/**
|
||||
* Calls method [`servicepoint::CharGrid::width`].
|
||||
*
|
||||
|
@ -1622,19 +1622,6 @@ uint8_t sp_cp437grid_get(Cp437Grid */*notnull*/ instance, size_t x, size_t y);
|
|||
*/
|
||||
size_t sp_cp437grid_height(Cp437Grid */*notnull*/ instance);
|
||||
|
||||
/**
|
||||
* Creates a [Cp437GridCommand] and immediately turns that into a [Packet].
|
||||
*
|
||||
* The provided [Cp437Grid] gets consumed.
|
||||
*
|
||||
* Returns NULL in case of an error.
|
||||
*
|
||||
* This function is part of the `cp437grid` module.
|
||||
*/
|
||||
struct Packet *sp_cp437grid_into_packet(Cp437Grid */*notnull*/ grid,
|
||||
size_t x,
|
||||
size_t y);
|
||||
|
||||
/**
|
||||
* Loads a [Cp437Grid] with the specified dimensions from the provided data.
|
||||
*
|
||||
|
@ -1674,6 +1661,19 @@ void sp_cp437grid_set(Cp437Grid */*notnull*/ instance,
|
|||
size_t y,
|
||||
uint8_t value);
|
||||
|
||||
/**
|
||||
* Creates a [Cp437GridCommand] and immediately turns that into a [Packet].
|
||||
*
|
||||
* The provided [Cp437Grid] gets consumed.
|
||||
*
|
||||
* Returns NULL in case of an error.
|
||||
*
|
||||
* This function is part of the `cp437grid` module.
|
||||
*/
|
||||
struct Packet *sp_cp437grid_try_into_packet(Cp437Grid */*notnull*/ grid,
|
||||
size_t x,
|
||||
size_t y);
|
||||
|
||||
/**
|
||||
* Calls method [`servicepoint::Cp437Grid::width`].
|
||||
*
|
||||
|
@ -1801,20 +1801,6 @@ void sp_displaybitvec_free(BitVec */*notnull*/ instance);
|
|||
*/
|
||||
bool sp_displaybitvec_get(BitVec */*notnull*/ instance, size_t index);
|
||||
|
||||
/**
|
||||
* Creates a [BitVecCommand] and immediately turns that into a [Packet].
|
||||
*
|
||||
* The provided [DisplayBitVec] gets consumed.
|
||||
*
|
||||
* Returns NULL in case of an error.
|
||||
*
|
||||
* This function is part of the `displaybitvec` module.
|
||||
*/
|
||||
struct Packet *sp_displaybitvec_into_packet(BitVec */*notnull*/ bitvec,
|
||||
size_t offset,
|
||||
BinaryOperation operation,
|
||||
CompressionCode compression);
|
||||
|
||||
/**
|
||||
* Calls method [`servicepoint::DisplayBitVec::is_empty`].
|
||||
*
|
||||
|
@ -1879,6 +1865,20 @@ void sp_displaybitvec_set(BitVec */*notnull*/ instance,
|
|||
size_t index,
|
||||
bool value);
|
||||
|
||||
/**
|
||||
* Creates a [BitVecCommand] and immediately turns that into a [Packet].
|
||||
*
|
||||
* The provided [DisplayBitVec] gets consumed.
|
||||
*
|
||||
* Returns NULL in case of an error.
|
||||
*
|
||||
* This function is part of the `displaybitvec` module.
|
||||
*/
|
||||
struct Packet *sp_displaybitvec_try_into_packet(BitVec */*notnull*/ bitvec,
|
||||
size_t offset,
|
||||
BinaryOperation operation,
|
||||
CompressionCode compression);
|
||||
|
||||
/**
|
||||
* Call this function at the beginning of main to enable rust logging controlled by the
|
||||
* `RUST_LOG` environment variable. See [env_logger](https://docs.rs/env_logger/latest/env_logger/).
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue