#[non_exhaustive]pub struct ErrCode {
pub err_type: ErrType,
pub mod_path: ModPath,
}
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.err_type: ErrType
§mod_path: ModPath
Implementations§
Source§impl ErrCode
impl ErrCode
pub const fn new(err_type: ErrType, mod_path: ModPath) -> Self
pub fn code(&self) -> i32
pub const fn err_type(&self) -> &ErrType
pub const fn err_segment(&self) -> ErrSegment
pub const fn text(&self) -> &'static str
pub const fn mod_path(&self) -> ModPath
pub const fn mod1(&self) -> ModSection
pub const fn mod2(&self) -> ModSection
pub const fn mod3(&self) -> ModSection
pub const fn with_mod1(self, mod1: ModSection) -> Self
pub const fn with_mod2(self, mod2: ModSection) -> Self
pub const fn with_mod3(self, mod3: ModSection) -> Self
pub fn to_api_error(self) -> ApiError
Trait Implementations§
impl Copy for ErrCode
impl Eq for ErrCode
impl StructuralPartialEq for ErrCode
Auto Trait Implementations§
impl Freeze for ErrCode
impl RefUnwindSafe for ErrCode
impl Send for ErrCode
impl Sync for ErrCode
impl Unpin for ErrCode
impl UnwindSafe for ErrCode
Blanket Implementations§
Source§impl<Data> ApiSuccessResponse for Data
impl<Data> ApiSuccessResponse for Data
fn api_response<Meta>(self, meta: Option<Meta>) -> ApiResponse<Self, Meta>
fn api_response_without_meta<Meta>(self) -> ApiResponse<Self, Meta>
fn api_response_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