pub struct StaticFilesHandler { /* private fields */ }
Expand description
Static Files module handler
Trait Implementations§
Source§impl Clone for StaticFilesHandler
impl Clone for StaticFilesHandler
Source§fn clone(&self) -> StaticFilesHandler
fn clone(&self) -> StaticFilesHandler
Returns a copy 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 StaticFilesHandler
impl Debug for StaticFilesHandler
Source§impl PartialEq for StaticFilesHandler
impl PartialEq for StaticFilesHandler
Source§impl RequestFilter for StaticFilesHandler
impl RequestFilter for StaticFilesHandler
Source§type Conf = StaticFilesConf
type Conf = StaticFilesConf
Configuration type of this handler.
Source§fn new_ctx() -> Self::CTX
fn new_ctx() -> Self::CTX
Creates a new state object, see [
pingora::ProxyHttp::new_ctx
] Read moreSource§fn request_filter<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session: &'life1 mut Session,
_ctx: &'life2 mut Self::CTX,
) -> Pin<Box<dyn Future<Output = Result<RequestFilterResult, Box<Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn request_filter<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session: &'life1 mut Session,
_ctx: &'life2 mut Self::CTX,
) -> Pin<Box<dyn Future<Output = Result<RequestFilterResult, Box<Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Handler to run during Pingora’s
request_filter
phase, see
[pingora::ProxyHttp::request_filter
]. This uses a different return type to account
for the existence of multiple chained handlers.Source§fn new(conf: Self::Conf) -> Result<Self, Box<Error>>
fn new(conf: Self::Conf) -> Result<Self, Box<Error>>
Creates a new instance of the handler from its configuration.
Source§fn init_downstream_modules(_modules: &mut HttpModules)
fn init_downstream_modules(_modules: &mut HttpModules)
Handler to run during Pingora’s
init_downstream_modules
phase, see
[pingora::ProxyHttp::init_downstream_modules
]. Read moreSource§fn early_request_filter<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_session: &'life1 mut Session,
_ctx: &'life2 mut Self::CTX,
) -> Pin<Box<dyn Future<Output = Result<(), Box<Error>>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn early_request_filter<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_session: &'life1 mut Session,
_ctx: &'life2 mut Self::CTX,
) -> Pin<Box<dyn Future<Output = Result<(), Box<Error>>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Handler to run during Pingora’s
early_request_filter
phase, see
[pingora::ProxyHttp::early_request_filter
].fn handle<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, session: &'life1 mut Session, ctx: &'life2 mut Self::CTX, ) -> Pin<Box<dyn Future<Output = Result<bool, Box<Error>>> + Send + 'async_trait>>
Source§fn upstream_peer<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_session: &'life1 mut Session,
_ctx: &'life2 mut Self::CTX,
) -> Pin<Box<dyn Future<Output = Result<Option<Box<HttpPeer>>, Box<Error>>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn upstream_peer<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_session: &'life1 mut Session,
_ctx: &'life2 mut Self::CTX,
) -> Pin<Box<dyn Future<Output = Result<Option<Box<HttpPeer>>, Box<Error>>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Handler to run during Pingora’s
upstream_peer
phase, see
[pingora::ProxyHttp::upstream_peer
]. Unlike Pingora’s method, here returning a result is
optional. If None
is returned, other handlers in the chain will be called. If all of them
return None
, an error will be returned to Pingora.Source§fn logging<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_session: &'life1 mut Session,
_e: Option<&'life2 Error>,
_ctx: &'life3 mut Self::CTX,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn logging<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_session: &'life1 mut Session,
_e: Option<&'life2 Error>,
_ctx: &'life3 mut Self::CTX,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Handler to run during Pingora’s
logging
phase, see [pingora::ProxyHttp::logging
].Source§impl TryFrom<StaticFilesConf> for StaticFilesHandler
impl TryFrom<StaticFilesConf> for StaticFilesHandler
impl Eq for StaticFilesHandler
impl StructuralPartialEq for StaticFilesHandler
Auto Trait Implementations§
impl Freeze for StaticFilesHandler
impl RefUnwindSafe for StaticFilesHandler
impl Send for StaticFilesHandler
impl Sync for StaticFilesHandler
impl Unpin for StaticFilesHandler
impl UnwindSafe for StaticFilesHandler
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.