mirror of
https://gitlab.com/xmpp-rs/xmpp-rs.git
synced 2024-07-12 22:21:53 +00:00
implement IntoAttributeValue for u32, u16 and u8
This commit is contained in:
parent
8f4361c8b1
commit
638866fa4c
1 changed files with 18 additions and 0 deletions
|
@ -93,6 +93,24 @@ impl IntoAttributeValue for usize {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl IntoAttributeValue for u32 {
|
||||||
|
fn into_attribute_value(self) -> Option<String> {
|
||||||
|
Some(format!("{}", self))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl IntoAttributeValue for u16 {
|
||||||
|
fn into_attribute_value(self) -> Option<String> {
|
||||||
|
Some(format!("{}", self))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl IntoAttributeValue for u8 {
|
||||||
|
fn into_attribute_value(self) -> Option<String> {
|
||||||
|
Some(format!("{}", self))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl IntoAttributeValue for String {
|
impl IntoAttributeValue for String {
|
||||||
fn into_attribute_value(self) -> Option<String> {
|
fn into_attribute_value(self) -> Option<String> {
|
||||||
Some(self)
|
Some(self)
|
||||||
|
|
Loading…
Reference in a new issue