pub struct Proxy {
pub write: WriteHalf<Box<dyn Transport + Send + Sync + Unpin>>,
pub request_id: i32,
pub ident: String,
pub host: String,
pub port: i32,
pub context: Option<HashMap<String, String>>,
pub handle: Option<JoinHandle<Result<(), Box<dyn Error + Sync + Send>>>>,
pub message_queue: Arc<Mutex<Vec<MessageType>>>,
pub stream_type: String,
}
Fields§
§write: WriteHalf<Box<dyn Transport + Send + Sync + Unpin>>
§request_id: i32
§ident: String
§host: String
§port: i32
§context: Option<HashMap<String, String>>
§handle: Option<JoinHandle<Result<(), Box<dyn Error + Sync + Send>>>>
§message_queue: Arc<Mutex<Vec<MessageType>>>
§stream_type: String
Implementations§
Source§impl Proxy
impl Proxy
pub fn new( stream: Box<dyn Transport + Send + Sync + Unpin>, ident: &str, host: &str, port: i32, context: Option<HashMap<String, String>>, ) -> Proxy
pub async fn ice_context( &mut self, context: HashMap<String, String>, ) -> Result<Proxy, Box<dyn Error + Send + Sync>>
pub async fn dispatch<T: 'static + Debug + Display + FromBytes + Send + Sync>( &mut self, op: &str, mode: u8, params: &Encapsulation, context: Option<HashMap<String, String>>, ) -> Result<ReplyData, Box<dyn Error + Send + Sync>>
pub fn create_request( &mut self, identity_name: &str, operation: &str, mode: u8, params: &Encapsulation, context: Option<HashMap<String, String>>, ) -> RequestData
pub async fn await_validate_connection_message( &mut self, ) -> Result<(), Box<dyn Error + Sync + Send>>
pub async fn await_reply_message( &mut self, request_id: i32, ) -> Result<MessageType, Box<dyn Error + Sync + Send>>
pub async fn make_request<T: 'static + Debug + Display + FromBytes + Send + Sync>( &mut self, request: &RequestData, ) -> Result<ReplyData, Box<dyn Error + Sync + Send>>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Proxy
impl !RefUnwindSafe for Proxy
impl Send for Proxy
impl Sync for Proxy
impl Unpin for Proxy
impl !UnwindSafe for Proxy
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