pub struct AgentProxy { /* private fields */ }Expand description
The proxy application.
Created via AgentProxy::builder() and started with AgentProxy::serve().
Implementations§
Source§impl AgentProxy
impl AgentProxy
Sourcepub fn builder() -> AgentProxyBuilder
pub fn builder() -> AgentProxyBuilder
Creates a new AgentProxyBuilder.
Sourcepub fn into_router(self) -> Result<Router, ProxyError>
pub fn into_router(self) -> Result<Router, ProxyError>
Sourcepub async fn serve(self) -> Result<JoinHandle<()>, ProxyError>
pub async fn serve(self) -> Result<JoinHandle<()>, ProxyError>
Starts the proxy server and returns a JoinHandle.
Runs on_init on all middlewares before binding.
§Errors
Returns a ProxyError if binding to the listen address fails.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for AgentProxy
impl !UnwindSafe for AgentProxy
impl Freeze for AgentProxy
impl Send for AgentProxy
impl Sync for AgentProxy
impl Unpin for AgentProxy
impl UnsafeUnpin for AgentProxy
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