feat: Add Status with Details Constructor (#308)
This commit is contained in:
@@ -401,6 +401,15 @@ impl Status {
|
|||||||
|
|
||||||
Ok(())
|
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 {
|
impl fmt::Debug for Status {
|
||||||
|
|||||||
Reference in New Issue
Block a user