pub enum TwsApiError {
NonPrintableAscii(String),
MissingField,
FrameTooLarge(u32),
IncompleteFrame {
needed: usize,
available: usize,
},
MalformedHandshake,
UnsupportedServerVersion {
server_version: i32,
min_version: i32,
},
UnsupportedRequestParameter {
server_version: i32,
min_version: i32,
parameter: &'static str,
},
Io(Error),
InvalidInteger {
field: String,
source: ParseIntError,
},
InvalidDecimal {
field: String,
source: Error,
},
ProtobufDecode(DecodeError),
}Expand description
Errors produced while encoding, decoding, or transporting TWS API frames.
Variants§
NonPrintableAscii(String)
A caller attempted to encode a value containing non-printable ASCII.
MissingField
A caller attempted to send a missing field value.
FrameTooLarge(u32)
A frame length prefix exceeded the supported platform size.
IncompleteFrame
A message was incomplete.
Fields
MalformedHandshake
The peer returned a malformed handshake response.
UnsupportedServerVersion
The peer advertised an unsupported server version.
UnsupportedRequestParameter
A request used a field that the negotiated server version does not support.
Fields
Io(Error)
A network operation failed.
InvalidInteger
An integer field could not be parsed.
InvalidDecimal
A decimal field could not be parsed.
ProtobufDecode(DecodeError)
A protobuf payload could not be decoded.
Trait Implementations§
Source§impl Debug for TwsApiError
impl Debug for TwsApiError
Source§impl Display for TwsApiError
impl Display for TwsApiError
Source§impl Error for TwsApiError
impl Error for TwsApiError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<DecodeError> for TwsApiError
impl From<DecodeError> for TwsApiError
Source§fn from(source: DecodeError) -> Self
fn from(source: DecodeError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for TwsApiError
impl !UnwindSafe for TwsApiError
impl Freeze for TwsApiError
impl Send for TwsApiError
impl Sync for TwsApiError
impl Unpin for TwsApiError
impl UnsafeUnpin for TwsApiError
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