#[non_exhaustive]pub struct DefaultMeta {
pub request_id: String,
pub links: Option<Links>,
pub custom: HashMap<String, String>,
}
Expand description
Default meta type
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.request_id: String
§links: Option<Links>
§custom: HashMap<String, String>
Implementations§
Source§impl DefaultMeta
impl DefaultMeta
pub fn new(request_id: impl Into<String>) -> Self
pub fn with_links(self, links: Links) -> Self
pub fn with_links_info( self, self_link: impl Into<String>, next: Option<impl Into<String>>, prev: Option<impl Into<String>>, ) -> Self
pub fn insert_custom( self, key: impl Into<String>, value: impl Into<String>, ) -> Self
Trait Implementations§
Source§impl Debug for DefaultMeta
impl Debug for DefaultMeta
Source§impl<'de> Deserialize<'de> for DefaultMeta
impl<'de> Deserialize<'de> for DefaultMeta
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
Auto Trait Implementations§
impl Freeze for DefaultMeta
impl RefUnwindSafe for DefaultMeta
impl Send for DefaultMeta
impl Sync for DefaultMeta
impl Unpin for DefaultMeta
impl UnwindSafe for DefaultMeta
Blanket Implementations§
Source§impl<Data> ApiSuccessResponse for Data
impl<Data> ApiSuccessResponse for Data
fn api_success_response<Meta>( self, meta: Option<Meta>, ) -> ApiResponse<Self, Meta>
fn api_success_without_meta<Meta>(self) -> ApiResponse<Self, Meta>
fn api_success_with_meta<Meta>(self, meta: Meta) -> ApiResponse<Self, Meta>
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