mxp 1.2.1

Rust implementation of the MXP (Mud eXtension Protocol) standard
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use std::borrow::Cow;

/// Internal helper trait for functions such as [`Action::into_owned`](crate::Action::into_owned).
pub trait IntoOwnedString {
    fn into_owned_string(self) -> String;
}

impl IntoOwnedString for &str {
    fn into_owned_string(self) -> String {
        self.to_owned()
    }
}

impl IntoOwnedString for Cow<'_, str> {
    fn into_owned_string(self) -> String {
        self.into_owned()
    }
}