pub struct AxumOptions {
pub enable_cors: bool,
pub cors_origins: Vec<String>,
pub enable_tracing: bool,
pub error_handler: Option<Arc<dyn Fn(X402Error) -> StatusCode + Send + Sync>>,
}Expand description
Axum-specific options
Fields§
§enable_cors: boolWhether to enable CORS
cors_origins: Vec<String>CORS origins
enable_tracing: boolWhether to enable request tracing
error_handler: Option<Arc<dyn Fn(X402Error) -> StatusCode + Send + Sync>>Custom error handler
Trait Implementations§
Source§impl Clone for AxumOptions
impl Clone for AxumOptions
Source§fn clone(&self) -> AxumOptions
fn clone(&self) -> AxumOptions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AxumOptions
impl Debug for AxumOptions
Source§impl Default for AxumOptions
impl Default for AxumOptions
Source§fn default() -> AxumOptions
fn default() -> AxumOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for AxumOptions
impl !RefUnwindSafe for AxumOptions
impl Send for AxumOptions
impl Sync for AxumOptions
impl Unpin for AxumOptions
impl !UnwindSafe for AxumOptions
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