pub struct SupportResponse<I>{ /* private fields */ }Expand description
Formats a <SUPPORT> response.
§Examples
use mxp::responses::SupportResponse;
let supported = mxp::ActionKind::Bold
| mxp::ActionKind::Color
| mxp::ActionKind::Image
| mxp::ActionKind::Send;
let response = SupportResponse::new(&["color.*", "send.expire", "image"], supported);
assert_eq!(response.to_string(), "\x1B[1z<SUPPORTS +color.fore +color.back +send.expire +image>\r\n");Implementations§
Source§impl<I> SupportResponse<I>
impl<I> SupportResponse<I>
pub fn new(iter: I, supported: FlagSet<ActionKind>) -> Self
Trait Implementations§
Auto Trait Implementations§
impl<I> Freeze for SupportResponse<I>where
I: Freeze,
impl<I> RefUnwindSafe for SupportResponse<I>where
I: RefUnwindSafe,
impl<I> Send for SupportResponse<I>where
I: Send,
impl<I> Sync for SupportResponse<I>where
I: Sync,
impl<I> Unpin for SupportResponse<I>where
I: Unpin,
impl<I> UnsafeUnpin for SupportResponse<I>where
I: UnsafeUnpin,
impl<I> UnwindSafe for SupportResponse<I>where
I: 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