pub enum DataElement {
}
Expand description
The basic building block for elements in a SDP record.
Corresponds directly to the FIDL DataElement
definition - with the extra
properties of Clone and PartialEq.
See [fuchsia.bluetooth.bredr.DataElement] for more documentation.
Variants§
Int8(i8)
Int16(i16)
Int32(i32)
Int64(i64)
Uint8(u8)
Uint16(u16)
Uint32(u32)
Uint64(u64)
Str(Vec<u8>)
Url(String)
Uuid(Uuid)
Bool(bool)
Sequence(Vec<Box<DataElement>>)
Alternatives(Vec<Box<DataElement>>)
Trait Implementations§
Source§impl Clone for DataElement
impl Clone for DataElement
Source§fn clone(&self) -> DataElement
fn clone(&self) -> DataElement
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for DataElement
impl Debug for DataElement
Source§impl From<&DataElement> for DataElement
impl From<&DataElement> for DataElement
Source§fn from(src: &DataElement) -> DataElement
fn from(src: &DataElement) -> DataElement
Converts to this type from the input type.
Source§impl From<String> for DataElement
impl From<String> for DataElement
Source§fn from(x: String) -> DataElement
fn from(x: String) -> DataElement
Converts to this type from the input type.
Source§impl From<Uuid> for DataElement
impl From<Uuid> for DataElement
Source§fn from(x: Uuid) -> DataElement
fn from(x: Uuid) -> DataElement
Converts to this type from the input type.
Source§impl From<bool> for DataElement
impl From<bool> for DataElement
Source§fn from(x: bool) -> DataElement
fn from(x: bool) -> DataElement
Converts to this type from the input type.
Source§impl From<i16> for DataElement
impl From<i16> for DataElement
Source§fn from(x: i16) -> DataElement
fn from(x: i16) -> DataElement
Converts to this type from the input type.
Source§impl From<i32> for DataElement
impl From<i32> for DataElement
Source§fn from(x: i32) -> DataElement
fn from(x: i32) -> DataElement
Converts to this type from the input type.
Source§impl From<i64> for DataElement
impl From<i64> for DataElement
Source§fn from(x: i64) -> DataElement
fn from(x: i64) -> DataElement
Converts to this type from the input type.
Source§impl From<i8> for DataElement
impl From<i8> for DataElement
Source§fn from(x: i8) -> DataElement
fn from(x: i8) -> DataElement
Converts to this type from the input type.
Source§impl From<u16> for DataElement
impl From<u16> for DataElement
Source§fn from(x: u16) -> DataElement
fn from(x: u16) -> DataElement
Converts to this type from the input type.
Source§impl From<u32> for DataElement
impl From<u32> for DataElement
Source§fn from(x: u32) -> DataElement
fn from(x: u32) -> DataElement
Converts to this type from the input type.
Source§impl From<u64> for DataElement
impl From<u64> for DataElement
Source§fn from(x: u64) -> DataElement
fn from(x: u64) -> DataElement
Converts to this type from the input type.
Source§impl From<u8> for DataElement
impl From<u8> for DataElement
Source§fn from(x: u8) -> DataElement
fn from(x: u8) -> DataElement
Converts to this type from the input type.
Source§impl PartialEq for DataElement
impl PartialEq for DataElement
Source§impl TryFrom<&DataElement> for DataElement
impl TryFrom<&DataElement> for DataElement
Source§impl TryFrom<DataElement> for String
impl TryFrom<DataElement> for String
Source§type Error = DataElementConversionError
type Error = DataElementConversionError
The type returned in the event of a conversion error.
Source§fn try_from(
data_element: DataElement,
) -> Result<String, DataElementConversionError>
fn try_from( data_element: DataElement, ) -> Result<String, DataElementConversionError>
Performs the conversion.
Source§impl TryFrom<DataElement> for Uuid
impl TryFrom<DataElement> for Uuid
Source§type Error = DataElementConversionError
type Error = DataElementConversionError
The type returned in the event of a conversion error.
Source§fn try_from(
data_element: DataElement,
) -> Result<Uuid, DataElementConversionError>
fn try_from( data_element: DataElement, ) -> Result<Uuid, DataElementConversionError>
Performs the conversion.
Source§impl TryFrom<DataElement> for Vec<u8>
impl TryFrom<DataElement> for Vec<u8>
Source§type Error = DataElementConversionError
type Error = DataElementConversionError
The type returned in the event of a conversion error.
Source§fn try_from(
data_element: DataElement,
) -> Result<Vec<u8>, DataElementConversionError>
fn try_from( data_element: DataElement, ) -> Result<Vec<u8>, DataElementConversionError>
Performs the conversion.
Source§impl TryFrom<DataElement> for bool
impl TryFrom<DataElement> for bool
Source§type Error = DataElementConversionError
type Error = DataElementConversionError
The type returned in the event of a conversion error.
Source§fn try_from(
data_element: DataElement,
) -> Result<bool, DataElementConversionError>
fn try_from( data_element: DataElement, ) -> Result<bool, DataElementConversionError>
Performs the conversion.
Source§impl TryFrom<DataElement> for i16
impl TryFrom<DataElement> for i16
Source§type Error = DataElementConversionError
type Error = DataElementConversionError
The type returned in the event of a conversion error.
Source§fn try_from(
data_element: DataElement,
) -> Result<i16, DataElementConversionError>
fn try_from( data_element: DataElement, ) -> Result<i16, DataElementConversionError>
Performs the conversion.
Source§impl TryFrom<DataElement> for i32
impl TryFrom<DataElement> for i32
Source§type Error = DataElementConversionError
type Error = DataElementConversionError
The type returned in the event of a conversion error.
Source§fn try_from(
data_element: DataElement,
) -> Result<i32, DataElementConversionError>
fn try_from( data_element: DataElement, ) -> Result<i32, DataElementConversionError>
Performs the conversion.
Source§impl TryFrom<DataElement> for i64
impl TryFrom<DataElement> for i64
Source§type Error = DataElementConversionError
type Error = DataElementConversionError
The type returned in the event of a conversion error.
Source§fn try_from(
data_element: DataElement,
) -> Result<i64, DataElementConversionError>
fn try_from( data_element: DataElement, ) -> Result<i64, DataElementConversionError>
Performs the conversion.
Source§impl TryFrom<DataElement> for i8
impl TryFrom<DataElement> for i8
Source§type Error = DataElementConversionError
type Error = DataElementConversionError
The type returned in the event of a conversion error.
Source§fn try_from(data_element: DataElement) -> Result<i8, DataElementConversionError>
fn try_from(data_element: DataElement) -> Result<i8, DataElementConversionError>
Performs the conversion.
Source§impl TryFrom<DataElement> for u16
impl TryFrom<DataElement> for u16
Source§type Error = DataElementConversionError
type Error = DataElementConversionError
The type returned in the event of a conversion error.
Source§fn try_from(
data_element: DataElement,
) -> Result<u16, DataElementConversionError>
fn try_from( data_element: DataElement, ) -> Result<u16, DataElementConversionError>
Performs the conversion.
Source§impl TryFrom<DataElement> for u32
impl TryFrom<DataElement> for u32
Source§type Error = DataElementConversionError
type Error = DataElementConversionError
The type returned in the event of a conversion error.
Source§fn try_from(
data_element: DataElement,
) -> Result<u32, DataElementConversionError>
fn try_from( data_element: DataElement, ) -> Result<u32, DataElementConversionError>
Performs the conversion.
Source§impl TryFrom<DataElement> for u64
impl TryFrom<DataElement> for u64
Source§type Error = DataElementConversionError
type Error = DataElementConversionError
The type returned in the event of a conversion error.
Source§fn try_from(
data_element: DataElement,
) -> Result<u64, DataElementConversionError>
fn try_from( data_element: DataElement, ) -> Result<u64, DataElementConversionError>
Performs the conversion.
Source§impl TryFrom<DataElement> for u8
impl TryFrom<DataElement> for u8
Source§type Error = DataElementConversionError
type Error = DataElementConversionError
The type returned in the event of a conversion error.
Source§fn try_from(data_element: DataElement) -> Result<u8, DataElementConversionError>
fn try_from(data_element: DataElement) -> Result<u8, DataElementConversionError>
Performs the conversion.
impl StructuralPartialEq for DataElement
Auto Trait Implementations§
impl Freeze for DataElement
impl RefUnwindSafe for DataElement
impl Send for DataElement
impl Sync for DataElement
impl Unpin for DataElement
impl UnwindSafe for DataElement
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)