Struct taos_error::Code

source ·
pub struct Code(/* private fields */);
Expand description

The error code.

Implementations§

source§

impl Code

source

pub fn success(&self) -> bool

Error code == 0. It should not raised in any real errors.

source§

impl Code

Constants

source

pub const Failed: Code = _

👎Deprecated since 0.9.0: Use Code::FAILED instead
source

pub const Success: Code = _

👎Deprecated since 0.9.0: Use Code::SUCCESS instead
source

pub const FAILED: Code = _

source

pub const SUCCESS: Code = _

source

pub const COLUMN_EXISTS: Code = _

source

pub const COLUMN_NOT_EXIST: Code = _

source

pub const TAG_ALREADY_EXIST: Code = _

source

pub const TAG_NOT_EXIST: Code = _

source

pub const MODIFIED_ALREADY: Code = _

source

pub const INVALID_COLUMN_NAME: Code = _

source

pub const TABLE_NOT_EXIST: Code = _

source

pub const STABLE_NOT_EXIST: Code = _

source

pub const INVALID_ROW_BYTES: Code = _

source

pub const DUPLICATED_COLUMN_NAMES: Code = _

source

pub const NO_COLUMN_CAN_BE_DROPPED: Code = _

source§

impl Code

source

pub const fn new(code: i32) -> Self

Code from raw primitive type.

Methods from Deref<Target = i32>§

1.43.0 · source

pub const MIN: i32 = -2_147_483_648i32

1.43.0 · source

pub const MAX: i32 = 2_147_483_647i32

1.53.0 · source

pub const BITS: u32 = 32u32

Trait Implementations§

source§

impl Clone for Code

source§

fn clone(&self) -> Code

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Code

source§

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

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

impl Default for Code

source§

fn default() -> Code

Returns the “default value” for a type. Read more
source§

impl Deref for Code

§

type Target = i32

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl DerefMut for Code

source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
source§

impl<'de> Deserialize<'de> for Code

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Display for Code

source§

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

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

impl From<Code> for i16

source§

fn from(c: Code) -> Self

Converts to this type from the input type.
source§

impl From<Code> for i32

source§

fn from(c: Code) -> Self

Converts to this type from the input type.
source§

impl From<Code> for i64

source§

fn from(c: Code) -> Self

Converts to this type from the input type.
source§

impl From<Code> for i8

source§

fn from(c: Code) -> Self

Converts to this type from the input type.
source§

impl From<Code> for u16

source§

fn from(c: Code) -> Self

Converts to this type from the input type.
source§

impl From<Code> for u32

source§

fn from(c: Code) -> Self

Converts to this type from the input type.
source§

impl From<Code> for u64

source§

fn from(c: Code) -> Self

Converts to this type from the input type.
source§

impl From<Code> for u8

source§

fn from(c: Code) -> Self

Converts to this type from the input type.
source§

impl From<i16> for Code

source§

fn from(c: i16) -> Self

Converts to this type from the input type.
source§

impl From<i32> for Code

source§

fn from(c: i32) -> Self

Converts to this type from the input type.
source§

impl From<i64> for Code

source§

fn from(c: i64) -> Self

Converts to this type from the input type.
source§

impl From<i8> for Code

source§

fn from(c: i8) -> Self

Converts to this type from the input type.
source§

impl From<u16> for Code

source§

fn from(c: u16) -> Self

Converts to this type from the input type.
source§

impl From<u32> for Code

source§

fn from(c: u32) -> Self

Converts to this type from the input type.
source§

impl From<u64> for Code

source§

fn from(c: u64) -> Self

Converts to this type from the input type.
source§

impl From<u8> for Code

source§

fn from(c: u8) -> Self

Converts to this type from the input type.
source§

impl Hash for Code

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl LowerHex for Code

source§

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

Formats the value using the given formatter.
source§

impl PartialEq<i32> for Code

source§

fn eq(&self, other: &i32) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<isize> for Code

source§

fn eq(&self, other: &isize) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<usize> for Code

source§

fn eq(&self, other: &usize) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq for Code

source§

fn eq(&self, other: &Code) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for Code

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl UpperHex for Code

source§

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

Formats the value using the given formatter.
source§

impl Copy for Code

source§

impl Eq for Code

source§

impl StructuralEq for Code

source§

impl StructuralPartialEq for Code

Auto Trait Implementations§

§

impl RefUnwindSafe for Code

§

impl Send for Code

§

impl Sync for Code

§

impl Unpin for Code

§

impl UnwindSafe for Code

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> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

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

§

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.
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,