complete implementation of IntoAttributeValue for number types (#3169)
This commit is contained in:
1 parent
2f8f185930
commit
3c30a2bffb
1 file changed
+46
-1
@@ -1036,6 +1036,16 @@ impl IntoAttributeValue for f64 {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl IntoAttributeValue for i8 {
|
||||||
|
fn into_value(self) -> AttributeValue {
|
||||||
|
AttributeValue::Int(self as _)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl IntoAttributeValue for i16 {
|
||||||
|
fn into_value(self) -> AttributeValue {
|
||||||
|
AttributeValue::Int(self as _)
|
||||||
|
}
|
||||||
|
}
|
||||||
impl IntoAttributeValue for i32 {
|
impl IntoAttributeValue for i32 {
|
||||||
fn into_value(self) -> AttributeValue {
|
fn into_value(self) -> AttributeValue {
|
||||||
AttributeValue::Int(self as _)
|
AttributeValue::Int(self as _)
|
||||||
@@ -1046,13 +1056,48 @@ impl IntoAttributeValue for i64 {
|
|||||||
AttributeValue::Int(self)
|
AttributeValue::Int(self)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
impl IntoAttributeValue for isize {
|
||||||
|
fn into_value(self) -> AttributeValue {
|
||||||
|
AttributeValue::Int(self as _)
|
||||||
|
}
|
||||||
|
}
|
||||||
impl IntoAttributeValue for i128 {
|
impl IntoAttributeValue for i128 {
|
||||||
fn into_value(self) -> AttributeValue {
|
fn into_value(self) -> AttributeValue {
|
||||||
AttributeValue::Int(self as _)
|
AttributeValue::Int(self as _)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl IntoAttributeValue for u8 {
|
||||||
|
fn into_value(self) -> AttributeValue {
|
||||||
|
AttributeValue::Int(self as _)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl IntoAttributeValue for u16 {
|
||||||
|
fn into_value(self) -> AttributeValue {
|
||||||
|
AttributeValue::Int(self as _)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl IntoAttributeValue for u32 {
|
||||||
|
fn into_value(self) -> AttributeValue {
|
||||||
|
AttributeValue::Int(self as _)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl IntoAttributeValue for u64 {
|
||||||
|
fn into_value(self) -> AttributeValue {
|
||||||
|
AttributeValue::Int(self as _)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl IntoAttributeValue for usize {
|
||||||
|
fn into_value(self) -> AttributeValue {
|
||||||
|
AttributeValue::Int(self as _)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl IntoAttributeValue for u128 {
|
||||||
|
fn into_value(self) -> AttributeValue {
|
||||||
|
AttributeValue::Int(self as _)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl IntoAttributeValue for bool {
|
impl IntoAttributeValue for bool {
|
||||||
fn into_value(self) -> AttributeValue {
|
fn into_value(self) -> AttributeValue {
|
||||||
AttributeValue::Bool(self)
|
AttributeValue::Bool(self)
|
||||||
|
|||||||
Reference in new issue
Block a user