This diff introduces changes to the FCM library wrapper and fcm_status shared enum.
To distinguish common errors and wrong/expired device token errors the function should return different results.
Following a current keyserver's approach we should check for the following errors:
- For NotRegistered response which is similar to the keyserver's check.
- For InvalidRegistration response which is similar to the keyserver's check.
To pass the different errors to the C++ level the best and most elegant way is to return enum as Ok Rust result which formats like:
enum fcm_status { Ok, InvalidRegistration, NotRegistered, }
and use CXX shared types.
Because when can't distinguish error types from Rust on the C++ side, they are always rust::error type and have only what() method.
Also, we will catch the common errors which are not needed to be distinguished using the catch approach.
Related Linear task: ENG-1764