Struct BodyCappedHttpClient
pub struct BodyCappedHttpClient { /* private fields */ }Implementations§
§impl BodyCappedHttpClient
impl BodyCappedHttpClient
pub fn new( inner: Client, json_max_bytes: usize, sse_event_max_bytes: usize, ) -> BodyCappedHttpClient
pub fn default_with_caps( json_max_bytes: usize, sse_event_max_bytes: usize, ) -> BodyCappedHttpClient
Trait Implementations§
§impl Clone for BodyCappedHttpClient
impl Clone for BodyCappedHttpClient
§fn clone(&self) -> BodyCappedHttpClient
fn clone(&self) -> BodyCappedHttpClient
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl StreamableHttpClient for BodyCappedHttpClient
impl StreamableHttpClient for BodyCappedHttpClient
type Error = Error
async fn post_message( &self, uri: Arc<str>, message: JsonRpcMessage<ClientRequest, ClientResult, ClientNotification>, session_id: Option<Arc<str>>, auth_token: Option<String>, custom_headers: HashMap<HeaderName, HeaderValue>, ) -> Result<StreamableHttpPostResponse, StreamableHttpError<<BodyCappedHttpClient as StreamableHttpClient>::Error>>
async fn delete_session( &self, uri: Arc<str>, session_id: Arc<str>, auth_token: Option<String>, custom_headers: HashMap<HeaderName, HeaderValue>, ) -> Result<(), StreamableHttpError<<BodyCappedHttpClient as StreamableHttpClient>::Error>>
§async fn get_stream(
&self,
uri: Arc<str>,
session_id: Option<Arc<str>>,
last_event_id: Option<String>,
auth_token: Option<String>,
custom_headers: HashMap<HeaderName, HeaderValue>,
) -> Result<Pin<Box<dyn Stream<Item = Result<Sse, Error>> + Send>>, StreamableHttpError<<BodyCappedHttpClient as StreamableHttpClient>::Error>>
async fn get_stream( &self, uri: Arc<str>, session_id: Option<Arc<str>>, last_event_id: Option<String>, auth_token: Option<String>, custom_headers: HashMap<HeaderName, HeaderValue>, ) -> Result<Pin<Box<dyn Stream<Item = Result<Sse, Error>> + Send>>, StreamableHttpError<<BodyCappedHttpClient as StreamableHttpClient>::Error>>
Open an SSE stream, optionally scoped to a legacy session. Read more
§fn post_message_with_max_sse_event_size(
&self,
uri: Arc<str>,
message: JsonRpcMessage<ClientRequest, ClientResult, ClientNotification>,
session_id: Option<Arc<str>>,
auth_header: Option<String>,
custom_headers: HashMap<HeaderName, HeaderValue>,
_max_sse_event_size: usize,
) -> impl Future<Output = Result<StreamableHttpPostResponse, StreamableHttpError<Self::Error>>> + Send
fn post_message_with_max_sse_event_size( &self, uri: Arc<str>, message: JsonRpcMessage<ClientRequest, ClientResult, ClientNotification>, session_id: Option<Arc<str>>, auth_header: Option<String>, custom_headers: HashMap<HeaderName, HeaderValue>, _max_sse_event_size: usize, ) -> impl Future<Output = Result<StreamableHttpPostResponse, StreamableHttpError<Self::Error>>> + Send
Send a message while enforcing a maximum raw SSE event size. Read more
§fn get_stream_with_max_sse_event_size(
&self,
uri: Arc<str>,
session_id: Option<Arc<str>>,
last_event_id: Option<String>,
auth_header: Option<String>,
custom_headers: HashMap<HeaderName, HeaderValue>,
_max_sse_event_size: usize,
) -> impl Future<Output = Result<Pin<Box<dyn Stream<Item = Result<Sse, Error>> + Send>>, StreamableHttpError<Self::Error>>> + Send
fn get_stream_with_max_sse_event_size( &self, uri: Arc<str>, session_id: Option<Arc<str>>, last_event_id: Option<String>, auth_header: Option<String>, custom_headers: HashMap<HeaderName, HeaderValue>, _max_sse_event_size: usize, ) -> impl Future<Output = Result<Pin<Box<dyn Stream<Item = Result<Sse, Error>> + Send>>, StreamableHttpError<Self::Error>>> + Send
Open an SSE stream while enforcing a maximum raw event size. Read more
Auto Trait Implementations§
impl Freeze for BodyCappedHttpClient
impl !RefUnwindSafe for BodyCappedHttpClient
impl Send for BodyCappedHttpClient
impl Sync for BodyCappedHttpClient
impl Unpin for BodyCappedHttpClient
impl UnsafeUnpin for BodyCappedHttpClient
impl !UnwindSafe for BodyCappedHttpClient
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