pub struct CrudMapping {
pub create_endpoint: String,
pub create_schema: String,
pub update_endpoint: Option<String>,
pub update_schema: Option<String>,
pub read_endpoint: String,
pub read_schema: String,
pub read_response_schema: Option<String>,
pub delete_endpoint: String,
pub delete_schema: String,
}Expand description
Maps CRUD operations to API endpoints and schemas.
Fields§
§create_endpoint: StringAPI path for the create operation.
create_schema: StringOpenAPI schema name for the create request body.
update_endpoint: Option<String>API path for the update operation, if separate.
update_schema: Option<String>OpenAPI schema name for the update request body.
read_endpoint: StringAPI path for the read operation.
read_schema: StringOpenAPI schema name for the read request body.
read_response_schema: Option<String>OpenAPI schema name for the read response, if different.
delete_endpoint: StringAPI path for the delete operation.
delete_schema: StringOpenAPI schema name for the delete request body.
Trait Implementations§
Source§impl Clone for CrudMapping
impl Clone for CrudMapping
Source§impl Debug for CrudMapping
impl Debug for CrudMapping
Source§impl Default for CrudMapping
impl Default for CrudMapping
Source§impl<'de> Deserialize<'de> for CrudMapping
impl<'de> Deserialize<'de> for CrudMapping
Source§fn 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
Source§impl From<&CrudMapping> for CrudInfo
impl From<&CrudMapping> for CrudInfo
Source§fn from(crud: &CrudMapping) -> Self
fn from(crud: &CrudMapping) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for CrudMapping
impl RefUnwindSafe for CrudMapping
impl Send for CrudMapping
impl Sync for CrudMapping
impl Unpin for CrudMapping
impl UnsafeUnpin for CrudMapping
impl UnwindSafe for CrudMapping
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