melib/jmap: make `null` fields into Option<_>s

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
pull/279/head
Manos Pitsidianakis 2023-08-28 14:21:47 +03:00
parent 4f9b97736a
commit 11432ba2c3
Signed by: Manos Pitsidianakis
GPG Key ID: 7729C7707F7E09D0
2 changed files with 3 additions and 3 deletions

View File

@ -186,13 +186,13 @@ pub struct ImportResponse {
/// A map of the creation id to an object containing the `id`,
/// `blobId`, `threadId`, and `size` properties for each successfully
/// imported Email, or null if none.
pub created: IndexMap<Id<EmailObject>, ImportEmailResult>,
pub created: Option<IndexMap<Id<EmailObject>, ImportEmailResult>>,
/// o notCreated: `Id[SetError]|null`
/// A map of the creation id to a SetError object for each Email that
/// failed to be created, or null if all successful. The possible
/// errors are defined above.
pub not_created: IndexMap<Id<EmailObject>, ImportError>,
pub not_created: Option<IndexMap<Id<EmailObject>, ImportError>>,
}
impl std::convert::TryFrom<&RawValue> for ImportResponse {

View File

@ -852,7 +852,7 @@ pub struct SetResponse<OBJ: Object> {
/// The state string that would have been returned by `Foo/get` before
/// making the requested changes, or null if the server doesn't know
/// what the previous state string was.
pub old_state: State<OBJ>,
pub old_state: Option<State<OBJ>>,
/// o newState: `String`
///
/// The state string that will now be returned by `Foo/get`.