pub struct ChannelElicitationClient { /* private fields */ }Expand description
Channel-based elicitation client.
This client sends elicitation requests through an mpsc channel, which can be processed by the transport layer.
Implementations§
Source§impl ChannelElicitationClient
impl ChannelElicitationClient
Sourcepub fn new(tx: Sender<ElicitationRequestMessage>) -> Self
pub fn new(tx: Sender<ElicitationRequestMessage>) -> Self
Create a new channel-based elicitation client.
Sourcepub fn channel(buffer: usize) -> (Self, Receiver<ElicitationRequestMessage>)
pub fn channel(buffer: usize) -> (Self, Receiver<ElicitationRequestMessage>)
Create a new channel pair for elicitation.
Trait Implementations§
Source§impl Clone for ChannelElicitationClient
impl Clone for ChannelElicitationClient
Source§fn clone(&self) -> ChannelElicitationClient
fn clone(&self) -> ChannelElicitationClient
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl ElicitationClient for ChannelElicitationClient
impl ElicitationClient for ChannelElicitationClient
Source§fn elicit(
&self,
request: ElicitRequest,
) -> Pin<Box<dyn Future<Output = Result<ElicitResult, ElicitationError>> + Send + '_>>
fn elicit( &self, request: ElicitRequest, ) -> Pin<Box<dyn Future<Output = Result<ElicitResult, ElicitationError>> + Send + '_>>
Send an elicitation request to the client.
Auto Trait Implementations§
impl Freeze for ChannelElicitationClient
impl RefUnwindSafe for ChannelElicitationClient
impl Send for ChannelElicitationClient
impl Sync for ChannelElicitationClient
impl Unpin for ChannelElicitationClient
impl UnsafeUnpin for ChannelElicitationClient
impl UnwindSafe for ChannelElicitationClient
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> ElicitationClientExt for Twhere
T: ElicitationClient + ?Sized,
impl<T> ElicitationClientExt for Twhere
T: ElicitationClient + ?Sized,
Source§fn confirm(
&self,
message: &str,
) -> Pin<Box<dyn Future<Output = Result<bool, ElicitationError>> + Send + '_>>
fn confirm( &self, message: &str, ) -> Pin<Box<dyn Future<Output = Result<bool, ElicitationError>> + Send + '_>>
Request a simple yes/no confirmation from the user.
Source§fn prompt_text(
&self,
message: &str,
) -> Pin<Box<dyn Future<Output = Result<Option<String>, ElicitationError>> + Send + '_>>
fn prompt_text( &self, message: &str, ) -> Pin<Box<dyn Future<Output = Result<Option<String>, ElicitationError>> + Send + '_>>
Request text input from the user.