pub struct PaymentRouteLayer { /* private fields */ }Expand description
Per-route Tower Layer that enforces x402 payment requirements.
Created by PaymentGate::route. Supports fluent builder methods
for resource metadata before being applied as a layer.
Implementations§
Source§impl PaymentRouteLayer
impl PaymentRouteLayer
Sourcepub fn with_description(self, desc: impl Into<String>) -> Self
pub fn with_description(self, desc: impl Into<String>) -> Self
Sets a human-readable description of the protected resource.
Sourcepub fn with_mime_type(self, mime: impl Into<String>) -> Self
pub fn with_mime_type(self, mime: impl Into<String>) -> Self
Sets the MIME type of the protected resource.
Sourcepub fn with_resource(self, url: impl Into<String>) -> Self
pub fn with_resource(self, url: impl Into<String>) -> Self
Sets the resource URL override.
Trait Implementations§
Source§impl Clone for PaymentRouteLayer
impl Clone for PaymentRouteLayer
Source§fn clone(&self) -> PaymentRouteLayer
fn clone(&self) -> PaymentRouteLayer
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 PaymentRouteLayer
impl Debug for PaymentRouteLayer
Auto Trait Implementations§
impl Freeze for PaymentRouteLayer
impl !RefUnwindSafe for PaymentRouteLayer
impl Send for PaymentRouteLayer
impl Sync for PaymentRouteLayer
impl Unpin for PaymentRouteLayer
impl !UnwindSafe for PaymentRouteLayer
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