Skip to main content

AttError

Struct AttError 

Source
pub struct AttError(/* private fields */);
Expand description

Bluetooth Attribute Protocol error. See the Bluetooth Core Specification, Vol 3, Part F, §3.4.1.1

Implementations§

Source§

impl AttError

Source

pub const SUCCESS: AttError

The operation completed successfully.

Source

pub const INVALID_HANDLE: AttError

The attribute handle given was not valid on this server.

Source

pub const READ_NOT_PERMITTED: AttError

The attribute cannot be read.

Source

pub const WRITE_NOT_PERMITTED: AttError

The attribute cannot be written.

Source

pub const INVALID_PDU: AttError

The attribute PDU was invalid.

Source

pub const INSUFFICIENT_AUTHENTICATION: AttError

The attribute requires authentication before it can be read or written.

Source

pub const REQUEST_NOT_SUPPORTED: AttError

Attribute server does not support the request received from the client.

Source

pub const INVALID_OFFSET: AttError

Offset specified was past the end of the attribute.

Source

pub const INSUFFICIENT_AUTHORIZATION: AttError

The attribute requires authorization before it can be read or written.

Source

pub const PREPARE_QUEUE_FULL: AttError

Too many prepare writes have been queued.

Source

pub const ATTRIBUTE_NOT_FOUND: AttError

No attribute found within the given attribute handle range.

Source

pub const ATTRIBUTE_NOT_LONG: AttError

The attribute cannot be read or written using the Read Blob Request.

Source

pub const INSUFFICIENT_ENCRYPTION_KEY_SIZE: AttError

The Encryption Key Size used for encrypting this link is insufficient.

Source

pub const INVALID_ATTRIBUTE_VALUE_LENGTH: AttError

The attribute value length is invalid for the operation.

Source

pub const UNLIKELY_ERROR: AttError

The attribute request that was requested has encountered an error that was unlikely, and therefore could not be completed as requested.

Source

pub const INSUFFICIENT_ENCRYPTION: AttError

The attribute requires encryption before it can be read or written.

Source

pub const UNSUPPORTED_GROUP_TYPE: AttError

The attribute type is not a supported grouping attribute as defined by a higher layer specification.

Source

pub const INSUFFICIENT_RESOURCES: AttError

Insufficient Resources to complete the request.

Source

pub const DATABASE_OUT_OF_SYNC: AttError

The server requests the client to rediscover the database.

Source

pub const VALUE_NOT_ALLOWED: AttError

The attribute parameter value was not allowed.

Source

pub const WRITE_REQUEST_REJECTED: AttError

Write Request Rejected

Source

pub const CCCD_IMPROPERLY_CONFIGURED: AttError

Client Characteristic Configuration Descriptor Improperly Configured

Source

pub const PROCEDURE_ALREADY_IN_PROGRESS: AttError

Procedure Already in Progress

Source

pub const OUT_OF_RANGE: AttError

Out of Range

Source

pub const fn from_u8(val: u8) -> Self

Converts a u8 value to an AttError.

Source

pub const fn as_u8(self) -> u8

Converts an AttError to a u8 value.

Source

pub fn is_application(&self) -> bool

Checks if the error code is in the application error range.

Source

pub fn is_common_profile_or_service(&self) -> bool

Checks if the error code is in the common profile and service range.

Trait Implementations§

Source§

impl Clone for AttError

Source§

fn clone(&self) -> AttError

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for AttError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for AttError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<AttError> for Error

Source§

fn from(e: AttError) -> Self

Converts to this type from the input type.
Source§

impl From<AttError> for NativeError

Source§

fn from(att_error: AttError) -> Self

Converts to this type from the input type.
Source§

impl From<AttError> for u8

Source§

fn from(val: AttError) -> Self

Converts to this type from the input type.
Source§

impl From<u8> for AttError

Source§

fn from(number: u8) -> Self

Converts to this type from the input type.
Source§

impl Hash for AttError

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Ord for AttError

Source§

fn cmp(&self, other: &AttError) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for AttError

Source§

fn eq(&self, other: &AttError) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for AttError

Source§

fn partial_cmp(&self, other: &AttError) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Copy for AttError

Source§

impl Eq for AttError

Source§

impl StructuralPartialEq for AttError

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.