pub struct Response { /* private fields */ }Expand description
The complete result of one invocation.
Implementations§
Source§impl Response
impl Response
Sourcepub const fn success(command: Command, data: Value) -> Self
pub const fn success(command: Command, data: Value) -> Self
Builds a successful response carrying one redacted projection.
Sourcepub const fn failed(
command: Command,
category: ExitCategory,
data: Value,
) -> Self
pub const fn failed( command: Command, category: ExitCategory, data: Value, ) -> Self
Builds a response that reports a non-success category.
Sourcepub fn with_page(self, page: PageInfo) -> Self
pub fn with_page(self, page: PageInfo) -> Self
Attaches the pagination fields of a paginated command.
Sourcepub fn with_diagnostic(self, diagnostic: Diagnostic) -> Self
pub fn with_diagnostic(self, diagnostic: Diagnostic) -> Self
Attaches one bounded diagnostic record.
Sourcepub const fn category(&self) -> ExitCategory
pub const fn category(&self) -> ExitCategory
Returns the exit category this response reports.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Response
impl RefUnwindSafe for Response
impl Send for Response
impl Sync for Response
impl Unpin for Response
impl UnsafeUnpin for Response
impl UnwindSafe for Response
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more