feat: add ProblemDetails module for Verifiable Credentials Data Model v2.0 - #585
Open
laysakura wants to merge 1 commit into
Open
feat: add ProblemDetails module for Verifiable Credentials Data Model v2.0#585laysakura wants to merge 1 commit into
laysakura wants to merge 1 commit into
Conversation
laysakura
force-pushed
the
feat/ProblemDetails
branch
from
July 23, 2024 07:42
46f4713 to
524ca52
Compare
laysakura
force-pushed
the
feat/ProblemDetails
branch
from
July 23, 2024 07:44
524ca52 to
9d4e4d6
Compare
timothee-haudebourg
requested changes
Aug 23, 2024
| } | ||
|
|
||
| impl ProblemDetails { | ||
| pub fn new<T: ProblemType>(problem_type: T, title: String, detail: String) -> Self { |
Contributor
There was a problem hiding this comment.
you can use problem_type: impl ProblemType directly instead of declaring a new type parameter.
|
|
||
| use crate::syntax::RequiredContext; | ||
|
|
||
| mod algorithm; |
Contributor
There was a problem hiding this comment.
I don't think the algorithm module will contain anything else so I would put it in its own problem module.
pub mod problem;
pub use problem::ProblemDetails;
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements Problem Details as a struct, with JSON serialize.
Usecases: