pub struct ElicitationResponse {
pub action: ElicitationAction,
pub content: Option<HashMap<String, Value>>,
}Expand description
Response from an elicitation request.
Fields§
§action: ElicitationActionUser’s action (accept, decline, cancel).
content: Option<HashMap<String, Value>>Form data (only present when action is Accept and mode is Form).
Implementations§
Source§impl ElicitationResponse
impl ElicitationResponse
Sourcepub fn accept(content: HashMap<String, Value>) -> Self
pub fn accept(content: HashMap<String, Value>) -> Self
Creates an accepted response with form data.
Sourcepub fn accept_url() -> Self
pub fn accept_url() -> Self
Creates an accepted response for URL mode (no content).
Sourcepub fn is_accepted(&self) -> bool
pub fn is_accepted(&self) -> bool
Returns true if the user accepted.
Sourcepub fn is_declined(&self) -> bool
pub fn is_declined(&self) -> bool
Returns true if the user declined.
Sourcepub fn is_cancelled(&self) -> bool
pub fn is_cancelled(&self) -> bool
Returns true if the user cancelled.
Sourcepub fn get_string(&self, key: &str) -> Option<&str>
pub fn get_string(&self, key: &str) -> Option<&str>
Gets a string value from the form content.
Trait Implementations§
Source§impl Clone for ElicitationResponse
impl Clone for ElicitationResponse
Source§fn clone(&self) -> ElicitationResponse
fn clone(&self) -> ElicitationResponse
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 moreAuto Trait Implementations§
impl Freeze for ElicitationResponse
impl RefUnwindSafe for ElicitationResponse
impl Send for ElicitationResponse
impl Sync for ElicitationResponse
impl Unpin for ElicitationResponse
impl UnwindSafe for ElicitationResponse
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).