clippy: Put doc text type names and co. in backtics
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>pull/384/head
parent
3a5306e9dd
commit
36b7c00b97
|
@ -50,8 +50,8 @@ pub enum SubCommand {
|
|||
/// edit configuration files with `$EDITOR`/`$VISUAL`.
|
||||
EditConfig,
|
||||
/// create a sample configuration file with available configuration options.
|
||||
/// If PATH is not specified, meli will try to create it in
|
||||
/// $XDG_CONFIG_HOME/meli/config.toml
|
||||
/// If `PATH` is not specified, meli will try to create it in
|
||||
/// `$XDG_CONFIG_HOME/meli/config.toml`
|
||||
#[structopt(display_order = 1)]
|
||||
CreateConfig {
|
||||
#[structopt(value_name = "NEW_CONFIG_PATH", parse(from_os_str))]
|
||||
|
@ -69,8 +69,8 @@ pub enum SubCommand {
|
|||
Man(ManOpt),
|
||||
|
||||
#[structopt(display_order = 4)]
|
||||
/// Install manual pages to the first location provided by $MANPATH /
|
||||
/// manpath(1), unless you specify the directory as an argument.
|
||||
/// Install manual pages to the first location provided by `$MANPATH` /
|
||||
/// `manpath(1)`, unless you specify the directory as an argument.
|
||||
InstallMan {
|
||||
#[structopt(value_name = "DESTINATION_PATH", parse(from_os_str))]
|
||||
destination_path: Option<PathBuf>,
|
||||
|
@ -93,7 +93,7 @@ pub struct ManOpt {
|
|||
#[cfg_attr(feature = "cli-docs", structopt(default_value = "meli", possible_values=manpages::POSSIBLE_VALUES, value_name="PAGE", parse(try_from_str = manpages::parse_manpage)))]
|
||||
/// Name of manual page.
|
||||
pub page: manpages::ManPages,
|
||||
/// If true, output text in stdout instead of spawning $PAGER.
|
||||
/// If true, output text in stdout instead of spawning `$PAGER`.
|
||||
#[cfg(feature = "cli-docs")]
|
||||
#[cfg_attr(
|
||||
feature = "cli-docs",
|
||||
|
|
|
@ -120,11 +120,11 @@ pub enum MouseButton {
|
|||
Middle,
|
||||
/// Mouse wheel is going up.
|
||||
///
|
||||
/// This event is typically only used with Mouse::Press.
|
||||
/// This event is typically only used with [`MouseEvent::Press`].
|
||||
WheelUp,
|
||||
/// Mouse wheel is going down.
|
||||
///
|
||||
/// This event is typically only used with Mouse::Press.
|
||||
/// This event is typically only used with [`MouseEvent::Press`].
|
||||
WheelDown,
|
||||
}
|
||||
|
||||
|
|
|
@ -273,7 +273,7 @@ impl From<Error> for BackendEvent {
|
|||
#[derive(Clone, Debug)]
|
||||
pub enum RefreshEventKind {
|
||||
Update(EnvelopeHash, Box<Envelope>),
|
||||
/// Rename(old_hash, new_hash)
|
||||
/// `Rename(old_hash, new_hash)`
|
||||
Rename(EnvelopeHash, EnvelopeHash),
|
||||
Create(Box<Envelope>),
|
||||
Remove(EnvelopeHash),
|
||||
|
|
|
@ -55,7 +55,7 @@ pub enum NetworkErrorKind {
|
|||
RequestBodyNotRewindable,
|
||||
/// Connection (not request) timeout.
|
||||
Timeout,
|
||||
/// TooManyRedirects
|
||||
/// Too many redirects
|
||||
TooManyRedirects,
|
||||
/// Invalid TLS connection
|
||||
InvalidTLSConnection,
|
||||
|
|
|
@ -237,7 +237,7 @@ impl JmapConnection {
|
|||
.set(Some(req_instant), Ok(session))
|
||||
.await;
|
||||
|
||||
/* Fetch account identities. */
|
||||
// Fetch account identities.
|
||||
|
||||
let mut id_list = {
|
||||
let mut req = Request::new(self.request_no.clone());
|
||||
|
|
|
@ -48,7 +48,7 @@ pub struct EmailImport {
|
|||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub if_in_state: Option<State<EmailObject>>,
|
||||
/// o emails: `Id[EmailImport]`
|
||||
/// A map of creation id (client specified) to EmailImport objects.
|
||||
/// A map of creation id (client specified) to [`EmailImport`] objects.
|
||||
pub emails: IndexMap<Id<EmailObject>, EmailImportObject>,
|
||||
}
|
||||
|
||||
|
@ -131,11 +131,11 @@ pub enum EmailImportError {
|
|||
/// `RFC5322`, or even just with the same Message-ID `RFC5322`, to
|
||||
/// coexist within an account. In this case, it MUST reject attempts to
|
||||
/// import an Email considered to be a duplicate with an `alreadyExists`
|
||||
/// SetError.
|
||||
/// [`SetError`].
|
||||
AlreadyExists {
|
||||
description: Option<String>,
|
||||
/// An `existingId` property of type `Id` MUST be included on
|
||||
/// the SetError object with the id of the existing Email. If
|
||||
/// the [`SetError`] object with the id of the existing Email. If
|
||||
/// duplicates are allowed, the newly created Email object MUST
|
||||
/// have a separate id and independent mutable properties to the
|
||||
/// existing object.
|
||||
|
@ -143,21 +143,21 @@ pub enum EmailImportError {
|
|||
},
|
||||
/// If the `blobId`, `mailboxIds`, or `keywords` properties are invalid
|
||||
/// (e.g., missing, wrong type, id not found), the server MUST reject the
|
||||
/// import with an `invalidProperties` SetError.
|
||||
/// import with an `invalidProperties` [`SetError`].
|
||||
InvalidProperties {
|
||||
description: Option<String>,
|
||||
properties: Vec<String>,
|
||||
},
|
||||
/// If the Email cannot be imported because it would take the account
|
||||
/// over quota, the import should be rejected with an `overQuota`
|
||||
/// SetError.
|
||||
/// [`SetError`].
|
||||
OverQuota { description: Option<String> },
|
||||
/// If the blob referenced is not a valid message `RFC5322`, the server
|
||||
/// MAY modify the message to fix errors (such as removing NUL octets or
|
||||
/// fixing invalid headers). If it does this, the `blobId` on the
|
||||
/// response MUST represent the new representation and therefore be
|
||||
/// different to the `blobId` on the EmailImport object. Alternatively,
|
||||
/// the server MAY reject the import with an `invalidEmail` SetError.
|
||||
/// different to the `blobId` on the [`EmailImport`] object. Alternatively,
|
||||
/// the server MAY reject the import with an `invalidEmail` [`SetError`].
|
||||
InvalidEmail { description: Option<String> },
|
||||
/// An `ifInState` argument was supplied, and it does not match the current
|
||||
/// state.
|
||||
|
@ -189,7 +189,7 @@ pub struct EmailImportResponse {
|
|||
pub created: Option<IndexMap<Id<EmailObject>, EmailImportResult>>,
|
||||
|
||||
/// o notCreated: `Id[SetError]|null`
|
||||
/// A map of the creation id to a SetError object for each Email that
|
||||
/// 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: Option<IndexMap<Id<EmailObject>, EmailImportError>>,
|
||||
|
|
|
@ -33,52 +33,52 @@ pub struct IdentityObject {
|
|||
pub id: Id<IdentityObject>,
|
||||
|
||||
/// name: `String` (default: "")
|
||||
/// The "From" name the client SHOULD use when creating a new Email
|
||||
/// from this Identity.
|
||||
/// The "From" name the client SHOULD use when creating a new
|
||||
/// [`Email`](EmailObject) from this Identity.
|
||||
#[serde(default)]
|
||||
pub name: String,
|
||||
|
||||
/// email: `String` (immutable)
|
||||
/// The "From" email address the client MUST use when creating a new
|
||||
/// Email from this Identity. If the "mailbox" part of the address
|
||||
/// (the section before the "@") is the single character "*" (e.g.,
|
||||
/// "*@example.com"), the client may use any valid address ending in
|
||||
/// that domain (e.g., "[email protected]").
|
||||
/// [`Email`](EmailObject) from this Identity. If the "mailbox" part of the
|
||||
/// address (the section before the "@") is the single character "*"
|
||||
/// (e.g., "*@example.com"), the client may use any valid address ending
|
||||
/// in that domain (e.g., "[email protected]").
|
||||
pub email: String,
|
||||
|
||||
/// replyTo: `EmailAddress[]|null` (default: null)
|
||||
/// The Reply-To value the client SHOULD set when creating a new Email
|
||||
/// from this Identity.
|
||||
/// The Reply-To value the client SHOULD set when creating a new
|
||||
/// [`Email`](EmailObject) from this Identity.
|
||||
#[serde(default)]
|
||||
pub reply_to: Option<Vec<EmailAddress>>,
|
||||
|
||||
/// bcc: `EmailAddress[]|null` (default: null)
|
||||
/// The Bcc value the client SHOULD set when creating a new Email from
|
||||
/// this Identity.
|
||||
/// The Bcc value the client SHOULD set when creating a new
|
||||
/// [`Email`](EmailObject) from this Identity.
|
||||
#[serde(default)]
|
||||
pub bcc: Option<Vec<EmailAddress>>,
|
||||
|
||||
/// textSignature: `String` (default: "")
|
||||
/// A signature the client SHOULD insert into new plaintext messages
|
||||
// that will be sent from this Identity. Clients MAY ignore this
|
||||
// and/or combine this with a client-specific signature preference.
|
||||
/// that will be sent from this Identity. Clients MAY ignore this
|
||||
/// and/or combine this with a client-specific signature preference.
|
||||
#[serde(default)]
|
||||
pub text_signature: String,
|
||||
|
||||
/// htmlSignature: `String` (default: "")
|
||||
/// A signature the client SHOULD insert into new HTML messages that
|
||||
/// will be sent from this Identity. This text MUST be an HTML
|
||||
/// snippet to be inserted into the "<body></body>" section of the
|
||||
/// HTML. Clients MAY ignore this and/or combine this with a client-
|
||||
/// will be sent from this Identity. This text MUST be an HTML
|
||||
/// snippet to be inserted into the `<body></body>` section of the
|
||||
/// HTML. Clients MAY ignore this and/or combine this with a client-
|
||||
/// specific signature preference.
|
||||
#[serde(default)]
|
||||
pub html_signature: String,
|
||||
|
||||
/// mayDelete: `Boolean` (server-set)
|
||||
/// Is the user allowed to delete this Identity? Servers may wish to
|
||||
/// set this to false for the user's username or other default
|
||||
/// address. Attempts to destroy an Identity with "mayDelete: false"
|
||||
/// will be rejected with a standard "forbidden" SetError.
|
||||
/// Is the user allowed to delete this Identity? Servers may wish to
|
||||
/// set this to `false` for the user's username or other default
|
||||
/// address. Attempts to destroy an Identity with "mayDelete: false"
|
||||
/// will be rejected with a standard "forbidden" [`SetError`].
|
||||
#[serde(skip_serializing)]
|
||||
pub may_delete: bool,
|
||||
}
|
||||
|
@ -102,7 +102,7 @@ impl Method<IdentityObject> for IdentityChanges {
|
|||
///
|
||||
/// ```text
|
||||
/// This is a standard "/set" method as described in [RFC8620],
|
||||
/// Section 5.3. The following extra SetError types are defined:
|
||||
/// Section 5.3. The following extra [`SetError`] types are defined:
|
||||
/// For "create":
|
||||
/// o "forbiddenFrom": The user is not allowed to send from the address
|
||||
/// given as the "email" property of the Identity.
|
||||
|
|
|
@ -103,11 +103,13 @@ impl Method<MailboxObject> for MailboxGet {
|
|||
///
|
||||
/// For `destroy`:
|
||||
///
|
||||
/// - `mailboxHasChild`: The Mailbox still has at least one child Mailbox. The
|
||||
/// client MUST remove these before it can delete the parent Mailbox.
|
||||
/// - `mailboxHasChild`: The [`Mailbox`](MailboxObject) still has at least one
|
||||
/// child [`Mailbox`](MailboxObject). The client MUST remove these before it
|
||||
/// can delete the parent [`Mailbox`](MailboxObject).
|
||||
///
|
||||
/// - `mailboxHasEmail`: The Mailbox has at least one Email assigned to it, and
|
||||
/// the `onDestroyRemoveEmails` argument was false.
|
||||
/// - `mailboxHasEmail`: The [`Mailbox`](MailboxObject) has at least one
|
||||
/// [`Email`](EmailObject) assigned to it, and the `onDestroyRemoveEmails`
|
||||
/// argument was false.
|
||||
#[derive(Debug, Deserialize, Serialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct MailboxSet {
|
||||
|
@ -115,11 +117,13 @@ pub struct MailboxSet {
|
|||
pub set_call: Set<MailboxObject>,
|
||||
/// onDestroyRemoveEmails: `Boolean` (default: false)
|
||||
///
|
||||
/// If false, any attempt to destroy a Mailbox that still has Emails
|
||||
/// in it will be rejected with a `mailboxHasEmail` SetError. If
|
||||
/// true, any Emails that were in the Mailbox will be removed from it,
|
||||
/// and if in no other Mailboxes, they will be destroyed when the
|
||||
/// Mailbox is destroyed.
|
||||
/// If false, any attempt to destroy a [`Mailbox`](MailboxObject) that still
|
||||
/// has [`Email`s](EmailObject) in it will be rejected with a
|
||||
/// `mailboxHasEmail` [`SetError`]. If
|
||||
/// true, any [`Email`s](EmailObject) that were in the
|
||||
/// [`Mailbox`](MailboxObject) will be removed from it, and if in no
|
||||
/// other [`Mailbox`es](MailboxObject), they will be destroyed when the
|
||||
/// [`Mailbox`](MailboxObject) is destroyed.
|
||||
#[serde(default)]
|
||||
pub on_destroy_remove_emails: bool,
|
||||
}
|
||||
|
|
|
@ -293,9 +293,9 @@ pub struct EmailSubmissionSet {
|
|||
/// A map of [`EmailSubmissionObject`] id to an object containing properties
|
||||
/// to update on the [`Email`](EmailObject) object referenced by the
|
||||
/// [`EmailSubmissionObject`] if the create/update/destroy succeeds. (For
|
||||
/// references to EmailSubmissions created in the same
|
||||
/// `/set` invocation, this is equivalent to a creation-reference, so the id
|
||||
/// will be the creation id prefixed with a `#`.)
|
||||
/// references to [`EmailSubmissions`](EmailSubmissionObject) created in the
|
||||
/// same `/set` invocation, this is equivalent to a creation-reference,
|
||||
/// so the id will be the creation id prefixed with a `#`.)
|
||||
#[serde(default)]
|
||||
pub on_success_update_email: Option<IndexMap<Id<EmailSubmissionObject>, PatchObject>>,
|
||||
/// onSuccessDestroyEmail: `Id[]|null`
|
||||
|
|
|
@ -726,7 +726,7 @@ where
|
|||
/// A map of an id to a Patch object to apply to the current Foo
|
||||
/// object with that id, or null if no objects are to be updated.
|
||||
///
|
||||
/// A *PatchObject* is of type `String[*]` and represents an unordered
|
||||
/// A [`PatchObject`] is of type `String[*]` and represents an unordered
|
||||
/// set of patches. The keys are a path in JSON Pointer format
|
||||
/// `RFC6901`, with an implicit leading `/` (i.e., prefix each key
|
||||
/// with `/` before applying the JSON Pointer evaluation algorithm).
|
||||
|
@ -741,8 +741,8 @@ where
|
|||
/// * All parts prior to the last (i.e., the value after the final slash)
|
||||
/// MUST already exist on the object being patched.
|
||||
///
|
||||
/// * There MUST NOT be two patches in the PatchObject where the pointer
|
||||
/// of one is the prefix of the pointer of the other, e.g.,
|
||||
/// * There MUST NOT be two patches in the [`PatchObject`] where the
|
||||
/// pointer of one is the prefix of the pointer of the other, e.g.,
|
||||
/// `alerts/1/offset` and `alerts`.
|
||||
///
|
||||
/// The value associated with each pointer determines how to apply
|
||||
|
@ -758,10 +758,10 @@ where
|
|||
/// Any server-set properties MAY be included in the patch if their
|
||||
/// value is identical to the current server value (before applying
|
||||
/// the patches to the object). Otherwise, the update MUST be
|
||||
/// rejected with an `invalidProperties` SetError.
|
||||
/// rejected with an `invalidProperties` [`SetError`].
|
||||
///
|
||||
/// This patch definition is designed such that an entire Foo object
|
||||
/// is also a valid PatchObject. The client may choose to optimise
|
||||
/// is also a valid [`PatchObject`]. The client may choose to optimise
|
||||
/// network usage by just sending the diff or may send the whole
|
||||
/// object; the server processes it the same either way.
|
||||
pub update: Option<IndexMap<Argument<Id<OBJ>>, PatchObject>>,
|
||||
|
@ -876,7 +876,7 @@ pub struct SetResponse<OBJ: Object> {
|
|||
/// successfully updated.
|
||||
///
|
||||
/// The value for each id is a Foo object containing any property that
|
||||
/// changed in a way *not* explicitly requested by the PatchObject
|
||||
/// changed in a way *not* explicitly requested by the [`PatchObject`]
|
||||
/// sent to the server, or null if none. This lets the client know of
|
||||
/// any changes to server-set or computed properties.
|
||||
///
|
||||
|
@ -889,17 +889,17 @@ pub struct SetResponse<OBJ: Object> {
|
|||
pub destroyed: Option<Vec<Id<OBJ>>>,
|
||||
/// o notCreated: `Id[SetError]|null`
|
||||
///
|
||||
/// A map of the creation id to a SetError object for each record that
|
||||
/// A map of the creation id to a [`SetError`] object for each record that
|
||||
/// failed to be created, or null if all successful.
|
||||
pub not_created: Option<Vec<SetError>>,
|
||||
/// o notUpdated: `Id[SetError]|null`
|
||||
///
|
||||
/// A map of the Foo id to a SetError object for each record that
|
||||
/// A map of the Foo id to a [`SetError`] object for each record that
|
||||
/// failed to be updated, or null if all successful.
|
||||
pub not_updated: Option<Vec<SetError>>,
|
||||
/// o notDestroyed: `Id[SetError]|null`
|
||||
///
|
||||
/// A map of the Foo id to a SetError object for each record that
|
||||
/// A map of the Foo id to a [`SetError`] object for each record that
|
||||
/// failed to be destroyed, or null if all successful.//
|
||||
pub not_destroyed: Option<Vec<SetError>>,
|
||||
}
|
||||
|
@ -938,8 +938,8 @@ pub enum SetError {
|
|||
/// (update; destroy). The id given to update/destroy cannot be found.
|
||||
NotFound(Option<String>),
|
||||
|
||||
/// (update). The PatchObject given to update the record was not a valid
|
||||
/// patch (see the patch description).
|
||||
/// (update). The [`PatchObject`] given to update the record was not a
|
||||
/// valid patch (see the patch description).
|
||||
InvalidPatch(Option<String>),
|
||||
|
||||
/// (update). The client requested that an object be both updated and
|
||||
|
@ -1254,7 +1254,7 @@ pub struct QueryChangesResponse<OBJ: Object> {
|
|||
/// The array MUST be sorted in order of index, with the lowest index
|
||||
/// first.
|
||||
|
||||
/// An *AddedItem* object has the following properties:
|
||||
/// An [`AddedItem`] object has the following properties:
|
||||
|
||||
/// * id: `Id`
|
||||
|
||||
|
|
Loading…
Reference in New Issue