pub struct ServiceDefinition {
pub service_class_uuids: Vec<Uuid>,
pub protocol_descriptor_list: Vec<ProtocolDescriptor>,
pub additional_protocol_descriptor_lists: Vec<Vec<ProtocolDescriptor>>,
pub profile_descriptors: Vec<ProfileDescriptor>,
pub information: Vec<Information>,
pub additional_attributes: Vec<Attribute>,
}
Expand description
Definition of a service that is to be advertised via Bluetooth BR/EDR.
Corresponds directly to the FIDL ServiceDefinition
definition - with the extra
properties of Clone and PartialEq.
See [fuchsia.bluetooth.bredr.ServiceDefinition] for more documentation.
Fields§
§service_class_uuids: Vec<Uuid>
§protocol_descriptor_list: Vec<ProtocolDescriptor>
§additional_protocol_descriptor_lists: Vec<Vec<ProtocolDescriptor>>
§profile_descriptors: Vec<ProfileDescriptor>
§information: Vec<Information>
§additional_attributes: Vec<Attribute>
Implementations§
Source§impl ServiceDefinition
impl ServiceDefinition
pub fn try_into_fidl(this: &Vec<Self>) -> Result<Vec<ServiceDefinition>, Error>
pub fn try_from_fidl(src: &Vec<ServiceDefinition>) -> Result<Vec<Self>, Error>
Sourcepub fn primary_psm(&self) -> Option<Psm>
pub fn primary_psm(&self) -> Option<Psm>
Returns the primary PSM associated with this ServiceDefinition.
Sourcepub fn additional_psms(&self) -> HashSet<Psm>
pub fn additional_psms(&self) -> HashSet<Psm>
Returns the additional PSMs associated with this ServiceDefinition.
Sourcepub fn goep_l2cap_psm(&self) -> Option<Psm>
pub fn goep_l2cap_psm(&self) -> Option<Psm>
Returns the PSM in the GOEP L2CAP Attribute, if provided.
Trait Implementations§
Source§impl Clone for ServiceDefinition
impl Clone for ServiceDefinition
Source§fn clone(&self) -> ServiceDefinition
fn clone(&self) -> ServiceDefinition
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 ServiceDefinition
impl Debug for ServiceDefinition
Source§impl Default for ServiceDefinition
impl Default for ServiceDefinition
Source§fn default() -> ServiceDefinition
fn default() -> ServiceDefinition
Returns the “default value” for a type. Read more
Source§impl PartialEq for ServiceDefinition
impl PartialEq for ServiceDefinition
Source§impl TryFrom<&ServiceDefinition> for ServiceDefinition
impl TryFrom<&ServiceDefinition> for ServiceDefinition
Source§impl TryFrom<&ServiceDefinition> for ServiceDefinition
impl TryFrom<&ServiceDefinition> for ServiceDefinition
impl StructuralPartialEq for ServiceDefinition
Auto Trait Implementations§
impl Freeze for ServiceDefinition
impl RefUnwindSafe for ServiceDefinition
impl Send for ServiceDefinition
impl Sync for ServiceDefinition
impl Unpin for ServiceDefinition
impl UnwindSafe for ServiceDefinition
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
)