pub struct RivetErrorSchemaWithMeta<T> {
pub schema: RivetErrorSchema,
pub message_fn: fn(&T) -> String,
pub _phantom: PhantomData<T>,
}Expand description
Can only be created through the rivet_error macro.
Fields§
§schema: RivetErrorSchema§message_fn: fn(&T) -> String§_phantom: PhantomData<T>Implementations§
Source§impl<T: Serialize> RivetErrorSchemaWithMeta<T>
impl<T: Serialize> RivetErrorSchemaWithMeta<T>
Sourcepub fn build_with(&'static self, meta: T) -> Error
pub fn build_with(&'static self, meta: T) -> Error
Builds an anyhow::Error from this schema with the provided metadata
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for RivetErrorSchemaWithMeta<T>
impl<T> RefUnwindSafe for RivetErrorSchemaWithMeta<T>where
T: RefUnwindSafe,
impl<T> Send for RivetErrorSchemaWithMeta<T>where
T: Send,
impl<T> Sync for RivetErrorSchemaWithMeta<T>where
T: Sync,
impl<T> Unpin for RivetErrorSchemaWithMeta<T>where
T: Unpin,
impl<T> UnsafeUnpin for RivetErrorSchemaWithMeta<T>
impl<T> UnwindSafe for RivetErrorSchemaWithMeta<T>where
T: UnwindSafe,
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