pub struct Support<S = String> {
pub questions: Vec<S>,
}Expand description
Determines exactly which tags are supported by the client.
See MXP specification: <SUPPORT>.
§Examples
assert_eq!(
"<SUPPORT 'color.*' send.expire image>".parse::<mxp::Support>(),
Ok(mxp::Support {
questions: vec!["color.*".into(), "send.expire".into(), "image".into()],
}),
);Fields§
§questions: Vec<S>Implementations§
Source§impl<S> Support<S>
impl<S> Support<S>
Sourcepub fn map_text<T, F>(self, f: F) -> Support<T>where
F: FnMut(S) -> T,
pub fn map_text<T, F>(self, f: F) -> Support<T>where
F: FnMut(S) -> T,
Applies a type transformation to all text, returning a new struct.
Sourcepub fn respond(
&self,
supported: FlagSet<ActionKind>,
) -> SupportResponse<Iter<'_, S>>
pub fn respond( &self, supported: FlagSet<ActionKind>, ) -> SupportResponse<Iter<'_, S>>
Constructs a SupportResponse from this struct’s questions.
Trait Implementations§
Source§impl<'a, S> IntoIterator for &'a Support<S>
impl<'a, S> IntoIterator for &'a Support<S>
Source§impl<S> IntoIterator for Support<S>
impl<S> IntoIterator for Support<S>
impl<S: Eq> Eq for Support<S>
impl<S> StructuralPartialEq for Support<S>
Auto Trait Implementations§
impl<S> Freeze for Support<S>
impl<S> RefUnwindSafe for Support<S>where
S: RefUnwindSafe,
impl<S> Send for Support<S>where
S: Send,
impl<S> Sync for Support<S>where
S: Sync,
impl<S> Unpin for Support<S>where
S: Unpin,
impl<S> UnsafeUnpin for Support<S>
impl<S> UnwindSafe for Support<S>where
S: UnwindSafe,
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