pub struct Exchange<Input, Output, Metadata> { /* private fields */ }Implementations§
Source§impl<Input, Output, Metadata> Exchange<Input, Output, Metadata>
impl<Input, Output, Metadata> Exchange<Input, Output, Metadata>
pub fn new() -> Self
pub fn add_metadata(&mut self, metadata: Metadata)
pub fn attachments(&self) -> &Attachments
pub fn attachments_mut(&mut self) -> &mut Attachments
pub fn add_input_listener( &mut self, callback: impl FnMut(&mut Input, &mut Attachments) + Send + 'static, )
pub fn add_output_listener( &mut self, callback: impl FnMut(&mut Output, &mut Attachments) + Send + 'static, )
pub fn save_input(&mut self, request: Input)
pub fn input(&self) -> Result<&Input, ExchangeError>
pub fn input_mut(&mut self) -> Result<&mut Input, ExchangeError>
pub fn take_request(&mut self) -> Result<Input, ExchangeError>
pub fn save_output(&mut self, response: Output)
pub fn output(&self) -> Result<&Output, ExchangeError>
pub fn output_mut(&mut self) -> Result<&mut Output, ExchangeError>
pub fn take_output(&mut self) -> Result<Output, ExchangeError>
Auto Trait Implementations§
impl<Input, Output, Metadata> Freeze for Exchange<Input, Output, Metadata>
impl<Input, Output, Metadata> !RefUnwindSafe for Exchange<Input, Output, Metadata>
impl<Input, Output, Metadata> Send for Exchange<Input, Output, Metadata>
impl<Input, Output, Metadata> !Sync for Exchange<Input, Output, Metadata>
impl<Input, Output, Metadata> Unpin for Exchange<Input, Output, Metadata>
impl<Input, Output, Metadata> !UnwindSafe for Exchange<Input, Output, Metadata>
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