pub enum TaError {
BadParam(String),
OutOfRange(String),
LibNotInitialized,
OutOfMemory,
InternalError(String),
}Expand description
本库公开错误类型,对应 TA-Lib TA_RetCode 的语义。
Public error type, corresponding to the semantics of TA-Lib TA_RetCode.
Variants§
BadParam(String)
非法参数(对应 TA_BAD_PARAM)。例如时间周期 <= 0。
Invalid parameter (maps to TA_BAD_PARAM), e.g. time period <= 0.
OutOfRange(String)
参数越界(对应 TA_OUT_OF_RANGE)。
Parameter out of range (maps to TA_OUT_OF_RANGE).
LibNotInitialized
库未初始化(对应 TA_LIB_NOT_INITIALIZED)。
Library not initialized (maps to TA_LIB_NOT_INITIALIZED).
OutOfMemory
内存分配失败(对应 TA_ALLOC_ERR)。
Memory allocation failure (maps to TA_ALLOC_ERR).
InternalError(String)
内部错误(对应 TA_INTERNAL_ERROR)。
Internal error (maps to TA_INTERNAL_ERROR).
Trait Implementations§
impl Eq for TaError
Source§impl Error for TaError
impl Error for TaError
1.30.0 · 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()
impl StructuralPartialEq for TaError
Auto Trait Implementations§
impl Freeze for TaError
impl RefUnwindSafe for TaError
impl Send for TaError
impl Sync for TaError
impl Unpin for TaError
impl UnsafeUnpin for TaError
impl UnwindSafe for TaError
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