cleanups, add semicolon everywhere
This commit is contained in:
parent
e8f11c08ea
commit
0968605d0b
|
@ -636,6 +636,8 @@ extern "C" {
|
||||||
#endif // __cplusplus
|
#endif // __cplusplus
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Calls method [`servicepoint::Bitmap::clone`].
|
||||||
|
*
|
||||||
*Clones a [`Bitmap`] instance.
|
*Clones a [`Bitmap`] instance.
|
||||||
*
|
*
|
||||||
* This function is part of the `bitmap` module.
|
* This function is part of the `bitmap` module.
|
||||||
|
@ -667,6 +669,8 @@ struct ByteSlice sp_bitmap_data_ref_mut(struct Bitmap */*notnull*/ instance);
|
||||||
void sp_bitmap_fill(struct Bitmap */*notnull*/ instance, bool value);
|
void sp_bitmap_fill(struct Bitmap */*notnull*/ instance, bool value);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Calls method [`servicepoint::Bitmap::free`].
|
||||||
|
*
|
||||||
*Deallocates a [`Bitmap`] instance.
|
*Deallocates a [`Bitmap`] instance.
|
||||||
*
|
*
|
||||||
* This function is part of the `bitmap` module.
|
* This function is part of the `bitmap` module.
|
||||||
|
@ -821,6 +825,8 @@ struct Packet *sp_bitmap_try_into_packet(struct Bitmap */*notnull*/ bitmap,
|
||||||
size_t sp_bitmap_width(struct Bitmap */*notnull*/ instance);
|
size_t sp_bitmap_width(struct Bitmap */*notnull*/ instance);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Calls method [`servicepoint::BitmapCommand::clone`].
|
||||||
|
*
|
||||||
*Clones a [`BitmapCommand`] instance.
|
*Clones a [`BitmapCommand`] instance.
|
||||||
*
|
*
|
||||||
* This function is part of the `bitmapcommand` module.
|
* This function is part of the `bitmapcommand` module.
|
||||||
|
@ -828,6 +834,8 @@ size_t sp_bitmap_width(struct Bitmap */*notnull*/ instance);
|
||||||
struct BitmapCommand */*notnull*/ sp_bitmapcommand_clone(struct BitmapCommand */*notnull*/ instance);
|
struct BitmapCommand */*notnull*/ sp_bitmapcommand_clone(struct BitmapCommand */*notnull*/ instance);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Calls method [`servicepoint::BitmapCommand::free`].
|
||||||
|
*
|
||||||
*Deallocates a [`BitmapCommand`] instance.
|
*Deallocates a [`BitmapCommand`] instance.
|
||||||
*
|
*
|
||||||
* This function is part of the `bitmapcommand` module.
|
* This function is part of the `bitmapcommand` module.
|
||||||
|
@ -845,6 +853,8 @@ void sp_bitmapcommand_free(struct BitmapCommand */*notnull*/ instance);
|
||||||
struct BitmapCommand */*notnull*/ sp_bitmapcommand_from_bitmap(struct Bitmap */*notnull*/ bitmap);
|
struct BitmapCommand */*notnull*/ sp_bitmapcommand_from_bitmap(struct Bitmap */*notnull*/ bitmap);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Calls method [`servicepoint::BitmapCommand::get_bitmap_mut`].
|
||||||
|
*
|
||||||
* Gets a reference to the field `bitmap` of the [`servicepoint::BitmapCommand`].
|
* Gets a reference to the field `bitmap` of the [`servicepoint::BitmapCommand`].
|
||||||
*
|
*
|
||||||
* - The returned reference inherits the lifetime of object in which it is contained.
|
* - The returned reference inherits the lifetime of object in which it is contained.
|
||||||
|
@ -855,6 +865,8 @@ struct BitmapCommand */*notnull*/ sp_bitmapcommand_from_bitmap(struct Bitmap */*
|
||||||
struct Bitmap */*notnull*/ sp_bitmapcommand_get_bitmap_mut(struct BitmapCommand */*notnull*/ instance);
|
struct Bitmap */*notnull*/ sp_bitmapcommand_get_bitmap_mut(struct BitmapCommand */*notnull*/ instance);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Calls method [`servicepoint::BitmapCommand::get_compression`].
|
||||||
|
*
|
||||||
* Gets the value of field `compression` of the [`servicepoint::BitmapCommand`].
|
* Gets the value of field `compression` of the [`servicepoint::BitmapCommand`].
|
||||||
*
|
*
|
||||||
* This function is part of the `bitmapcommand` module.
|
* This function is part of the `bitmapcommand` module.
|
||||||
|
@ -862,6 +874,8 @@ struct Bitmap */*notnull*/ sp_bitmapcommand_get_bitmap_mut(struct BitmapCommand
|
||||||
CompressionCode sp_bitmapcommand_get_compression(struct BitmapCommand */*notnull*/ instance);
|
CompressionCode sp_bitmapcommand_get_compression(struct BitmapCommand */*notnull*/ instance);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Calls method [`servicepoint::BitmapCommand::get_origin`].
|
||||||
|
*
|
||||||
* Reads the origin field of the [`BitmapCommand`].
|
* Reads the origin field of the [`BitmapCommand`].
|
||||||
*
|
*
|
||||||
* This function is part of the `bitmapcommand` module.
|
* This function is part of the `bitmapcommand` module.
|
||||||
|
@ -885,6 +899,8 @@ struct BitmapCommand */*notnull*/ sp_bitmapcommand_new(struct Bitmap */*notnull*
|
||||||
CompressionCode compression);
|
CompressionCode compression);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Calls method [`servicepoint::BitmapCommand::set_bitmap`].
|
||||||
|
*
|
||||||
* Sets the value of field `bitmap` of the [`servicepoint::BitmapCommand`].
|
* Sets the value of field `bitmap` of the [`servicepoint::BitmapCommand`].
|
||||||
* The provided value is moved into the instance, potentially invalidating previously taken references.
|
* The provided value is moved into the instance, potentially invalidating previously taken references.
|
||||||
*
|
*
|
||||||
|
@ -894,6 +910,8 @@ void sp_bitmapcommand_set_bitmap(struct BitmapCommand */*notnull*/ instance,
|
||||||
struct Bitmap */*notnull*/ value);
|
struct Bitmap */*notnull*/ value);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Calls method [`servicepoint::BitmapCommand::set_compression`].
|
||||||
|
*
|
||||||
* Sets the value of field `compression` of the [`servicepoint::BitmapCommand`].
|
* Sets the value of field `compression` of the [`servicepoint::BitmapCommand`].
|
||||||
*
|
*
|
||||||
* This function is part of the `bitmapcommand` module.
|
* This function is part of the `bitmapcommand` module.
|
||||||
|
@ -902,6 +920,8 @@ void sp_bitmapcommand_set_compression(struct BitmapCommand */*notnull*/ instance
|
||||||
CompressionCode value);
|
CompressionCode value);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Calls method [`servicepoint::BitmapCommand::set_origin`].
|
||||||
|
*
|
||||||
* Overwrites the origin field of the [`BitmapCommand`].
|
* Overwrites the origin field of the [`BitmapCommand`].
|
||||||
*
|
*
|
||||||
* This function is part of the `bitmapcommand` module.
|
* This function is part of the `bitmapcommand` module.
|
||||||
|
@ -922,6 +942,8 @@ void sp_bitmapcommand_set_origin(struct BitmapCommand */*notnull*/ command,
|
||||||
struct Packet *sp_bitmapcommand_try_into_packet(struct BitmapCommand */*notnull*/ instance);
|
struct Packet *sp_bitmapcommand_try_into_packet(struct BitmapCommand */*notnull*/ instance);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Calls method [`servicepoint::BitVecCommand::clone`].
|
||||||
|
*
|
||||||
*Clones a [`BitVecCommand`] instance.
|
*Clones a [`BitVecCommand`] instance.
|
||||||
*
|
*
|
||||||
* This function is part of the `bitveccommand` module.
|
* This function is part of the `bitveccommand` module.
|
||||||
|
@ -929,6 +951,8 @@ struct Packet *sp_bitmapcommand_try_into_packet(struct BitmapCommand */*notnull*
|
||||||
struct BitVecCommand */*notnull*/ sp_bitveccommand_clone(struct BitVecCommand */*notnull*/ instance);
|
struct BitVecCommand */*notnull*/ sp_bitveccommand_clone(struct BitVecCommand */*notnull*/ instance);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Calls method [`servicepoint::BitVecCommand::free`].
|
||||||
|
*
|
||||||
*Deallocates a [`BitVecCommand`] instance.
|
*Deallocates a [`BitVecCommand`] instance.
|
||||||
*
|
*
|
||||||
* This function is part of the `bitveccommand` module.
|
* This function is part of the `bitveccommand` module.
|
||||||
|
@ -936,6 +960,8 @@ struct BitVecCommand */*notnull*/ sp_bitveccommand_clone(struct BitVecCommand */
|
||||||
void sp_bitveccommand_free(struct BitVecCommand */*notnull*/ instance);
|
void sp_bitveccommand_free(struct BitVecCommand */*notnull*/ instance);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Calls method [`servicepoint::BitVecCommand::get_bitvec_mut`].
|
||||||
|
*
|
||||||
* Gets a reference to the field `bitvec` of the [`servicepoint::BitVecCommand`].
|
* Gets a reference to the field `bitvec` of the [`servicepoint::BitVecCommand`].
|
||||||
*
|
*
|
||||||
* - The returned reference inherits the lifetime of object in which it is contained.
|
* - The returned reference inherits the lifetime of object in which it is contained.
|
||||||
|
@ -946,6 +972,8 @@ void sp_bitveccommand_free(struct BitVecCommand */*notnull*/ instance);
|
||||||
DisplayBitVec */*notnull*/ sp_bitveccommand_get_bitvec_mut(struct BitVecCommand */*notnull*/ instance);
|
DisplayBitVec */*notnull*/ sp_bitveccommand_get_bitvec_mut(struct BitVecCommand */*notnull*/ instance);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Calls method [`servicepoint::BitVecCommand::get_compression`].
|
||||||
|
*
|
||||||
* Gets the value of field `compression` of the [`servicepoint::BitVecCommand`].
|
* Gets the value of field `compression` of the [`servicepoint::BitVecCommand`].
|
||||||
*
|
*
|
||||||
* This function is part of the `bitveccommand` module.
|
* This function is part of the `bitveccommand` module.
|
||||||
|
@ -953,6 +981,8 @@ DisplayBitVec */*notnull*/ sp_bitveccommand_get_bitvec_mut(struct BitVecCommand
|
||||||
CompressionCode sp_bitveccommand_get_compression(struct BitVecCommand */*notnull*/ instance);
|
CompressionCode sp_bitveccommand_get_compression(struct BitVecCommand */*notnull*/ instance);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Calls method [`servicepoint::BitVecCommand::get_offset`].
|
||||||
|
*
|
||||||
* Gets the value of field `offset` of the [`servicepoint::BitVecCommand`].
|
* Gets the value of field `offset` of the [`servicepoint::BitVecCommand`].
|
||||||
*
|
*
|
||||||
* This function is part of the `bitveccommand` module.
|
* This function is part of the `bitveccommand` module.
|
||||||
|
@ -960,6 +990,8 @@ CompressionCode sp_bitveccommand_get_compression(struct BitVecCommand */*notnull
|
||||||
Offset sp_bitveccommand_get_offset(struct BitVecCommand */*notnull*/ instance);
|
Offset sp_bitveccommand_get_offset(struct BitVecCommand */*notnull*/ instance);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Calls method [`servicepoint::BitVecCommand::get_operation`].
|
||||||
|
*
|
||||||
* Gets the value of field `operation` of the [`servicepoint::BitVecCommand`].
|
* Gets the value of field `operation` of the [`servicepoint::BitVecCommand`].
|
||||||
*
|
*
|
||||||
* This function is part of the `bitveccommand` module.
|
* This function is part of the `bitveccommand` module.
|
||||||
|
@ -988,6 +1020,8 @@ struct BitVecCommand */*notnull*/ sp_bitveccommand_new(DisplayBitVec */*notnull*
|
||||||
CompressionCode compression);
|
CompressionCode compression);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Calls method [`servicepoint::BitVecCommand::set_bitvec`].
|
||||||
|
*
|
||||||
* Sets the value of field `bitvec` of the [`servicepoint::BitVecCommand`].
|
* Sets the value of field `bitvec` of the [`servicepoint::BitVecCommand`].
|
||||||
* The provided value is moved into the instance, potentially invalidating previously taken references.
|
* The provided value is moved into the instance, potentially invalidating previously taken references.
|
||||||
*
|
*
|
||||||
|
@ -997,6 +1031,8 @@ void sp_bitveccommand_set_bitvec(struct BitVecCommand */*notnull*/ instance,
|
||||||
DisplayBitVec */*notnull*/ value);
|
DisplayBitVec */*notnull*/ value);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Calls method [`servicepoint::BitVecCommand::set_compression`].
|
||||||
|
*
|
||||||
* Sets the value of field `compression` of the [`servicepoint::BitVecCommand`].
|
* Sets the value of field `compression` of the [`servicepoint::BitVecCommand`].
|
||||||
*
|
*
|
||||||
* This function is part of the `bitveccommand` module.
|
* This function is part of the `bitveccommand` module.
|
||||||
|
@ -1005,6 +1041,8 @@ void sp_bitveccommand_set_compression(struct BitVecCommand */*notnull*/ instance
|
||||||
CompressionCode value);
|
CompressionCode value);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Calls method [`servicepoint::BitVecCommand::set_offset`].
|
||||||
|
*
|
||||||
* Sets the value of field `offset` of the [`servicepoint::BitVecCommand`].
|
* Sets the value of field `offset` of the [`servicepoint::BitVecCommand`].
|
||||||
*
|
*
|
||||||
* This function is part of the `bitveccommand` module.
|
* This function is part of the `bitveccommand` module.
|
||||||
|
@ -1013,6 +1051,8 @@ void sp_bitveccommand_set_offset(struct BitVecCommand */*notnull*/ instance,
|
||||||
Offset value);
|
Offset value);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Calls method [`servicepoint::BitVecCommand::set_operation`].
|
||||||
|
*
|
||||||
* Sets the value of field `operation` of the [`servicepoint::BitVecCommand`].
|
* Sets the value of field `operation` of the [`servicepoint::BitVecCommand`].
|
||||||
*
|
*
|
||||||
* This function is part of the `bitveccommand` module.
|
* This function is part of the `bitveccommand` module.
|
||||||
|
@ -1032,6 +1072,8 @@ void sp_bitveccommand_set_operation(struct BitVecCommand */*notnull*/ instance,
|
||||||
struct Packet *sp_bitveccommand_try_into_packet(struct BitVecCommand */*notnull*/ instance);
|
struct Packet *sp_bitveccommand_try_into_packet(struct BitVecCommand */*notnull*/ instance);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Calls method [`servicepoint::BrightnessGrid::clone`].
|
||||||
|
*
|
||||||
*Clones a [`BrightnessGrid`] instance.
|
*Clones a [`BrightnessGrid`] instance.
|
||||||
*
|
*
|
||||||
* This function is part of the `brightnessgrid` module.
|
* This function is part of the `brightnessgrid` module.
|
||||||
|
@ -1064,6 +1106,8 @@ void sp_brightnessgrid_fill(BrightnessGrid */*notnull*/ instance,
|
||||||
Brightness value);
|
Brightness value);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Calls method [`servicepoint::BrightnessGrid::free`].
|
||||||
|
*
|
||||||
*Deallocates a [`BrightnessGrid`] instance.
|
*Deallocates a [`BrightnessGrid`] instance.
|
||||||
*
|
*
|
||||||
* This function is part of the `brightnessgrid` module.
|
* This function is part of the `brightnessgrid` module.
|
||||||
|
@ -1180,6 +1224,8 @@ struct Packet *sp_brightnessgrid_try_into_packet(BrightnessGrid */*notnull*/ gri
|
||||||
size_t sp_brightnessgrid_width(BrightnessGrid */*notnull*/ instance);
|
size_t sp_brightnessgrid_width(BrightnessGrid */*notnull*/ instance);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Calls method [`servicepoint::BrightnessGridCommand::clone`].
|
||||||
|
*
|
||||||
*Clones a [`BrightnessGridCommand`] instance.
|
*Clones a [`BrightnessGridCommand`] instance.
|
||||||
*
|
*
|
||||||
* This function is part of the `brightnessgridcommand` module.
|
* This function is part of the `brightnessgridcommand` module.
|
||||||
|
@ -1187,6 +1233,8 @@ size_t sp_brightnessgrid_width(BrightnessGrid */*notnull*/ instance);
|
||||||
struct BrightnessGridCommand */*notnull*/ sp_brightnessgridcommand_clone(struct BrightnessGridCommand */*notnull*/ instance);
|
struct BrightnessGridCommand */*notnull*/ sp_brightnessgridcommand_clone(struct BrightnessGridCommand */*notnull*/ instance);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Calls method [`servicepoint::BrightnessGridCommand::free`].
|
||||||
|
*
|
||||||
*Deallocates a [`BrightnessGridCommand`] instance.
|
*Deallocates a [`BrightnessGridCommand`] instance.
|
||||||
*
|
*
|
||||||
* This function is part of the `brightnessgridcommand` module.
|
* This function is part of the `brightnessgridcommand` module.
|
||||||
|
@ -1202,6 +1250,8 @@ void sp_brightnessgridcommand_free(struct BrightnessGridCommand */*notnull*/ ins
|
||||||
struct BrightnessGridCommand */*notnull*/ sp_brightnessgridcommand_from_grid(BrightnessGrid */*notnull*/ grid);
|
struct BrightnessGridCommand */*notnull*/ sp_brightnessgridcommand_from_grid(BrightnessGrid */*notnull*/ grid);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Calls method [`servicepoint::BrightnessGridCommand::get_grid_mut`].
|
||||||
|
*
|
||||||
* Gets a reference to the field `grid` of the [`servicepoint::BrightnessGridCommand`].
|
* Gets a reference to the field `grid` of the [`servicepoint::BrightnessGridCommand`].
|
||||||
*
|
*
|
||||||
* - The returned reference inherits the lifetime of object in which it is contained.
|
* - The returned reference inherits the lifetime of object in which it is contained.
|
||||||
|
@ -1212,6 +1262,8 @@ struct BrightnessGridCommand */*notnull*/ sp_brightnessgridcommand_from_grid(Bri
|
||||||
BrightnessGrid */*notnull*/ sp_brightnessgridcommand_get_grid_mut(struct BrightnessGridCommand */*notnull*/ instance);
|
BrightnessGrid */*notnull*/ sp_brightnessgridcommand_get_grid_mut(struct BrightnessGridCommand */*notnull*/ instance);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Calls method [`servicepoint::BrightnessGridCommand::get_origin`].
|
||||||
|
*
|
||||||
* Reads the origin field of the [`BrightnessGridCommand`].
|
* Reads the origin field of the [`BrightnessGridCommand`].
|
||||||
*
|
*
|
||||||
* This function is part of the `brightnessgridcommand` module.
|
* This function is part of the `brightnessgridcommand` module.
|
||||||
|
@ -1234,6 +1286,8 @@ struct BrightnessGridCommand */*notnull*/ sp_brightnessgridcommand_new(Brightnes
|
||||||
size_t origin_y);
|
size_t origin_y);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Calls method [`servicepoint::BrightnessGridCommand::set_grid`].
|
||||||
|
*
|
||||||
* Sets the value of field `grid` of the [`servicepoint::BrightnessGridCommand`].
|
* Sets the value of field `grid` of the [`servicepoint::BrightnessGridCommand`].
|
||||||
* The provided value is moved into the instance, potentially invalidating previously taken references.
|
* The provided value is moved into the instance, potentially invalidating previously taken references.
|
||||||
*
|
*
|
||||||
|
@ -1243,6 +1297,8 @@ void sp_brightnessgridcommand_set_grid(struct BrightnessGridCommand */*notnull*/
|
||||||
BrightnessGrid */*notnull*/ value);
|
BrightnessGrid */*notnull*/ value);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Calls method [`servicepoint::BrightnessGridCommand::set_origin`].
|
||||||
|
*
|
||||||
* Overwrites the origin field of the [`BrightnessGridCommand`].
|
* Overwrites the origin field of the [`BrightnessGridCommand`].
|
||||||
*
|
*
|
||||||
* This function is part of the `brightnessgridcommand` module.
|
* This function is part of the `brightnessgridcommand` module.
|
||||||
|
@ -1263,6 +1319,8 @@ void sp_brightnessgridcommand_set_origin(struct BrightnessGridCommand */*notnull
|
||||||
struct Packet *sp_brightnessgridcommand_try_into_packet(struct BrightnessGridCommand */*notnull*/ instance);
|
struct Packet *sp_brightnessgridcommand_try_into_packet(struct BrightnessGridCommand */*notnull*/ instance);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Calls method [`servicepoint::CharGrid::clone`].
|
||||||
|
*
|
||||||
*Clones a [`CharGrid`] instance.
|
*Clones a [`CharGrid`] instance.
|
||||||
*
|
*
|
||||||
* This function is part of the `chargrid` module.
|
* This function is part of the `chargrid` module.
|
||||||
|
@ -1284,6 +1342,8 @@ CharGrid */*notnull*/ sp_chargrid_clone(CharGrid */*notnull*/ instance);
|
||||||
void sp_chargrid_fill(CharGrid */*notnull*/ instance, uint32_t value);
|
void sp_chargrid_fill(CharGrid */*notnull*/ instance, uint32_t value);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Calls method [`servicepoint::CharGrid::free`].
|
||||||
|
*
|
||||||
*Deallocates a [`CharGrid`] instance.
|
*Deallocates a [`CharGrid`] instance.
|
||||||
*
|
*
|
||||||
* This function is part of the `chargrid` module.
|
* This function is part of the `chargrid` module.
|
||||||
|
@ -1392,6 +1452,8 @@ struct Packet *sp_chargrid_try_into_packet(CharGrid */*notnull*/ grid,
|
||||||
size_t sp_chargrid_width(CharGrid */*notnull*/ instance);
|
size_t sp_chargrid_width(CharGrid */*notnull*/ instance);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Calls method [`servicepoint::CharGridCommand::clone`].
|
||||||
|
*
|
||||||
*Clones a [`CharGridCommand`] instance.
|
*Clones a [`CharGridCommand`] instance.
|
||||||
*
|
*
|
||||||
* This function is part of the `chargridcommand` module.
|
* This function is part of the `chargridcommand` module.
|
||||||
|
@ -1399,6 +1461,8 @@ size_t sp_chargrid_width(CharGrid */*notnull*/ instance);
|
||||||
struct CharGridCommand */*notnull*/ sp_chargridcommand_clone(struct CharGridCommand */*notnull*/ instance);
|
struct CharGridCommand */*notnull*/ sp_chargridcommand_clone(struct CharGridCommand */*notnull*/ instance);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Calls method [`servicepoint::CharGridCommand::free`].
|
||||||
|
*
|
||||||
*Deallocates a [`CharGridCommand`] instance.
|
*Deallocates a [`CharGridCommand`] instance.
|
||||||
*
|
*
|
||||||
* This function is part of the `chargridcommand` module.
|
* This function is part of the `chargridcommand` module.
|
||||||
|
@ -1414,6 +1478,8 @@ void sp_chargridcommand_free(struct CharGridCommand */*notnull*/ instance);
|
||||||
struct CharGridCommand */*notnull*/ sp_chargridcommand_from_grid(CharGrid */*notnull*/ grid);
|
struct CharGridCommand */*notnull*/ sp_chargridcommand_from_grid(CharGrid */*notnull*/ grid);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Calls method [`servicepoint::CharGridCommand::get_grid_mut`].
|
||||||
|
*
|
||||||
* Gets a reference to the field `grid` of the [`servicepoint::CharGridCommand`].
|
* Gets a reference to the field `grid` of the [`servicepoint::CharGridCommand`].
|
||||||
*
|
*
|
||||||
* - The returned reference inherits the lifetime of object in which it is contained.
|
* - The returned reference inherits the lifetime of object in which it is contained.
|
||||||
|
@ -1424,6 +1490,8 @@ struct CharGridCommand */*notnull*/ sp_chargridcommand_from_grid(CharGrid */*not
|
||||||
CharGrid */*notnull*/ sp_chargridcommand_get_grid_mut(struct CharGridCommand */*notnull*/ instance);
|
CharGrid */*notnull*/ sp_chargridcommand_get_grid_mut(struct CharGridCommand */*notnull*/ instance);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Calls method [`servicepoint::CharGridCommand::get_origin`].
|
||||||
|
*
|
||||||
* Reads the origin field of the [`CharGridCommand`].
|
* Reads the origin field of the [`CharGridCommand`].
|
||||||
*
|
*
|
||||||
* This function is part of the `chargridcommand` module.
|
* This function is part of the `chargridcommand` module.
|
||||||
|
@ -1446,6 +1514,8 @@ struct CharGridCommand */*notnull*/ sp_chargridcommand_new(CharGrid */*notnull*/
|
||||||
size_t origin_y);
|
size_t origin_y);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Calls method [`servicepoint::CharGridCommand::set_grid`].
|
||||||
|
*
|
||||||
* Sets the value of field `grid` of the [`servicepoint::CharGridCommand`].
|
* Sets the value of field `grid` of the [`servicepoint::CharGridCommand`].
|
||||||
* The provided value is moved into the instance, potentially invalidating previously taken references.
|
* The provided value is moved into the instance, potentially invalidating previously taken references.
|
||||||
*
|
*
|
||||||
|
@ -1455,6 +1525,8 @@ void sp_chargridcommand_set_grid(struct CharGridCommand */*notnull*/ instance,
|
||||||
CharGrid */*notnull*/ value);
|
CharGrid */*notnull*/ value);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Calls method [`servicepoint::CharGridCommand::set_origin`].
|
||||||
|
*
|
||||||
* Overwrites the origin field of the [`CharGridCommand`].
|
* Overwrites the origin field of the [`CharGridCommand`].
|
||||||
*
|
*
|
||||||
* This function is part of the `chargridcommand` module.
|
* This function is part of the `chargridcommand` module.
|
||||||
|
@ -1475,6 +1547,8 @@ void sp_chargridcommand_set_origin(struct CharGridCommand */*notnull*/ command,
|
||||||
struct Packet *sp_chargridcommand_try_into_packet(struct CharGridCommand */*notnull*/ instance);
|
struct Packet *sp_chargridcommand_try_into_packet(struct CharGridCommand */*notnull*/ instance);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Calls method [`servicepoint::ClearCommand::clone`].
|
||||||
|
*
|
||||||
*Clones a [`ClearCommand`] instance.
|
*Clones a [`ClearCommand`] instance.
|
||||||
*
|
*
|
||||||
* This function is part of the `clearcommand` module.
|
* This function is part of the `clearcommand` module.
|
||||||
|
@ -1482,6 +1556,8 @@ struct Packet *sp_chargridcommand_try_into_packet(struct CharGridCommand */*notn
|
||||||
struct ClearCommand */*notnull*/ sp_clearcommand_clone(struct ClearCommand */*notnull*/ instance);
|
struct ClearCommand */*notnull*/ sp_clearcommand_clone(struct ClearCommand */*notnull*/ instance);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Calls method [`servicepoint::ClearCommand::free`].
|
||||||
|
*
|
||||||
*Deallocates a [`ClearCommand`] instance.
|
*Deallocates a [`ClearCommand`] instance.
|
||||||
*
|
*
|
||||||
* This function is part of the `clearcommand` module.
|
* This function is part of the `clearcommand` module.
|
||||||
|
@ -1511,6 +1587,8 @@ struct ClearCommand */*notnull*/ sp_clearcommand_new(void);
|
||||||
struct Packet *sp_clearcommand_try_into_packet(struct ClearCommand */*notnull*/ instance);
|
struct Packet *sp_clearcommand_try_into_packet(struct ClearCommand */*notnull*/ instance);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Calls method [`servicepoint::Cp437Grid::clone`].
|
||||||
|
*
|
||||||
*Clones a [`Cp437Grid`] instance.
|
*Clones a [`Cp437Grid`] instance.
|
||||||
*
|
*
|
||||||
* This function is part of the `cp437grid` module.
|
* This function is part of the `cp437grid` module.
|
||||||
|
@ -1542,6 +1620,8 @@ struct ByteSlice sp_cp437grid_data_ref_mut(Cp437Grid */*notnull*/ instance);
|
||||||
void sp_cp437grid_fill(Cp437Grid */*notnull*/ instance, uint8_t value);
|
void sp_cp437grid_fill(Cp437Grid */*notnull*/ instance, uint8_t value);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Calls method [`servicepoint::Cp437Grid::free`].
|
||||||
|
*
|
||||||
*Deallocates a [`Cp437Grid`] instance.
|
*Deallocates a [`Cp437Grid`] instance.
|
||||||
*
|
*
|
||||||
* This function is part of the `cp437grid` module.
|
* This function is part of the `cp437grid` module.
|
||||||
|
@ -1638,6 +1718,8 @@ struct Packet *sp_cp437grid_try_into_packet(Cp437Grid */*notnull*/ grid,
|
||||||
size_t sp_cp437grid_width(Cp437Grid */*notnull*/ instance);
|
size_t sp_cp437grid_width(Cp437Grid */*notnull*/ instance);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Calls method [`servicepoint::Cp437GridCommand::clone`].
|
||||||
|
*
|
||||||
*Clones a [`Cp437GridCommand`] instance.
|
*Clones a [`Cp437GridCommand`] instance.
|
||||||
*
|
*
|
||||||
* This function is part of the `cp437gridcommand` module.
|
* This function is part of the `cp437gridcommand` module.
|
||||||
|
@ -1645,6 +1727,8 @@ size_t sp_cp437grid_width(Cp437Grid */*notnull*/ instance);
|
||||||
struct Cp437GridCommand */*notnull*/ sp_cp437gridcommand_clone(struct Cp437GridCommand */*notnull*/ instance);
|
struct Cp437GridCommand */*notnull*/ sp_cp437gridcommand_clone(struct Cp437GridCommand */*notnull*/ instance);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Calls method [`servicepoint::Cp437GridCommand::free`].
|
||||||
|
*
|
||||||
*Deallocates a [`Cp437GridCommand`] instance.
|
*Deallocates a [`Cp437GridCommand`] instance.
|
||||||
*
|
*
|
||||||
* This function is part of the `cp437gridcommand` module.
|
* This function is part of the `cp437gridcommand` module.
|
||||||
|
@ -1660,6 +1744,8 @@ void sp_cp437gridcommand_free(struct Cp437GridCommand */*notnull*/ instance);
|
||||||
struct Cp437GridCommand */*notnull*/ sp_cp437gridcommand_from_grid(Cp437Grid */*notnull*/ grid);
|
struct Cp437GridCommand */*notnull*/ sp_cp437gridcommand_from_grid(Cp437Grid */*notnull*/ grid);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Calls method [`servicepoint::Cp437GridCommand::get_grid_mut`].
|
||||||
|
*
|
||||||
* Gets a reference to the field `grid` of the [`servicepoint::Cp437GridCommand`].
|
* Gets a reference to the field `grid` of the [`servicepoint::Cp437GridCommand`].
|
||||||
*
|
*
|
||||||
* - The returned reference inherits the lifetime of object in which it is contained.
|
* - The returned reference inherits the lifetime of object in which it is contained.
|
||||||
|
@ -1670,6 +1756,8 @@ struct Cp437GridCommand */*notnull*/ sp_cp437gridcommand_from_grid(Cp437Grid */*
|
||||||
Cp437Grid */*notnull*/ sp_cp437gridcommand_get_grid_mut(struct Cp437GridCommand */*notnull*/ instance);
|
Cp437Grid */*notnull*/ sp_cp437gridcommand_get_grid_mut(struct Cp437GridCommand */*notnull*/ instance);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Calls method [`servicepoint::Cp437GridCommand::get_origin`].
|
||||||
|
*
|
||||||
* Reads the origin field of the [`Cp437GridCommand`].
|
* Reads the origin field of the [`Cp437GridCommand`].
|
||||||
*
|
*
|
||||||
* This function is part of the `cp437gridcommand` module.
|
* This function is part of the `cp437gridcommand` module.
|
||||||
|
@ -1692,6 +1780,8 @@ struct Cp437GridCommand */*notnull*/ sp_cp437gridcommand_new(Cp437Grid */*notnul
|
||||||
size_t origin_y);
|
size_t origin_y);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Calls method [`servicepoint::Cp437GridCommand::set_grid`].
|
||||||
|
*
|
||||||
* Sets the value of field `grid` of the [`servicepoint::Cp437GridCommand`].
|
* Sets the value of field `grid` of the [`servicepoint::Cp437GridCommand`].
|
||||||
* The provided value is moved into the instance, potentially invalidating previously taken references.
|
* The provided value is moved into the instance, potentially invalidating previously taken references.
|
||||||
*
|
*
|
||||||
|
@ -1701,6 +1791,8 @@ void sp_cp437gridcommand_set_grid(struct Cp437GridCommand */*notnull*/ instance,
|
||||||
Cp437Grid */*notnull*/ value);
|
Cp437Grid */*notnull*/ value);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Calls method [`servicepoint::Cp437GridCommand::set_origin`].
|
||||||
|
*
|
||||||
* Overwrites the origin field of the [`Cp437GridCommand`].
|
* Overwrites the origin field of the [`Cp437GridCommand`].
|
||||||
*
|
*
|
||||||
* This function is part of the `cp437gridcommand` module.
|
* This function is part of the `cp437gridcommand` module.
|
||||||
|
@ -1732,6 +1824,8 @@ struct Packet *sp_cp437gridcommand_try_into_packet(struct Cp437GridCommand */*no
|
||||||
struct ByteSlice sp_displaybitvec_as_raw_mut_slice(DisplayBitVec */*notnull*/ instance);
|
struct ByteSlice sp_displaybitvec_as_raw_mut_slice(DisplayBitVec */*notnull*/ instance);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Calls method [`servicepoint::DisplayBitVec::clone`].
|
||||||
|
*
|
||||||
*Clones a [`DisplayBitVec`] instance.
|
*Clones a [`DisplayBitVec`] instance.
|
||||||
*
|
*
|
||||||
* This function is part of the `displaybitvec` module.
|
* This function is part of the `displaybitvec` module.
|
||||||
|
@ -1752,6 +1846,8 @@ DisplayBitVec */*notnull*/ sp_displaybitvec_clone(DisplayBitVec */*notnull*/ ins
|
||||||
void sp_displaybitvec_fill(DisplayBitVec */*notnull*/ instance, bool value);
|
void sp_displaybitvec_fill(DisplayBitVec */*notnull*/ instance, bool value);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Calls method [`servicepoint::DisplayBitVec::free`].
|
||||||
|
*
|
||||||
*Deallocates a [`DisplayBitVec`] instance.
|
*Deallocates a [`DisplayBitVec`] instance.
|
||||||
*
|
*
|
||||||
* This function is part of the `displaybitvec` module.
|
* This function is part of the `displaybitvec` module.
|
||||||
|
@ -1867,6 +1963,8 @@ struct Packet *sp_displaybitvec_try_into_packet(DisplayBitVec */*notnull*/ bitve
|
||||||
void sp_envlogger_init(void);
|
void sp_envlogger_init(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Calls method [`servicepoint::FadeOutCommand::clone`].
|
||||||
|
*
|
||||||
*Clones a [`FadeOutCommand`] instance.
|
*Clones a [`FadeOutCommand`] instance.
|
||||||
*
|
*
|
||||||
* This function is part of the `fadeoutcommand` module.
|
* This function is part of the `fadeoutcommand` module.
|
||||||
|
@ -1874,6 +1972,8 @@ void sp_envlogger_init(void);
|
||||||
struct FadeOutCommand */*notnull*/ sp_fadeoutcommand_clone(struct FadeOutCommand */*notnull*/ instance);
|
struct FadeOutCommand */*notnull*/ sp_fadeoutcommand_clone(struct FadeOutCommand */*notnull*/ instance);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Calls method [`servicepoint::FadeOutCommand::free`].
|
||||||
|
*
|
||||||
*Deallocates a [`FadeOutCommand`] instance.
|
*Deallocates a [`FadeOutCommand`] instance.
|
||||||
*
|
*
|
||||||
* This function is part of the `fadeoutcommand` module.
|
* This function is part of the `fadeoutcommand` module.
|
||||||
|
@ -1901,6 +2001,8 @@ struct FadeOutCommand */*notnull*/ sp_fadeoutcommand_new(void);
|
||||||
struct Packet *sp_fadeoutcommand_try_into_packet(struct FadeOutCommand */*notnull*/ instance);
|
struct Packet *sp_fadeoutcommand_try_into_packet(struct FadeOutCommand */*notnull*/ instance);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Calls method [`servicepoint::GenericCommand::clone`].
|
||||||
|
*
|
||||||
*Clones a [`GenericCommand`] instance.
|
*Clones a [`GenericCommand`] instance.
|
||||||
*
|
*
|
||||||
* This function is part of the `genericcommand` module.
|
* This function is part of the `genericcommand` module.
|
||||||
|
@ -1908,6 +2010,8 @@ struct Packet *sp_fadeoutcommand_try_into_packet(struct FadeOutCommand */*notnul
|
||||||
struct GenericCommand */*notnull*/ sp_genericcommand_clone(struct GenericCommand */*notnull*/ instance);
|
struct GenericCommand */*notnull*/ sp_genericcommand_clone(struct GenericCommand */*notnull*/ instance);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Calls method [`servicepoint::GenericCommand::free`].
|
||||||
|
*
|
||||||
*Deallocates a [`GenericCommand`] instance.
|
*Deallocates a [`GenericCommand`] instance.
|
||||||
*
|
*
|
||||||
* This function is part of the `genericcommand` module.
|
* This function is part of the `genericcommand` module.
|
||||||
|
@ -1938,6 +2042,8 @@ struct GenericCommand */*notnull*/ sp_genericcommand_try_from_packet(struct Pack
|
||||||
struct Packet *sp_genericcommand_try_into_packet(struct GenericCommand */*notnull*/ command);
|
struct Packet *sp_genericcommand_try_into_packet(struct GenericCommand */*notnull*/ command);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Calls method [`servicepoint::GlobalBrightnessCommand::clone`].
|
||||||
|
*
|
||||||
*Clones a [`GlobalBrightnessCommand`] instance.
|
*Clones a [`GlobalBrightnessCommand`] instance.
|
||||||
*
|
*
|
||||||
* This function is part of the `globalbrightnesscommand` module.
|
* This function is part of the `globalbrightnesscommand` module.
|
||||||
|
@ -1945,6 +2051,8 @@ struct Packet *sp_genericcommand_try_into_packet(struct GenericCommand */*notnul
|
||||||
struct GlobalBrightnessCommand */*notnull*/ sp_globalbrightnesscommand_clone(struct GlobalBrightnessCommand */*notnull*/ instance);
|
struct GlobalBrightnessCommand */*notnull*/ sp_globalbrightnesscommand_clone(struct GlobalBrightnessCommand */*notnull*/ instance);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Calls method [`servicepoint::GlobalBrightnessCommand::free`].
|
||||||
|
*
|
||||||
*Deallocates a [`GlobalBrightnessCommand`] instance.
|
*Deallocates a [`GlobalBrightnessCommand`] instance.
|
||||||
*
|
*
|
||||||
* This function is part of the `globalbrightnesscommand` module.
|
* This function is part of the `globalbrightnesscommand` module.
|
||||||
|
@ -1952,6 +2060,8 @@ struct GlobalBrightnessCommand */*notnull*/ sp_globalbrightnesscommand_clone(str
|
||||||
void sp_globalbrightnesscommand_free(struct GlobalBrightnessCommand */*notnull*/ instance);
|
void sp_globalbrightnesscommand_free(struct GlobalBrightnessCommand */*notnull*/ instance);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Calls method [`servicepoint::GlobalBrightnessCommand::get_brightness`].
|
||||||
|
*
|
||||||
* Gets the value of field `brightness` of the [`servicepoint::GlobalBrightnessCommand`].
|
* Gets the value of field `brightness` of the [`servicepoint::GlobalBrightnessCommand`].
|
||||||
*
|
*
|
||||||
* This function is part of the `globalbrightnesscommand` module.
|
* This function is part of the `globalbrightnesscommand` module.
|
||||||
|
@ -1968,6 +2078,8 @@ Brightness sp_globalbrightnesscommand_get_brightness(struct GlobalBrightnessComm
|
||||||
struct GlobalBrightnessCommand */*notnull*/ sp_globalbrightnesscommand_new(Brightness brightness);
|
struct GlobalBrightnessCommand */*notnull*/ sp_globalbrightnesscommand_new(Brightness brightness);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Calls method [`servicepoint::GlobalBrightnessCommand::set_brightness`].
|
||||||
|
*
|
||||||
* Sets the value of field `brightness` of the [`servicepoint::GlobalBrightnessCommand`].
|
* Sets the value of field `brightness` of the [`servicepoint::GlobalBrightnessCommand`].
|
||||||
*
|
*
|
||||||
* This function is part of the `globalbrightnesscommand` module.
|
* This function is part of the `globalbrightnesscommand` module.
|
||||||
|
@ -1987,6 +2099,8 @@ void sp_globalbrightnesscommand_set_brightness(struct GlobalBrightnessCommand */
|
||||||
struct Packet *sp_globalbrightnesscommand_try_into_packet(struct GlobalBrightnessCommand */*notnull*/ instance);
|
struct Packet *sp_globalbrightnesscommand_try_into_packet(struct GlobalBrightnessCommand */*notnull*/ instance);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Calls method [`servicepoint::HardResetCommand::clone`].
|
||||||
|
*
|
||||||
*Clones a [`HardResetCommand`] instance.
|
*Clones a [`HardResetCommand`] instance.
|
||||||
*
|
*
|
||||||
* This function is part of the `hardresetcommand` module.
|
* This function is part of the `hardresetcommand` module.
|
||||||
|
@ -1994,6 +2108,8 @@ struct Packet *sp_globalbrightnesscommand_try_into_packet(struct GlobalBrightnes
|
||||||
struct HardResetCommand */*notnull*/ sp_hardresetcommand_clone(struct HardResetCommand */*notnull*/ instance);
|
struct HardResetCommand */*notnull*/ sp_hardresetcommand_clone(struct HardResetCommand */*notnull*/ instance);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Calls method [`servicepoint::HardResetCommand::free`].
|
||||||
|
*
|
||||||
*Deallocates a [`HardResetCommand`] instance.
|
*Deallocates a [`HardResetCommand`] instance.
|
||||||
*
|
*
|
||||||
* This function is part of the `hardresetcommand` module.
|
* This function is part of the `hardresetcommand` module.
|
||||||
|
@ -2023,6 +2139,8 @@ struct HardResetCommand */*notnull*/ sp_hardresetcommand_new(void);
|
||||||
struct Packet *sp_hardresetcommand_try_into_packet(struct HardResetCommand */*notnull*/ instance);
|
struct Packet *sp_hardresetcommand_try_into_packet(struct HardResetCommand */*notnull*/ instance);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Calls method [`servicepoint::Packet::clone`].
|
||||||
|
*
|
||||||
*Clones a [`Packet`] instance.
|
*Clones a [`Packet`] instance.
|
||||||
*
|
*
|
||||||
* This function is part of the `packet` module.
|
* This function is part of the `packet` module.
|
||||||
|
@ -2030,6 +2148,8 @@ struct Packet *sp_hardresetcommand_try_into_packet(struct HardResetCommand */*no
|
||||||
struct Packet */*notnull*/ sp_packet_clone(struct Packet */*notnull*/ instance);
|
struct Packet */*notnull*/ sp_packet_clone(struct Packet */*notnull*/ instance);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Calls method [`servicepoint::Packet::free`].
|
||||||
|
*
|
||||||
*Deallocates a [`Packet`] instance.
|
*Deallocates a [`Packet`] instance.
|
||||||
*
|
*
|
||||||
* This function is part of the `packet` module.
|
* This function is part of the `packet` module.
|
||||||
|
@ -2047,6 +2167,8 @@ struct Packet */*notnull*/ sp_packet_from_parts(struct Header header,
|
||||||
struct ByteSlice payload);
|
struct ByteSlice payload);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Calls method [`servicepoint::Packet::get_header`].
|
||||||
|
*
|
||||||
* Gets the value of field `header` of the [`servicepoint::Packet`].
|
* Gets the value of field `header` of the [`servicepoint::Packet`].
|
||||||
*
|
*
|
||||||
* This function is part of the `packet` module.
|
* This function is part of the `packet` module.
|
||||||
|
@ -2054,6 +2176,8 @@ struct Packet */*notnull*/ sp_packet_from_parts(struct Header header,
|
||||||
struct Header sp_packet_get_header(struct Packet */*notnull*/ instance);
|
struct Header sp_packet_get_header(struct Packet */*notnull*/ instance);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Calls method [`servicepoint::Packet::get_header_mut`].
|
||||||
|
*
|
||||||
* Gets a reference to the field `header` of the [`servicepoint::Packet`].
|
* Gets a reference to the field `header` of the [`servicepoint::Packet`].
|
||||||
*
|
*
|
||||||
* - The returned reference inherits the lifetime of object in which it is contained.
|
* - The returned reference inherits the lifetime of object in which it is contained.
|
||||||
|
@ -2064,6 +2188,8 @@ struct Header sp_packet_get_header(struct Packet */*notnull*/ instance);
|
||||||
struct Header */*notnull*/ sp_packet_get_header_mut(struct Packet */*notnull*/ instance);
|
struct Header */*notnull*/ sp_packet_get_header_mut(struct Packet */*notnull*/ instance);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Calls method [`servicepoint::Packet::get_payload`].
|
||||||
|
*
|
||||||
* Returns a pointer to the current payload of the provided packet.
|
* Returns a pointer to the current payload of the provided packet.
|
||||||
*
|
*
|
||||||
* Returns an [ByteSlice::INVALID] instance in case the packet does not have any payload.
|
* Returns an [ByteSlice::INVALID] instance in case the packet does not have any payload.
|
||||||
|
@ -2075,6 +2201,8 @@ struct Header */*notnull*/ sp_packet_get_header_mut(struct Packet */*notnull*/ i
|
||||||
struct ByteSlice sp_packet_get_payload(struct Packet */*notnull*/ packet);
|
struct ByteSlice sp_packet_get_payload(struct Packet */*notnull*/ packet);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Calls method [`servicepoint::Packet::serialize_to`].
|
||||||
|
*
|
||||||
* Serialize the packet into the provided buffer.
|
* Serialize the packet into the provided buffer.
|
||||||
*
|
*
|
||||||
* # Panics
|
* # Panics
|
||||||
|
@ -2087,6 +2215,8 @@ size_t sp_packet_serialize_to(struct Packet */*notnull*/ packet,
|
||||||
struct ByteSlice buffer);
|
struct ByteSlice buffer);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Calls method [`servicepoint::Packet::set_header`].
|
||||||
|
*
|
||||||
* Sets the value of field `header` of the [`servicepoint::Packet`].
|
* Sets the value of field `header` of the [`servicepoint::Packet`].
|
||||||
*
|
*
|
||||||
* This function is part of the `packet` module.
|
* This function is part of the `packet` module.
|
||||||
|
@ -2095,6 +2225,8 @@ void sp_packet_set_header(struct Packet */*notnull*/ instance,
|
||||||
struct Header value);
|
struct Header value);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Calls method [`servicepoint::Packet::set_payload`].
|
||||||
|
*
|
||||||
* Sets the payload of the provided packet to the provided data.
|
* Sets the payload of the provided packet to the provided data.
|
||||||
*
|
*
|
||||||
* This makes previous payload pointers invalid.
|
* This makes previous payload pointers invalid.
|
||||||
|
@ -2121,9 +2253,11 @@ struct Packet *sp_packet_try_load(struct ByteSlice data);
|
||||||
* This function is part of the `sp` module.
|
* This function is part of the `sp` module.
|
||||||
*/
|
*/
|
||||||
bool sp_sp_u16_to_command_code(uint16_t code,
|
bool sp_sp_u16_to_command_code(uint16_t code,
|
||||||
CommandCode *result);
|
CommandCode */*notnull*/ result);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Calls method [`servicepoint::UdpSocket::free`].
|
||||||
|
*
|
||||||
*Deallocates a [`UdpSocket`] instance.
|
*Deallocates a [`UdpSocket`] instance.
|
||||||
*
|
*
|
||||||
* This function is part of the `udpsocket` module.
|
* This function is part of the `udpsocket` module.
|
||||||
|
|
|
@ -32,7 +32,7 @@ wrap_functions!(associate BitmapCommand;
|
||||||
origin: Origin::new(origin_x, origin_y),
|
origin: Origin::new(origin_x, origin_y),
|
||||||
compression,
|
compression,
|
||||||
})
|
})
|
||||||
}
|
};
|
||||||
|
|
||||||
/// Move the provided [Bitmap] into a new [BitmapCommand],
|
/// Move the provided [Bitmap] into a new [BitmapCommand],
|
||||||
/// leaving other fields as their default values.
|
/// leaving other fields as their default values.
|
||||||
|
@ -40,5 +40,5 @@ wrap_functions!(associate BitmapCommand;
|
||||||
/// Rust equivalent: `BitmapCommand::from(bitmap)`
|
/// Rust equivalent: `BitmapCommand::from(bitmap)`
|
||||||
fn from_bitmap(bitmap: move NonNull<Bitmap>) -> NonNull<BitmapCommand> {
|
fn from_bitmap(bitmap: move NonNull<Bitmap>) -> NonNull<BitmapCommand> {
|
||||||
heap_move_nonnull(bitmap.into())
|
heap_move_nonnull(bitmap.into())
|
||||||
}
|
};
|
||||||
);
|
);
|
||||||
|
|
|
@ -18,7 +18,6 @@ wrap_fields!(BitVecCommand;
|
||||||
);
|
);
|
||||||
|
|
||||||
wrap_functions!(associate BitVecCommand;
|
wrap_functions!(associate BitVecCommand;
|
||||||
|
|
||||||
/// Set pixel data starting at the pixel offset on screen.
|
/// Set pixel data starting at the pixel offset on screen.
|
||||||
///
|
///
|
||||||
/// The screen will continuously overwrite more pixel data without regarding the offset, meaning
|
/// The screen will continuously overwrite more pixel data without regarding the offset, meaning
|
||||||
|
@ -43,6 +42,5 @@ wrap_functions!(associate BitVecCommand;
|
||||||
operation,
|
operation,
|
||||||
compression,
|
compression,
|
||||||
})
|
})
|
||||||
}
|
};
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
|
@ -15,7 +15,6 @@ wrap_fields!(BrightnessGridCommand;
|
||||||
wrap_origin_accessors!(BrightnessGridCommand);
|
wrap_origin_accessors!(BrightnessGridCommand);
|
||||||
|
|
||||||
wrap_functions!(associate BrightnessGridCommand;
|
wrap_functions!(associate BrightnessGridCommand;
|
||||||
|
|
||||||
/// Set the brightness of individual tiles in a rectangular area of the display.
|
/// Set the brightness of individual tiles in a rectangular area of the display.
|
||||||
///
|
///
|
||||||
/// The passed [BrightnessGrid] gets consumed.
|
/// The passed [BrightnessGrid] gets consumed.
|
||||||
|
@ -30,12 +29,11 @@ wrap_functions!(associate BrightnessGridCommand;
|
||||||
grid,
|
grid,
|
||||||
origin: Origin::new(origin_x, origin_y),
|
origin: Origin::new(origin_x, origin_y),
|
||||||
})
|
})
|
||||||
}
|
};
|
||||||
|
|
||||||
/// Moves the provided [BrightnessGrid] into a new [BrightnessGridCommand],
|
/// Moves the provided [BrightnessGrid] into a new [BrightnessGridCommand],
|
||||||
/// leaving other fields as their default values.
|
/// leaving other fields as their default values.
|
||||||
fn from_grid(grid: move NonNull<BrightnessGrid>) -> NonNull<BrightnessGridCommand> {
|
fn from_grid(grid: move NonNull<BrightnessGrid>) -> NonNull<BrightnessGridCommand> {
|
||||||
heap_move_nonnull(grid.into())
|
heap_move_nonnull(grid.into())
|
||||||
}
|
};
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
|
@ -14,7 +14,7 @@ macro_rules! wrap_cc_only {
|
||||||
#[doc = " Returns: a new [`" [< $command Command >] "`] instance."]
|
#[doc = " Returns: a new [`" [< $command Command >] "`] instance."]
|
||||||
fn new() -> ::core::ptr::NonNull<[< $command Command >]> {
|
fn new() -> ::core::ptr::NonNull<[< $command Command >]> {
|
||||||
heap_move_nonnull([< $command Command >])
|
heap_move_nonnull([< $command Command >])
|
||||||
}
|
};
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -15,7 +15,6 @@ wrap_fields!(CharGridCommand;
|
||||||
wrap_origin_accessors!(CharGridCommand);
|
wrap_origin_accessors!(CharGridCommand);
|
||||||
|
|
||||||
wrap_functions!(associate CharGridCommand;
|
wrap_functions!(associate CharGridCommand;
|
||||||
|
|
||||||
/// Show UTF-8 encoded text on the screen.
|
/// Show UTF-8 encoded text on the screen.
|
||||||
///
|
///
|
||||||
/// The passed [CharGrid] gets consumed.
|
/// The passed [CharGrid] gets consumed.
|
||||||
|
@ -30,12 +29,11 @@ wrap_functions!(associate CharGridCommand;
|
||||||
grid,
|
grid,
|
||||||
origin: Origin::new(origin_x, origin_y),
|
origin: Origin::new(origin_x, origin_y),
|
||||||
})
|
})
|
||||||
}
|
};
|
||||||
|
|
||||||
/// Moves the provided [CharGrid] into a new [CharGridCommand],
|
/// Moves the provided [CharGrid] into a new [CharGridCommand],
|
||||||
/// leaving other fields as their default values.
|
/// leaving other fields as their default values.
|
||||||
fn from_grid(grid: move NonNull<CharGrid>) -> NonNull<CharGridCommand> {
|
fn from_grid(grid: move NonNull<CharGrid>) -> NonNull<CharGridCommand> {
|
||||||
heap_move_nonnull(grid.into())
|
heap_move_nonnull(grid.into())
|
||||||
}
|
};
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
|
@ -15,7 +15,6 @@ wrap_fields!(Cp437GridCommand;
|
||||||
wrap_origin_accessors!(Cp437GridCommand);
|
wrap_origin_accessors!(Cp437GridCommand);
|
||||||
|
|
||||||
wrap_functions!(associate Cp437GridCommand;
|
wrap_functions!(associate Cp437GridCommand;
|
||||||
|
|
||||||
/// Show text on the screen.
|
/// Show text on the screen.
|
||||||
///
|
///
|
||||||
/// The text is sent in the form of a 2D grid of [CP-437] encoded characters.
|
/// The text is sent in the form of a 2D grid of [CP-437] encoded characters.
|
||||||
|
@ -30,12 +29,11 @@ wrap_functions!(associate Cp437GridCommand;
|
||||||
grid,
|
grid,
|
||||||
origin: Origin::new(origin_x, origin_y),
|
origin: Origin::new(origin_x, origin_y),
|
||||||
})
|
})
|
||||||
}
|
};
|
||||||
|
|
||||||
/// Moves the provided [Cp437Grid] into a new [Cp437GridCommand],
|
/// Moves the provided [Cp437Grid] into a new [Cp437GridCommand],
|
||||||
/// leaving other fields as their default values.
|
/// leaving other fields as their default values.
|
||||||
fn from_grid(grid: move NonNull<Cp437Grid>) -> NonNull<Cp437GridCommand> {
|
fn from_grid(grid: move NonNull<Cp437Grid>) -> NonNull<Cp437GridCommand> {
|
||||||
heap_move_nonnull(grid.into())
|
heap_move_nonnull(grid.into())
|
||||||
}
|
};
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
|
@ -248,7 +248,7 @@ wrap_functions!(associate GenericCommand;
|
||||||
data: CommandUnion { null: null_mut() },
|
data: CommandUnion { null: null_mut() },
|
||||||
});
|
});
|
||||||
heap_move_nonnull(result)
|
heap_move_nonnull(result)
|
||||||
}
|
};
|
||||||
);
|
);
|
||||||
|
|
||||||
wrap_methods! { GenericCommand;
|
wrap_methods! { GenericCommand;
|
||||||
|
|
|
@ -7,14 +7,12 @@ use servicepoint::{Brightness, GlobalBrightnessCommand};
|
||||||
use std::ptr::NonNull;
|
use std::ptr::NonNull;
|
||||||
|
|
||||||
wrap_functions!(associate GlobalBrightnessCommand;
|
wrap_functions!(associate GlobalBrightnessCommand;
|
||||||
|
|
||||||
/// Set the brightness of all tiles to the same value.
|
/// Set the brightness of all tiles to the same value.
|
||||||
///
|
///
|
||||||
/// Returns: a new [GlobalBrightnessCommand] instance.
|
/// Returns: a new [GlobalBrightnessCommand] instance.
|
||||||
fn new(brightness: val Brightness) -> NonNull<GlobalBrightnessCommand> {
|
fn new(brightness: val Brightness) -> NonNull<GlobalBrightnessCommand> {
|
||||||
heap_move_nonnull(GlobalBrightnessCommand::from(brightness))
|
heap_move_nonnull(GlobalBrightnessCommand::from(brightness))
|
||||||
}
|
};
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
wrap_command!(GlobalBrightness);
|
wrap_command!(GlobalBrightness);
|
||||||
|
|
|
@ -64,7 +64,7 @@ macro_rules! derive_command_into_packet {
|
||||||
/// Returns: NULL or a [Packet] containing the command.
|
/// Returns: NULL or a [Packet] containing the command.
|
||||||
fn try_into_packet(move instance) -> *mut ::servicepoint::Packet {
|
fn try_into_packet(move instance) -> *mut ::servicepoint::Packet {
|
||||||
$crate::mem::heap_move_ok(instance.try_into())
|
$crate::mem::heap_move_ok(instance.try_into())
|
||||||
}
|
};
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,14 +37,14 @@ wrap_functions!(associate Bitmap;
|
||||||
/// ```
|
/// ```
|
||||||
fn new(width: val usize, height: val usize) -> *mut Bitmap {
|
fn new(width: val usize, height: val usize) -> *mut Bitmap {
|
||||||
heap_move_some(Bitmap::new(width, height))
|
heap_move_some(Bitmap::new(width, height))
|
||||||
}
|
};
|
||||||
|
|
||||||
/// Creates a new [Bitmap] with a size matching the screen.
|
/// Creates a new [Bitmap] with a size matching the screen.
|
||||||
///
|
///
|
||||||
/// returns: [Bitmap] initialized to all pixels off.
|
/// returns: [Bitmap] initialized to all pixels off.
|
||||||
fn new_max_sized() -> NonNull<Bitmap> {
|
fn new_max_sized() -> NonNull<Bitmap> {
|
||||||
heap_move_nonnull(Bitmap::max_sized())
|
heap_move_nonnull(Bitmap::max_sized())
|
||||||
}
|
};
|
||||||
|
|
||||||
/// Loads a [Bitmap] with the specified dimensions from the provided data.
|
/// Loads a [Bitmap] with the specified dimensions from the provided data.
|
||||||
///
|
///
|
||||||
|
@ -61,7 +61,7 @@ wrap_functions!(associate Bitmap;
|
||||||
) -> *mut Bitmap {
|
) -> *mut Bitmap {
|
||||||
let data = unsafe { data.as_slice() };
|
let data = unsafe { data.as_slice() };
|
||||||
heap_move_ok(Bitmap::load(width, height, data))
|
heap_move_ok(Bitmap::load(width, height, data))
|
||||||
}
|
};
|
||||||
|
|
||||||
/// Tries to convert the BitVec to a Bitmap.
|
/// Tries to convert the BitVec to a Bitmap.
|
||||||
///
|
///
|
||||||
|
@ -73,7 +73,7 @@ wrap_functions!(associate Bitmap;
|
||||||
bitvec: move NonNull<DisplayBitVec>,
|
bitvec: move NonNull<DisplayBitVec>,
|
||||||
) -> *mut Bitmap {
|
) -> *mut Bitmap {
|
||||||
heap_move_ok(Bitmap::from_bitvec(width, bitvec))
|
heap_move_ok(Bitmap::from_bitvec(width, bitvec))
|
||||||
}
|
};
|
||||||
);
|
);
|
||||||
|
|
||||||
wrap_methods!(Bitmap;
|
wrap_methods!(Bitmap;
|
||||||
|
|
|
@ -11,7 +11,6 @@ use std::ptr::NonNull;
|
||||||
wrap_container!(DisplayBitVec);
|
wrap_container!(DisplayBitVec);
|
||||||
|
|
||||||
wrap_functions!(associate DisplayBitVec;
|
wrap_functions!(associate DisplayBitVec;
|
||||||
|
|
||||||
/// Creates a new [DisplayBitVec] instance.
|
/// Creates a new [DisplayBitVec] instance.
|
||||||
///
|
///
|
||||||
/// # Arguments
|
/// # Arguments
|
||||||
|
@ -25,7 +24,7 @@ wrap_functions!(associate DisplayBitVec;
|
||||||
/// - when `size` is not divisible by 8.
|
/// - when `size` is not divisible by 8.
|
||||||
fn new(size: val usize) -> NonNull<DisplayBitVec> {
|
fn new(size: val usize) -> NonNull<DisplayBitVec> {
|
||||||
heap_move_nonnull(DisplayBitVec::repeat(false, size))
|
heap_move_nonnull(DisplayBitVec::repeat(false, size))
|
||||||
}
|
};
|
||||||
|
|
||||||
/// Interpret the data as a series of bits and load then into a new [DisplayBitVec] instance.
|
/// Interpret the data as a series of bits and load then into a new [DisplayBitVec] instance.
|
||||||
///
|
///
|
||||||
|
@ -33,8 +32,7 @@ wrap_functions!(associate DisplayBitVec;
|
||||||
fn load(data: val ByteSlice) -> NonNull<DisplayBitVec> {
|
fn load(data: val ByteSlice) -> NonNull<DisplayBitVec> {
|
||||||
let data = unsafe { data.as_slice() };
|
let data = unsafe { data.as_slice() };
|
||||||
heap_move_nonnull(DisplayBitVec::from_slice(data))
|
heap_move_nonnull(DisplayBitVec::from_slice(data))
|
||||||
}
|
};
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
wrap_methods!(DisplayBitVec;
|
wrap_methods!(DisplayBitVec;
|
||||||
|
|
|
@ -32,7 +32,7 @@ wrap_functions!(associate BrightnessGrid;
|
||||||
/// ```
|
/// ```
|
||||||
fn new(width: val usize, height: val usize) -> NonNull<BrightnessGrid> {
|
fn new(width: val usize, height: val usize) -> NonNull<BrightnessGrid> {
|
||||||
heap_move_nonnull(BrightnessGrid::new(width, height))
|
heap_move_nonnull(BrightnessGrid::new(width, height))
|
||||||
}
|
};
|
||||||
|
|
||||||
/// Loads a [BrightnessGrid] with the specified dimensions from the provided data.
|
/// Loads a [BrightnessGrid] with the specified dimensions from the provided data.
|
||||||
///
|
///
|
||||||
|
@ -49,7 +49,7 @@ wrap_functions!(associate BrightnessGrid;
|
||||||
ByteGrid::load(width, height, data)
|
ByteGrid::load(width, height, data)
|
||||||
.map(move |grid| grid.map(Brightness::saturating_from)),
|
.map(move |grid| grid.map(Brightness::saturating_from)),
|
||||||
)
|
)
|
||||||
}
|
};
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,6 @@ wrap_container!(CharGrid);
|
||||||
derive_get_width_height!(CharGrid);
|
derive_get_width_height!(CharGrid);
|
||||||
|
|
||||||
wrap_functions!(associate CharGrid;
|
wrap_functions!(associate CharGrid;
|
||||||
|
|
||||||
/// Creates a new [CharGrid] with the specified dimensions.
|
/// Creates a new [CharGrid] with the specified dimensions.
|
||||||
///
|
///
|
||||||
/// returns: [CharGrid] initialized to 0.
|
/// returns: [CharGrid] initialized to 0.
|
||||||
|
@ -25,7 +24,7 @@ wrap_functions!(associate CharGrid;
|
||||||
/// ```
|
/// ```
|
||||||
fn new(width: val usize, height: val usize) -> NonNull<CharGrid> {
|
fn new(width: val usize, height: val usize) -> NonNull<CharGrid> {
|
||||||
heap_move_nonnull(CharGrid::new(width, height))
|
heap_move_nonnull(CharGrid::new(width, height))
|
||||||
}
|
};
|
||||||
|
|
||||||
/// Loads a [CharGrid] with the specified dimensions from the provided data.
|
/// Loads a [CharGrid] with the specified dimensions from the provided data.
|
||||||
///
|
///
|
||||||
|
@ -33,9 +32,7 @@ wrap_functions!(associate CharGrid;
|
||||||
fn load(width: val usize, height: val usize, data: val ByteSlice) -> *mut CharGrid {
|
fn load(width: val usize, height: val usize, data: val ByteSlice) -> *mut CharGrid {
|
||||||
let data = unsafe { data.as_slice() };
|
let data = unsafe { data.as_slice() };
|
||||||
heap_move_ok(CharGrid::load_utf8(width, height, data.to_vec()))
|
heap_move_ok(CharGrid::load_utf8(width, height, data.to_vec()))
|
||||||
}
|
};
|
||||||
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
wrap_methods!(CharGrid;
|
wrap_methods!(CharGrid;
|
||||||
|
|
|
@ -16,13 +16,13 @@ wrap_functions!(associate Cp437Grid;
|
||||||
/// returns: [Cp437Grid] initialized to 0.
|
/// returns: [Cp437Grid] initialized to 0.
|
||||||
fn new(width: val usize, height: val usize) -> NonNull<Cp437Grid> {
|
fn new(width: val usize, height: val usize) -> NonNull<Cp437Grid> {
|
||||||
heap_move_nonnull(Cp437Grid::new(width, height))
|
heap_move_nonnull(Cp437Grid::new(width, height))
|
||||||
}
|
};
|
||||||
|
|
||||||
/// Loads a [Cp437Grid] with the specified dimensions from the provided data.
|
/// Loads a [Cp437Grid] with the specified dimensions from the provided data.
|
||||||
fn load(width: val usize, height: val usize, data: val ByteSlice) -> *mut Cp437Grid {
|
fn load(width: val usize, height: val usize, data: val ByteSlice) -> *mut Cp437Grid {
|
||||||
let data = unsafe { data.as_slice() };
|
let data = unsafe { data.as_slice() };
|
||||||
heap_move_some(Cp437Grid::load(width, height, data))
|
heap_move_some(Cp437Grid::load(width, height, data))
|
||||||
}
|
};
|
||||||
);
|
);
|
||||||
|
|
||||||
wrap_methods!(Cp437Grid;
|
wrap_methods!(Cp437Grid;
|
||||||
|
|
|
@ -48,6 +48,6 @@ mod feature_env_logger {
|
||||||
/// `RUST_LOG` environment variable. See [env_logger](https://docs.rs/env_logger/latest/env_logger/).
|
/// `RUST_LOG` environment variable. See [env_logger](https://docs.rs/env_logger/latest/env_logger/).
|
||||||
fn init() {
|
fn init() {
|
||||||
env_logger::init();
|
env_logger::init();
|
||||||
}
|
};
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,48 +1,36 @@
|
||||||
macro_rules! derive_free {
|
macro_rules! derive_free {
|
||||||
($typ:ident) => {
|
($typ:ident) => {
|
||||||
::paste::paste! {
|
::paste::paste! {
|
||||||
$crate::macros::wrap_functions!([< $typ:lower >];
|
$crate::macros::wrap_method!($typ;
|
||||||
#[doc = "Deallocates a [`" $typ "`] instance."]
|
#[doc = "Deallocates a [`" $typ "`] instance."]
|
||||||
#[allow(dropping_copy_types)]
|
#[allow(dropping_copy_types)]
|
||||||
fn free(instance: move ::core::ptr::NonNull<$typ>) {
|
fn free(move instance) {
|
||||||
::std::mem::drop(instance)
|
::std::mem::drop(instance)
|
||||||
}
|
};
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
macro_rules! derive_clone {
|
macro_rules! derive_clone {
|
||||||
($typ:ident) => {
|
($object_type:ident) => {
|
||||||
::paste::paste! {
|
::paste::paste! {
|
||||||
$crate::macros::wrap_functions!([< $typ:lower >];
|
$crate::macros::wrap_method!($object_type;
|
||||||
#[doc = "Clones a [`" $typ "`] instance."]
|
#[doc = "Clones a [`" $object_type "`] instance."]
|
||||||
fn clone(instance: ref ::core::ptr::NonNull<$typ>) -> ::core::ptr::NonNull<$typ> {
|
fn clone(ref instance) -> ::core::ptr::NonNull<$object_type> {
|
||||||
$crate::mem::heap_move_nonnull(instance.clone())
|
$crate::mem::heap_move_nonnull(instance.clone())
|
||||||
}
|
};
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
macro_rules! nonnull_as_ref {
|
|
||||||
($ident:ident) => {
|
|
||||||
$ident.as_ref()
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
macro_rules! nonnull_as_mut {
|
|
||||||
($ident:ident) => {
|
|
||||||
(&mut *$ident.as_ptr())
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
macro_rules! wrap_method {
|
macro_rules! wrap_method {
|
||||||
(
|
(
|
||||||
$object_type:ident;
|
$object_type:ident;
|
||||||
$(#[$meta:meta])+
|
$(#[$meta:meta])+
|
||||||
fn $function:ident($ref_or_mut:ident $instance:ident $(, $($param_name:ident: $param_modifier:ident $param_type:ty),*)?)
|
fn $function:ident($ref_or_mut:ident $instance:ident $(, $($param_name:ident: $param_modifier:ident $param_type:ty),*)?)
|
||||||
$(-> $return_type:ty)?
|
$(-> $return_type:ty)?;
|
||||||
) => {
|
) => {
|
||||||
::paste::paste!{
|
::paste::paste!{
|
||||||
$crate::macros::wrap_method!(
|
$crate::macros::wrap_method!(
|
||||||
|
@ -51,7 +39,7 @@ macro_rules! wrap_method {
|
||||||
fn $function($ref_or_mut $instance $(, $($param_name: $param_modifier $param_type),*)?)
|
fn $function($ref_or_mut $instance $(, $($param_name: $param_modifier $param_type),*)?)
|
||||||
$(-> $return_type)? {
|
$(-> $return_type)? {
|
||||||
$instance.$function($($($param_name),*)?)
|
$instance.$function($($($param_name),*)?)
|
||||||
}
|
};
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -59,7 +47,7 @@ macro_rules! wrap_method {
|
||||||
$(#[$meta:meta])+
|
$(#[$meta:meta])+
|
||||||
fn $function:ident($ref_or_mut:ident $instance:ident $(, $($param_name:ident: $param_modifier:ident $param_type:ty),*)?)
|
fn $function:ident($ref_or_mut:ident $instance:ident $(, $($param_name:ident: $param_modifier:ident $param_type:ty),*)?)
|
||||||
$(-> $return_type:ty)?
|
$(-> $return_type:ty)?
|
||||||
$impl:block
|
$impl:block;
|
||||||
) => {
|
) => {
|
||||||
paste::paste! {
|
paste::paste! {
|
||||||
$crate::macros::wrap_functions!([< $object_type:lower >];
|
$crate::macros::wrap_functions!([< $object_type:lower >];
|
||||||
|
@ -70,7 +58,7 @@ macro_rules! wrap_method {
|
||||||
$instance: $ref_or_mut ::core::ptr::NonNull<$object_type>
|
$instance: $ref_or_mut ::core::ptr::NonNull<$object_type>
|
||||||
$(,$($param_name: $param_modifier $param_type),*)?
|
$(,$($param_name: $param_modifier $param_type),*)?
|
||||||
) $(-> $return_type)?
|
) $(-> $return_type)?
|
||||||
$impl
|
$impl;
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -92,7 +80,7 @@ macro_rules! wrap_methods {
|
||||||
$(#[$meta])*
|
$(#[$meta])*
|
||||||
fn $function($ref_or_mut $instance $(, $($param_name: $param_modifier $param_type),*)?)
|
fn $function($ref_or_mut $instance $(, $($param_name: $param_modifier $param_type),*)?)
|
||||||
$(-> $return_type)?
|
$(-> $return_type)?
|
||||||
$($impl)?
|
$($impl)?;
|
||||||
);
|
);
|
||||||
)+
|
)+
|
||||||
}
|
}
|
||||||
|
@ -107,7 +95,7 @@ macro_rules! wrap_fields_accessor {
|
||||||
"` of the [`servicepoint::" $object_type "`]."]
|
"` of the [`servicepoint::" $object_type "`]."]
|
||||||
fn [<get _ $prop_name>](ref instance) -> $prop_type {
|
fn [<get _ $prop_name>](ref instance) -> $prop_type {
|
||||||
return instance.$prop_name;
|
return instance.$prop_name;
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -121,7 +109,7 @@ macro_rules! wrap_fields_accessor {
|
||||||
/// - The returned pointer may not be used in a function that consumes the instance, e.g. to create a command.
|
/// - The returned pointer may not be used in a function that consumes the instance, e.g. to create a command.
|
||||||
fn [<get _ $prop_name _mut>](mut instance) -> ::core::ptr::NonNull<$prop_type> {
|
fn [<get _ $prop_name _mut>](mut instance) -> ::core::ptr::NonNull<$prop_type> {
|
||||||
return ::core::ptr::NonNull::from(&mut instance.$prop_name);
|
return ::core::ptr::NonNull::from(&mut instance.$prop_name);
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -132,7 +120,7 @@ macro_rules! wrap_fields_accessor {
|
||||||
"` of the [`servicepoint::" $object_type "`]."]
|
"` of the [`servicepoint::" $object_type "`]."]
|
||||||
fn [<set _ $prop_name>](mut instance, value: val $prop_type) {
|
fn [<set _ $prop_name>](mut instance, value: val $prop_type) {
|
||||||
instance.$prop_name = value;
|
instance.$prop_name = value;
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -144,7 +132,7 @@ macro_rules! wrap_fields_accessor {
|
||||||
/// The provided value is moved into the instance, potentially invalidating previously taken references.
|
/// The provided value is moved into the instance, potentially invalidating previously taken references.
|
||||||
fn [<set _ $prop_name>](mut instance, value: move ::core::ptr::NonNull<$prop_type>) {
|
fn [<set _ $prop_name>](mut instance, value: move ::core::ptr::NonNull<$prop_type>) {
|
||||||
instance.$prop_name = value;
|
instance.$prop_name = value;
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -176,10 +164,10 @@ macro_rules! apply_param_modifier {
|
||||||
$param_name
|
$param_name
|
||||||
};
|
};
|
||||||
(mut, $param_name:ident) => {
|
(mut, $param_name:ident) => {
|
||||||
unsafe { $crate::macros::nonnull_as_mut!($param_name) }
|
unsafe { (&mut *$param_name.as_ptr()) }
|
||||||
};
|
};
|
||||||
(ref, $param_name:ident) => {
|
(ref, $param_name:ident) => {
|
||||||
unsafe { $crate::macros::nonnull_as_ref!($param_name) }
|
unsafe { $param_name.as_ref() }
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -189,7 +177,7 @@ macro_rules! wrap_function {
|
||||||
$(#[$meta:meta])+
|
$(#[$meta:meta])+
|
||||||
fn $function:ident($($param_name:ident: $param_modifier:ident $param_type:ty),*$(,)?)
|
fn $function:ident($($param_name:ident: $param_modifier:ident $param_type:ty),*$(,)?)
|
||||||
$(-> $return_type:ty)?
|
$(-> $return_type:ty)?
|
||||||
$block:block
|
$block:block;
|
||||||
) => {
|
) => {
|
||||||
::paste::paste! {
|
::paste::paste! {
|
||||||
$(#[$meta])*
|
$(#[$meta])*
|
||||||
|
@ -216,7 +204,7 @@ macro_rules! wrap_functions {
|
||||||
$(#[$meta:meta])+
|
$(#[$meta:meta])+
|
||||||
fn $function:ident($($param_name:ident: $param_modifier:ident $param_type:ty),*$(,)?)
|
fn $function:ident($($param_name:ident: $param_modifier:ident $param_type:ty),*$(,)?)
|
||||||
$(-> $return_type:ty)?
|
$(-> $return_type:ty)?
|
||||||
$block:block
|
$block:block;
|
||||||
)+
|
)+
|
||||||
) => {
|
) => {
|
||||||
::paste::paste! {
|
::paste::paste! {
|
||||||
|
@ -224,7 +212,7 @@ macro_rules! wrap_functions {
|
||||||
$crate::macros::wrap_function!($module;
|
$crate::macros::wrap_function!($module;
|
||||||
$(#[$meta])+
|
$(#[$meta])+
|
||||||
fn $function($($param_name: $param_modifier $param_type),*) $(-> $return_type)?
|
fn $function($($param_name: $param_modifier $param_type),*) $(-> $return_type)?
|
||||||
$block
|
$block;
|
||||||
);
|
);
|
||||||
)+
|
)+
|
||||||
}
|
}
|
||||||
|
@ -235,7 +223,7 @@ macro_rules! wrap_functions {
|
||||||
$(#[$meta:meta])+
|
$(#[$meta:meta])+
|
||||||
fn $function:ident($($param_name:ident: $param_modifier:ident $param_type:ty),*$(,)?)
|
fn $function:ident($($param_name:ident: $param_modifier:ident $param_type:ty),*$(,)?)
|
||||||
$(-> $return_type:ty)?
|
$(-> $return_type:ty)?
|
||||||
$block:block
|
$block:block;
|
||||||
)+
|
)+
|
||||||
) => {
|
) => {
|
||||||
::paste::paste! {
|
::paste::paste! {
|
||||||
|
@ -243,7 +231,7 @@ macro_rules! wrap_functions {
|
||||||
$(
|
$(
|
||||||
$(#[$meta])+
|
$(#[$meta])+
|
||||||
fn $function($($param_name: $param_modifier $param_type),*) $(-> $return_type)?
|
fn $function($($param_name: $param_modifier $param_type),*) $(-> $return_type)?
|
||||||
$block
|
$block;
|
||||||
)+
|
)+
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -251,7 +239,7 @@ macro_rules! wrap_functions {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) use {
|
pub(crate) use {
|
||||||
apply_param_modifier, derive_clone, derive_free, nonnull_as_mut,
|
apply_param_modifier, derive_clone, derive_free,
|
||||||
nonnull_as_ref, wrap_fields, wrap_fields_accessor, wrap_function,
|
wrap_fields, wrap_fields_accessor, wrap_function,
|
||||||
wrap_functions, wrap_method, wrap_methods,
|
wrap_functions, wrap_method, wrap_methods,
|
||||||
};
|
};
|
||||||
|
|
|
@ -15,7 +15,7 @@ wrap_functions!(associate Packet;
|
||||||
fn try_load(data: val ByteSlice) -> *mut Packet {
|
fn try_load(data: val ByteSlice) -> *mut Packet {
|
||||||
let data = unsafe { data.as_slice() };
|
let data = unsafe { data.as_slice() };
|
||||||
heap_move_ok(servicepoint::Packet::try_from(data))
|
heap_move_ok(servicepoint::Packet::try_from(data))
|
||||||
}
|
};
|
||||||
|
|
||||||
/// Creates a raw [Packet] from parts.
|
/// Creates a raw [Packet] from parts.
|
||||||
///
|
///
|
||||||
|
@ -28,7 +28,7 @@ wrap_functions!(associate Packet;
|
||||||
};
|
};
|
||||||
|
|
||||||
heap_move_nonnull(Packet { header, payload })
|
heap_move_nonnull(Packet { header, payload })
|
||||||
}
|
};
|
||||||
);
|
);
|
||||||
|
|
||||||
derive_clone!(Packet);
|
derive_clone!(Packet);
|
||||||
|
@ -87,6 +87,5 @@ wrap_functions!(sp;
|
||||||
}
|
}
|
||||||
Err(_) => false,
|
Err(_) => false,
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
|
@ -29,9 +29,8 @@ wrap_functions!(associate UdpSocket;
|
||||||
let host = unsafe { CStr::from_ptr(host.as_ptr()) }
|
let host = unsafe { CStr::from_ptr(host.as_ptr()) }
|
||||||
.to_str()
|
.to_str()
|
||||||
.expect("Bad encoding");
|
.expect("Bad encoding");
|
||||||
|
|
||||||
heap_move_ok(UdpSocket::bind_connect(host))
|
heap_move_ok(UdpSocket::bind_connect(host))
|
||||||
}
|
};
|
||||||
|
|
||||||
/// Creates a new instance of [UdpSocket].
|
/// Creates a new instance of [UdpSocket].
|
||||||
///
|
///
|
||||||
|
@ -47,7 +46,7 @@ wrap_functions!(associate UdpSocket;
|
||||||
fn open_ipv4(ip1: val u8, ip2: val u8, ip3: val u8, ip4: val u8, port: val u16) -> *mut UdpSocket {
|
fn open_ipv4(ip1: val u8, ip2: val u8, ip3: val u8, ip4: val u8, port: val u16) -> *mut UdpSocket {
|
||||||
let addr = SocketAddrV4::new(Ipv4Addr::from([ip1, ip2, ip3, ip4]), port);
|
let addr = SocketAddrV4::new(Ipv4Addr::from([ip1, ip2, ip3, ip4]), port);
|
||||||
heap_move_ok(UdpSocket::bind_connect(addr))
|
heap_move_ok(UdpSocket::bind_connect(addr))
|
||||||
}
|
};
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue