Skip to content

Commit 90c7a21

Browse files
committed
More documentation updates
1 parent 30be0ca commit 90c7a21

File tree

3 files changed

+48
-11
lines changed

3 files changed

+48
-11
lines changed

src/types/get_folder.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@ use crate::{
1616
#[derive(Debug, XmlSerialize)]
1717
#[xml_struct(default_ns = MESSAGES_NS_URI)]
1818
pub struct GetFolder {
19+
/// A description of the information to be included in the response for each
20+
/// retrieved folder.
1921
pub folder_shape: FolderShape,
22+
23+
/// A list of IDs for which to retrieve folder information.
2024
pub folder_ids: Vec<BaseFolderId>,
2125
}
2226

@@ -62,8 +66,11 @@ pub struct ResponseMessages {
6266
#[derive(Debug, Deserialize)]
6367
#[serde(rename_all = "PascalCase")]
6468
pub struct GetFolderResponseMessage {
69+
/// The success value of the corresponding request.
6570
#[serde(rename = "@ResponseClass")]
6671
pub response_class: ResponseClass,
72+
73+
/// A collection of the retrieved folders.
6774
pub folders: Folders,
6875
}
6976

src/types/soap.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use crate::{
1414
mod de;
1515
use self::de::DummyEnvelope;
1616

17-
/// A SOAP envelope wrapping an EWS operation.
17+
/// A SOAP envelope containing the body of an EWS operation or response.
1818
///
1919
/// See <https://www.w3.org/TR/2000/NOTE-SOAP-20000508/#_Toc478383494>
2020
#[derive(Debug)]

src/types/sync_folder_hierarchy.rs

Lines changed: 40 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,26 @@ use crate::{
1010
OperationResponse, ResponseClass, MESSAGES_NS_URI,
1111
};
1212

13-
/// The request for update regarding the folder hierarchy in a mailbox.
13+
/// A request for a list of folders which have been created, updated, or deleted
14+
/// server-side.
1415
///
1516
/// See <https://learn.microsoft.com/en-us/exchange/client-developer/web-service-reference/syncfolderhierarchy>
1617
#[derive(Debug, XmlSerialize)]
1718
#[xml_struct(default_ns = MESSAGES_NS_URI)]
1819
pub struct SyncFolderHierarchy {
20+
/// A description of the information to be included in the response for each
21+
/// changed folder.
1922
pub folder_shape: FolderShape,
23+
24+
/// The ID of the folder to sync.
2025
pub sync_folder_id: Option<BaseFolderId>,
26+
27+
/// The synchronization state after which to list changes.
28+
///
29+
/// If `None`, the response will include `Create` changes for each folder
30+
/// which is a descendant of the requested folder.
31+
///
32+
/// See <https://learn.microsoft.com/en-us/exchange/client-developer/web-service-reference/syncstate-ex15websvcsotherref>
2133
pub sync_state: Option<String>,
2234
}
2335

@@ -31,7 +43,7 @@ impl EnvelopeBodyContents for SyncFolderHierarchy {
3143
}
3244
}
3345

34-
/// The response to a SyncFolderHierarchy request.
46+
/// A response to a [`SyncFolderHierarchy`] request.
3547
///
3648
/// See <https://learn.microsoft.com/en-us/exchange/client-developer/web-service-reference/syncfolderhierarchyresponse>
3749
#[derive(Debug, Deserialize)]
@@ -48,27 +60,40 @@ impl EnvelopeBodyContents for SyncFolderHierarchyResponse {
4860
}
4961
}
5062

51-
/// A collection of response messages from a SyncFolderHierarchy response.
63+
/// A collection of responses for individual entities within a request.
64+
///
65+
/// See <https://learn.microsoft.com/en-us/exchange/client-developer/web-service-reference/responsemessages>
5266
#[derive(Debug, Deserialize)]
5367
#[serde(rename_all = "PascalCase")]
5468
pub struct ResponseMessages {
5569
pub sync_folder_hierarchy_response_message: Vec<SyncFolderHierarchyResponseMessage>,
5670
}
5771

58-
/// A message in a SyncFolderHierarchy response.
72+
/// A response to a request for an individual folder within a [`SyncFolderHierarchy`] operation.
5973
///
6074
/// See <https://learn.microsoft.com/en-us/exchange/client-developer/web-service-reference/syncfolderhierarchyresponsemessage>
6175
#[derive(Debug, Deserialize)]
6276
#[serde(rename_all = "PascalCase")]
6377
pub struct SyncFolderHierarchyResponseMessage {
78+
/// The success value of the corresponding request.
6479
#[serde(rename = "@ResponseClass")]
6580
pub response_class: ResponseClass,
81+
82+
/// An identifier for the synchronization state following application of the
83+
/// changes included in this response.
6684
pub sync_state: String,
85+
86+
/// Whether all relevant folder changes have been synchronized following
87+
/// this response.
6788
pub includes_last_folder_in_range: bool,
89+
90+
/// The collection of changes between the prior synchronization state and
91+
/// the one represented by this response.
6892
pub changes: Changes,
6993
}
7094

71-
/// The changes that happened since the last folder hierachy sync.
95+
/// A sequentially-ordered collection of folder creations, updates, and
96+
/// deletions.
7297
///
7398
/// See <https://learn.microsoft.com/en-us/exchange/client-developer/web-service-reference/changes-hierarchy>
7499
#[derive(Debug, Deserialize)]
@@ -77,29 +102,34 @@ pub struct Changes {
77102
pub inner: Vec<Change>,
78103
}
79104

80-
/// A single change described in a SyncFolderHierarchy response message.
105+
/// A server-side change to a folder.
81106
///
82107
/// See <https://learn.microsoft.com/en-us/exchange/client-developer/web-service-reference/changes-hierarchy>
83108
#[derive(Debug, Deserialize)]
84109
pub enum Change {
85-
/// A folder to create.
110+
/// A creation of a folder.
86111
///
87112
/// See <https://learn.microsoft.com/en-us/exchange/client-developer/web-service-reference/create-foldersync>
88113
Create {
114+
/// The state of the folder upon creation.
89115
#[serde(rename = "$value")]
90116
folder: Folder,
91117
},
92118

93-
/// A folder to update.
119+
/// An update to a folder.
94120
///
95121
/// See <https://learn.microsoft.com/en-us/exchange/client-developer/web-service-reference/update-foldersync>
96122
Update {
123+
/// The updated state of the folder.
97124
#[serde(rename = "$value")]
98125
folder: Folder,
99126
},
100127

101-
/// A folder to delete.
128+
/// A deletion of a folder.
102129
///
103130
/// See <https://learn.microsoft.com/en-us/exchange/client-developer/web-service-reference/delete-foldersync>
104-
Delete(FolderId),
131+
Delete(
132+
/// The EWS ID for the deleted folder.
133+
FolderId
134+
),
105135
}

0 commit comments

Comments
 (0)