pub enum PostEditionResponse {
PostEdtion(Json<PostResponseSuccess>),
Forbiden,
Err(Json<String>),
}Expand description
Post/Note Edition Response
§Responds
Tells the user basic info to find there post or show why there request failed.
Variants§
PostEdtion(Json<PostResponseSuccess>)
Edit Completed Successfuly
Forbiden
Err(Json<String>)
Bad Request With Error Response
Dev notes: Might Not be needed…
Trait Implementations§
Source§impl ApiResponse for PostEditionResponse
impl ApiResponse for PostEditionResponse
Source§const BAD_REQUEST_HANDLER: bool = false
const BAD_REQUEST_HANDLER: bool = false
If true, it means that the response object has a custom bad request
handler.
Source§fn register(registry: &mut Registry)
fn register(registry: &mut Registry)
Register the schema contained in this response object to the registry.
Source§fn from_parse_request_error(err: Error) -> Self
fn from_parse_request_error(err: Error) -> Self
Convert
poem::Error to this response object.Source§impl From<PostEditionResponse> for Error
impl From<PostEditionResponse> for Error
Source§fn from(resp: PostEditionResponse) -> Error
fn from(resp: PostEditionResponse) -> Error
Converts to this type from the input type.
Source§impl IntoResponse for PostEditionResponse
impl IntoResponse for PostEditionResponse
Source§fn into_response(self) -> Response
fn into_response(self) -> Response
Consume itself and return
Response.Source§fn with_header<K, V>(self, key: K, value: V) -> WithHeader<Self>
fn with_header<K, V>(self, key: K, value: V) -> WithHeader<Self>
Wrap an
impl IntoResponse to add a header. Read moreSource§fn with_content_type<V>(self, content_type: V) -> WithContentType<Self>
fn with_content_type<V>(self, content_type: V) -> WithContentType<Self>
Wrap an
impl IntoResponse to with a new content type. Read moreSource§fn with_status(self, status: StatusCode) -> WithStatus<Self>where
Self: Sized,
fn with_status(self, status: StatusCode) -> WithStatus<Self>where
Self: Sized,
Wrap an
impl IntoResponse to set a status code. Read moreAuto Trait Implementations§
impl Freeze for PostEditionResponse
impl RefUnwindSafe for PostEditionResponse
impl Send for PostEditionResponse
impl Sync for PostEditionResponse
impl Unpin for PostEditionResponse
impl UnwindSafe for PostEditionResponse
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> 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 moreSource§impl<T> IntoResult<T> for Twhere
T: IntoResponse,
impl<T> IntoResult<T> for Twhere
T: IntoResponse,
Source§fn into_result(self) -> Result<T, Error>
fn into_result(self) -> Result<T, Error>
Consumes this value returns a
poem::Result<T>.