#[non_exhaustive]pub enum Error {
Show 23 variants
Io(Error),
ParseInt(ParseIntError),
FromUtf8(FromUtf8Error),
ParseTime(Parse),
Poison(String),
NotImplemented,
Parse(usize, String, String),
ServerVersion(i32, i32, String),
Simple(String),
InvalidArgument(String),
ConnectionFailed,
ConnectionRejected(String),
UnsupportedTimeZone(String),
ConnectionReset,
Cancelled,
Shutdown,
EndOfStream,
UnexpectedResponse(String),
UnexpectedEndOfStream,
Notice(Notice),
AlreadySubscribed,
HistoricalParseError(HistoricalParseError),
ProtobufDecode(DecodeError),
}Expand description
The main error type for IBAPI operations.
This enum is marked #[non_exhaustive] to allow adding new error variants
in future versions without breaking compatibility.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Io(Error)
I/O error from network operations.
ParseInt(ParseIntError)
Failed to parse an integer from string.
FromUtf8(FromUtf8Error)
Invalid UTF-8 sequence in response data.
ParseTime(Parse)
Failed to parse time/date string.
Poison(String)
Mutex was poisoned by a panic in another thread.
NotImplemented
Feature or method not yet implemented.
Parse(usize, String, String)
Failed to parse a protocol message. Contains: (field_index, field_value, error_description)
ServerVersion(i32, i32, String)
Server version requirement not met. Contains: (required_version, actual_version, feature_name)
Simple(String)
Generic error with custom message.
InvalidArgument(String)
Invalid argument provided to API method.
ConnectionFailed
Failed to establish connection to TWS/Gateway.
ConnectionRejected(String)
TWS/Gateway accepted the TCP connection but closed before completing the handshake — typically a host allow-list mismatch on the gateway. Payload carries the underlying diagnostic.
UnsupportedTimeZone(String)
IB Gateway sent a timezone name that could not be mapped to an IANA zone.
ConnectionReset
Connection was reset by TWS/Gateway.
Cancelled
Operation was cancelled by user or system.
Shutdown
Client is shutting down.
EndOfStream
Reached end of data stream.
UnexpectedResponse(String)
Received unexpected message type. The string carries the Debug repr
of the offending wire envelope for diagnostic logging; the structured
payload is no longer exposed (rust-ibapi 3.x retired
ResponseMessage from the public surface).
UnexpectedEndOfStream
Stream ended unexpectedly.
Notice(Notice)
An IB notice frame (TWS error/warning/system message) received in
response to a request. Carries the full typed Notice — code,
message, optional timestamp, and advanced-order-reject JSON.
Use Notice::category / Notice::is_order_rejection /
Notice::is_warning to classify without string-parsing. Distinct
from Error::ConnectionRejected (handshake-time refusal) and the
transport variants (Error::Io, Error::ConnectionReset).
AlreadySubscribed
Attempted to create a duplicate subscription.
HistoricalParseError(HistoricalParseError)
Wraps errors parsing historical data parameters.
ProtobufDecode(DecodeError)
Failed to decode a protobuf message.
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
use the Display impl or to_string()