pub struct HttpContextAdapter { /* private fields */ }Implementations§
Trait Implementations§
Source§impl Context for HttpContextAdapter
impl Context for HttpContextAdapter
fn on_http_call_response( &mut self, token_id: u32, num_headers: usize, body_size: usize, num_trailers: usize, )
fn on_grpc_call_response( &mut self, token_id: u32, status_code: u32, response_size: usize, )
fn on_done(&mut self) -> bool
fn get_current_time(&self) -> SystemTime
fn get_property(&self, _path: Vec<&str>) -> Option<Vec<u8>>
fn set_property(&self, _path: Vec<&str>, _value: Option<&[u8]>)
fn dispatch_http_call( &self, _upstream: &str, _headers: Vec<(&str, &str)>, _body: Option<&[u8]>, _trailers: Vec<(&str, &str)>, _timeout: Duration, ) -> Result<u32, Status>
fn get_http_call_response_headers(&self) -> Vec<(String, String)>
fn get_http_call_response_headers_bytes(&self) -> Vec<(String, Vec<u8>)>
fn get_http_call_response_header(&self, _name: &str) -> Option<String>
fn get_http_call_response_header_bytes(&self, _name: &str) -> Option<Vec<u8>>
fn get_http_call_response_body( &self, _start: usize, _max_size: usize, ) -> Option<Vec<u8>>
fn get_http_call_response_trailers(&self) -> Vec<(String, String)>
fn get_http_call_response_trailers_bytes(&self) -> Vec<(String, Vec<u8>)>
fn get_http_call_response_trailer(&self, _name: &str) -> Option<String>
fn get_http_call_response_trailer_bytes(&self, _name: &str) -> Option<Vec<u8>>
fn dispatch_grpc_call( &self, _upstream_name: &str, _service_name: &str, _method_name: &str, _initial_metadata: Vec<(&str, &[u8])>, _message: Option<&[u8]>, _timeout: Duration, ) -> Result<u32, Status>
fn get_grpc_call_response_body( &self, _start: usize, _max_size: usize, ) -> Option<Vec<u8>>
fn cancel_grpc_call(&self, _token_id: u32)
fn open_grpc_stream( &self, _cluster_name: &str, _service_name: &str, _method_name: &str, _initial_metadata: Vec<(&str, &[u8])>, ) -> Result<u32, Status>
fn on_grpc_stream_initial_metadata( &mut self, _token_id: u32, _num_elements: u32, )
fn get_grpc_stream_initial_metadata(&self) -> Vec<(String, Vec<u8>)>
fn get_grpc_stream_initial_metadata_value(&self, _name: &str) -> Option<Vec<u8>>
fn send_grpc_stream_message( &self, _token_id: u32, _message: Option<&[u8]>, _end_stream: bool, )
fn on_grpc_stream_message(&mut self, _token_id: u32, _message_size: usize)
fn get_grpc_stream_message( &mut self, _start: usize, _max_size: usize, ) -> Option<Vec<u8>>
fn on_grpc_stream_trailing_metadata( &mut self, _token_id: u32, _num_elements: u32, )
fn get_grpc_stream_trailing_metadata(&self) -> Vec<(String, Vec<u8>)>
fn get_grpc_stream_trailing_metadata_value( &self, _name: &str, ) -> Option<Vec<u8>>
fn cancel_grpc_stream(&self, _token_id: u32)
fn close_grpc_stream(&self, _token_id: u32)
fn on_grpc_stream_close(&mut self, _token_id: u32, _status_code: u32)
fn get_grpc_status(&self) -> (u32, Option<String>)
fn call_foreign_function( &self, _function_name: &str, _arguments: Option<&[u8]>, ) -> Result<Option<Vec<u8>>, Status>
fn done(&self)
Source§impl HttpContext for HttpContextAdapter
impl HttpContext for HttpContextAdapter
fn on_http_request_headers( &mut self, num_headers: usize, end_of_stream: bool, ) -> Action
fn on_http_request_body( &mut self, body_size: usize, end_of_stream: bool, ) -> Action
fn on_http_response_body( &mut self, body_size: usize, end_of_stream: bool, ) -> Action
fn on_http_response_headers( &mut self, num_headers: usize, end_of_stream: bool, ) -> Action
fn get_http_request_headers(&self) -> Vec<(String, String)>
fn get_http_request_headers_bytes(&self) -> Vec<(String, Vec<u8>)>
fn set_http_request_headers(&self, _headers: Vec<(&str, &str)>)
fn set_http_request_headers_bytes(&self, _headers: Vec<(&str, &[u8])>)
fn get_http_request_header(&self, _name: &str) -> Option<String>
fn get_http_request_header_bytes(&self, _name: &str) -> Option<Vec<u8>>
fn set_http_request_header(&self, _name: &str, _value: Option<&str>)
fn set_http_request_header_bytes(&self, _name: &str, _value: Option<&[u8]>)
fn add_http_request_header(&self, _name: &str, _value: &str)
fn add_http_request_header_bytes(&self, _name: &str, _value: &[u8])
fn get_http_request_body( &self, _start: usize, _max_size: usize, ) -> Option<Vec<u8>>
fn set_http_request_body(&self, _start: usize, _size: usize, _value: &[u8])
fn on_http_request_trailers(&mut self, _num_trailers: usize) -> Action
fn get_http_request_trailers(&self) -> Vec<(String, String)>
fn get_http_request_trailers_bytes(&self) -> Vec<(String, Vec<u8>)>
fn set_http_request_trailers(&self, _trailers: Vec<(&str, &str)>)
fn set_http_request_trailers_bytes(&self, _trailers: Vec<(&str, &[u8])>)
fn get_http_request_trailer(&self, _name: &str) -> Option<String>
fn get_http_request_trailer_bytes(&self, _name: &str) -> Option<Vec<u8>>
fn set_http_request_trailer(&self, _name: &str, _value: Option<&str>)
fn set_http_request_trailer_bytes(&self, _name: &str, _value: Option<&[u8]>)
fn add_http_request_trailer(&self, _name: &str, _value: &str)
fn add_http_request_trailer_bytes(&self, _name: &str, _value: &[u8])
fn resume_http_request(&self)
fn reset_http_request(&self)
fn get_http_response_headers(&self) -> Vec<(String, String)>
fn get_http_response_headers_bytes(&self) -> Vec<(String, Vec<u8>)>
fn set_http_response_headers(&self, _headers: Vec<(&str, &str)>)
fn set_http_response_headers_bytes(&self, _headers: Vec<(&str, &[u8])>)
fn get_http_response_header(&self, _name: &str) -> Option<String>
fn get_http_response_header_bytes(&self, _name: &str) -> Option<Vec<u8>>
fn set_http_response_header(&self, _name: &str, _value: Option<&str>)
fn set_http_response_header_bytes(&self, _name: &str, _value: Option<&[u8]>)
fn add_http_response_header(&self, _name: &str, _value: &str)
fn add_http_response_header_bytes(&self, _name: &str, _value: &[u8])
fn get_http_response_body( &self, _start: usize, _max_size: usize, ) -> Option<Vec<u8>>
fn set_http_response_body(&self, _start: usize, _size: usize, _value: &[u8])
fn on_http_response_trailers(&mut self, _num_trailers: usize) -> Action
fn get_http_response_trailers(&self) -> Vec<(String, String)>
fn get_http_response_trailers_bytes(&self) -> Vec<(String, Vec<u8>)>
fn set_http_response_trailers(&self, _trailers: Vec<(&str, &str)>)
fn set_http_response_trailers_bytes(&self, _trailers: Vec<(&str, &[u8])>)
fn get_http_response_trailer(&self, _name: &str) -> Option<String>
fn get_http_response_trailer_bytes(&self, _name: &str) -> Option<Vec<u8>>
fn set_http_response_trailer(&self, _name: &str, _value: Option<&str>)
fn set_http_response_trailer_bytes(&self, _name: &str, _value: Option<&[u8]>)
fn add_http_response_trailer(&self, _name: &str, _value: &str)
fn add_http_response_trailer_bytes(&self, _name: &str, _value: &[u8])
fn resume_http_response(&self)
fn reset_http_response(&self)
fn send_http_response( &self, _status_code: u32, _headers: Vec<(&str, &str)>, _body: Option<&[u8]>, )
fn on_log(&mut self)
Auto Trait Implementations§
impl Freeze for HttpContextAdapter
impl !RefUnwindSafe for HttpContextAdapter
impl !Send for HttpContextAdapter
impl !Sync for HttpContextAdapter
impl Unpin for HttpContextAdapter
impl !UnwindSafe for HttpContextAdapter
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