-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RE review: move attachment format specifier
Signed-off-by: George Mulhearn <[email protected]>
- Loading branch information
1 parent
b4aa4dc
commit 92e8ed9
Showing
13 changed files
with
58 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
messages/src/msg_fields/protocols/common/attachment_format_specifier.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
use serde::{Deserialize, Serialize}; | ||
use shared_vcx::maybe_known::MaybeKnown; | ||
use typed_builder::TypedBuilder; | ||
|
||
/// Specifies that a particular Attachment, with the id of `attach_id`, has the format of `format`. | ||
#[derive(Debug, Serialize, Deserialize, Clone, PartialEq, TypedBuilder)] | ||
#[serde(rename_all = "snake_case")] | ||
pub struct AttachmentFormatSpecifier<F> { | ||
pub attach_id: String, | ||
pub format: MaybeKnown<F>, | ||
} | ||
|
||
/// If `attach_id` is not [None], this specifies that a particular Attachment, with the id of | ||
/// `attach_id`, has the format of `format`. If `attach_id` is [None], this structure is used to | ||
/// indicate that a particular attachment `format` is supported by the sender of the message. | ||
#[derive(Debug, Serialize, Deserialize, Clone, PartialEq, TypedBuilder)] | ||
#[serde(rename_all = "snake_case")] | ||
pub struct OptionalIdAttachmentFormatSpecifier<F> { | ||
#[builder(default)] | ||
#[serde(skip_serializing_if = "Option::is_none")] | ||
pub attach_id: Option<String>, | ||
pub format: MaybeKnown<F>, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pub mod attachment_format_specifier; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
pub mod basic_message; | ||
pub mod common; | ||
pub mod connection; | ||
pub mod cred_issuance; | ||
pub mod discover_features; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters