feat: Add Status with Details Constructor (#308)

This commit is contained in:
Cameron
2020-03-30 10:01:01 -04:00
committed by GitHub
parent 2e082f8b3e
commit cfd59dbb34
+9
View File
@@ -401,6 +401,15 @@ impl Status {
Ok(())
}
/// Create a new `Status` with the associated code, message, and binary details field.
pub fn with_details(code: Code, message: impl Into<String>, details: Bytes) -> Status {
Status {
code,
message: message.into(),
details: details,
}
}
}
impl fmt::Debug for Status {