pub struct A2aServerHttpOptions { /* private fields */ }Expand description
Production HTTP boundary options.
Implementations§
Source§impl A2aServerHttpOptions
impl A2aServerHttpOptions
Sourcepub fn new() -> Self
pub fn new() -> Self
Constructs strict defaults. At least one exact public authority must be added before build.
Sourcepub fn with_paths(
self,
rest_prefix: impl Into<String>,
jsonrpc_path: impl Into<String>,
) -> Result<Self, A2aServerHttpOptionsError>
pub fn with_paths( self, rest_prefix: impl Into<String>, jsonrpc_path: impl Into<String>, ) -> Result<Self, A2aServerHttpOptionsError>
Sets canonical REST and JSON-RPC mount points.
Sets exact allowed Host authorities, including ports when externally
visible. Wildcards and forwarded headers are intentionally unsupported.
Sourcepub fn with_allowed_origins(
self,
origins: impl IntoIterator<Item = impl Into<String>>,
) -> Result<Self, A2aServerHttpOptionsError>
pub fn with_allowed_origins( self, origins: impl IntoIterator<Item = impl Into<String>>, ) -> Result<Self, A2aServerHttpOptionsError>
Sets exact browser origins. Requests without Origin remain valid for
server-to-server A2A. An empty list rejects every supplied Origin.
Sourcepub fn with_limits(
self,
maximum_body_bytes: usize,
maximum_in_flight_requests: usize,
maximum_in_flight_operations: usize,
) -> Result<Self, A2aServerHttpOptionsError>
pub fn with_limits( self, maximum_body_bytes: usize, maximum_in_flight_requests: usize, maximum_in_flight_operations: usize, ) -> Result<Self, A2aServerHttpOptionsError>
Sets hard body and concurrency ceilings.
Sourcepub fn with_maximum_response_body_bytes(
self,
value: usize,
) -> Result<Self, A2aServerHttpOptionsError>
pub fn with_maximum_response_body_bytes( self, value: usize, ) -> Result<Self, A2aServerHttpOptionsError>
Sets the hard ceiling for a serialized unary protocol response. Streaming responses are bounded separately by event count and each event’s contract limits.
Sourcepub fn with_timeouts(
self,
request_timeout: Duration,
stream_idle_timeout: Duration,
) -> Result<Self, A2aServerHttpOptionsError>
pub fn with_timeouts( self, request_timeout: Duration, stream_idle_timeout: Duration, ) -> Result<Self, A2aServerHttpOptionsError>
Sets unary/authentication and stream-idle deadlines.
Sourcepub fn with_maximum_stream_events(
self,
value: u32,
) -> Result<Self, A2aServerHttpOptionsError>
pub fn with_maximum_stream_events( self, value: u32, ) -> Result<Self, A2aServerHttpOptionsError>
Sets the event ceiling for one stream/subscription response.
Sourcepub fn with_card_max_age(
self,
value: Duration,
) -> Result<Self, A2aServerHttpOptionsError>
pub fn with_card_max_age( self, value: Duration, ) -> Result<Self, A2aServerHttpOptionsError>
Sets public Agent Card cache duration.
Sourcepub fn with_bearer_challenge(
self,
value: impl Into<String>,
) -> Result<Self, A2aServerHttpOptionsError>
pub fn with_bearer_challenge( self, value: impl Into<String>, ) -> Result<Self, A2aServerHttpOptionsError>
Configures the RFC 6750 challenge emitted for invalid/missing bearer
credentials, for example Bearer realm="stateknot".
Trait Implementations§
Source§impl Clone for A2aServerHttpOptions
impl Clone for A2aServerHttpOptions
Source§impl Debug for A2aServerHttpOptions
impl Debug for A2aServerHttpOptions
Auto Trait Implementations§
impl Forget for A2aServerHttpOptions
impl Freeze for A2aServerHttpOptions
impl Move for A2aServerHttpOptions
impl RefUnwindSafe for A2aServerHttpOptions
impl Send for A2aServerHttpOptions
impl Sync for A2aServerHttpOptions
impl Unpin for A2aServerHttpOptions
impl UnsafeUnpin for A2aServerHttpOptions
impl UnwindSafe for A2aServerHttpOptions
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request