Bg77Error

Enum Bg77Error 

Source
pub enum Bg77Error {
Show 17 variants NoSocketAvailable, PinRequired, CgattFailure, SocketAlreadyConnected, OpenSocketError, IPv6Unsupported, NotConnected, Hardware, AtCmdTimeout, AtCmdError, AtCmdCmeError, BufferOverflow, TxSize, ReverseDnsUnsupported, ParseIpAddressFailed, ParseFailed, RxSize,
}
Expand description

BG77 driver error type

Variants§

§

NoSocketAvailable

All sockets in use

§

PinRequired

It looks like a pin is required to unlock the SIM card.

§

CgattFailure

Internal error: Even though the operator selection succeeded, the modem does not look connected afterwards.

§

SocketAlreadyConnected

Trying to connect a socket that is already connected

§

OpenSocketError

Could not open socket (modem did not answer, answer could not be parsed or modem answered with an unexpected message).

§

IPv6Unsupported

An IPv6 IP address was used but IPv6 is not supported (yet?). This error originates from the fact that we use the (external) embedded-nal::<Protocol>ClientStack traits which accept both IPv4 and IPv6 addresses so we can not prevent this kind of error statically.

§

NotConnected

Trying to send or receive data when the socket is not connected.

§

Hardware

An error occurred when accessing the underlying hardware (gpio or serial)

§

AtCmdTimeout

An AT command timed out

§

AtCmdError

The modem responded to an AT command with “ERROR”

§

AtCmdCmeError

The modem responded to an AT command with “+CME ERROR: …”

§

BufferOverflow

An internal buffer was not big enough to handle the amount of data

§

TxSize

The tx data size exceeds the maximum supported tx data size (1460 bytes)

§

ReverseDnsUnsupported

embedded_nal::Dns::get_host_by_address() was called which is not supported

§

ParseIpAddressFailed

The resolved IP address could not be parsed into a embedded_nal::IpAddr

§

ParseFailed

A value could not be parsed into a specific type, e.g. the modem answer (bytes) could not be parsed into an integer.

§

RxSize

The modem returned more rx data than the maximum amount of data we requested / can handle.

Trait Implementations§

Source§

impl Debug for Bg77Error

Source§

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

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

impl PartialEq for Bg77Error

Source§

fn eq(&self, other: &Bg77Error) -> 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 TcpError for Bg77Error

Source§

fn kind(&self) -> TcpErrorKind

Determines the kind of error that occurred.
Source§

impl Eq for Bg77Error

Source§

impl StructuralPartialEq for Bg77Error

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> 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, 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.