#[non_exhaustive]pub enum Error {
Show 17 variants
OutOfRange,
InvalidSignalId(TxLabel, u8),
InvalidHeader,
InvalidMessage,
Timeout,
RemoteRejected(RemoteReject),
UnimplementedMessage,
PeerDisconnected,
AlreadyReceived,
ChannelSetup(Status),
PeerRead(Status),
PeerWrite(Status),
Encoding,
RequestInvalid(ErrorCode),
RequestInvalidExtra(ErrorCode, u8),
InvalidState,
Other(Error),
}
Expand description
The error type of the AVDTP library.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
OutOfRange
The value that was sent on the wire was out of range.
InvalidSignalId(TxLabel, u8)
The signal identifier was invalid when parsing a message.
InvalidHeader
The header was invalid when parsing a message from the peer.
InvalidMessage
The body format was invalid when parsing a message from the peer.
Timeout
The remote end failed to respond to this command in time.
RemoteRejected(RemoteReject)
The Remote end rejected a command we sent (with this error code)
UnimplementedMessage
When a message hasn’t been implemented yet, the parser will return this.
PeerDisconnected
The distant peer has disconnected.
AlreadyReceived
Sent if a Command Future is polled after it’s already completed
ChannelSetup(Status)
Encountered an IO error setting up the channel
PeerRead(Status)
Encountered an IO error reading from the peer.
PeerWrite(Status)
Encountered an IO error reading from the peer.
Encoding
A message couldn’t be encoded.
RequestInvalid(ErrorCode)
An error has been detected, and the request that is being handled should be rejected with the error code given.
RequestInvalidExtra(ErrorCode, u8)
Same as RequestInvalid, but an extra byte is included, which is used in Stream and Configure responses
InvalidState
An operation was attempted in an Invalid State
Other(Error)
An error from another source
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl From<RemoteReject> for Error
impl From<RemoteReject> for Error
Source§fn from(source: RemoteReject) -> Self
fn from(source: RemoteReject) -> Self
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
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
§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more