Struct didcomm_rs::Problem
source · [−]pub struct Problem { /* private fields */ }
Implementations
sourceimpl Problem
impl Problem
sourcepub fn from_code(code: &str) -> Result<Self, Error>
pub fn from_code(code: &str) -> Result<Self, Error>
Parses given code into new instance of Problem If given string does not match regex “” - returns Err.
sourcepub fn from_known_problem(problem: KnownProblems) -> Self
pub fn from_known_problem(problem: KnownProblems) -> Self
Takes KnownProblem
variant and creates new Problem
using it as code.
Kwnown problems are defined in the specifications of
the didcomm v2.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Problem
impl<'de> Deserialize<'de> for Problem
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for Problem
impl Send for Problem
impl Sync for Problem
impl Unpin for Problem
impl UnwindSafe for Problem
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more