melib/jmap: make `null` fields into Option<_>s
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>pull/279/head
parent
4f9b97736a
commit
11432ba2c3
|
@ -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 {
|
||||
|
|
|
@ -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`.
|
||||
|
|
Loading…
Reference in New Issue