A MsgId newtype

This more strongly types the ubiquitous message id type by no longer
making it an integer.  It keeps the actual ID opaque.  Only for the
generic job API the number keeps being used.  Some locations also need
to create it from an integer and call MsgId::new().
This commit is contained in:
Floris Bruynooghe
2019-10-20 23:47:48 +02:00
committed by holger krekel
parent c6adbe939d
commit c8d296ea0e
18 changed files with 806 additions and 465 deletions

View File

@@ -49,6 +49,14 @@ pub enum Param {
/// For Messages
Error = b'L',
/// For Messages: space-separated list of messaged IDs of forwarded copies.
///
/// This is used when a [Message] is in the
/// [MessageState::OutPending] state but is already forwarded.
/// In this case the forwarded messages are written to the
/// database and their message IDs are added to this parameter of
/// the original message, which is also saved in the database.
/// When the original message is then finally sent this parameter
/// is used to also send all the forwarded messages.
PrepForwards = b'P',
/// For Jobs
SetLatitude = b'l',