Skip to main content

GqlStatus

Struct GqlStatus 

Source
pub struct GqlStatus { /* private fields */ }
Expand description

A GQLSTATUS code: 2-character class + 3-character subclass.

Standard classes:

  • 00 successful completion
  • 01 warning
  • 02 no data
  • 22 data exception
  • 25 invalid transaction state
  • 40 transaction rollback
  • 42 syntax error or access rule violation

Implementations§

Source§

impl GqlStatus

Source

pub const SUCCESS: Self

00000 - successful completion, no subclass.

Source

pub const SUCCESS_OMITTED_RESULT: Self

00001 - successful completion, omitted result.

Source

pub const WARNING: Self

01000 - warning, no subclass.

Source

pub const WARNING_STRING_TRUNCATION: Self

01004 - warning: string data, right truncation.

Source

pub const WARNING_GRAPH_NOT_EXIST: Self

01G03 - warning: graph does not exist.

Source

pub const WARNING_GRAPH_TYPE_NOT_EXIST: Self

01G04 - warning: graph type does not exist.

Source

pub const WARNING_NULL_ELIMINATED: Self

01G11 - warning: null value eliminated in set function.

Source

pub const NO_DATA: Self

02000 - no data.

Source

pub const DATA_EXCEPTION: Self

22000 - data exception, no subclass.

Source

pub const DATA_STRING_TRUNCATION: Self

22001 - string data, right truncation.

Source

pub const DATA_NUMERIC_OUT_OF_RANGE: Self

22003 - numeric value out of range.

Source

pub const DATA_NULL_NOT_ALLOWED: Self

22004 - null value not allowed.

Source

pub const DATA_DIVISION_BY_ZERO: Self

22012 - division by zero.

Source

pub const DATA_NEGATIVE_LIMIT: Self

22G02 - negative limit value.

Source

pub const DATA_INVALID_VALUE_TYPE: Self

22G03 - invalid value type.

Source

pub const DATA_VALUES_NOT_COMPARABLE: Self

22G04 - values not comparable.

Source

pub const INVALID_TX_STATE: Self

25000 - invalid transaction state, no subclass.

Source

pub const INVALID_TX_ACTIVE: Self

25G01 - active GQL-transaction.

Source

pub const INVALID_TX_READ_ONLY: Self

25G03 - read-only GQL-transaction.

Source

pub const INVALID_TX_TERMINATION: Self

2D000 - invalid transaction termination.

Source

pub const TX_ROLLBACK: Self

40000 - transaction rollback, no subclass.

Source

pub const TX_COMPLETION_UNKNOWN: Self

40003 - statement completion unknown.

Source

pub const SYNTAX_ERROR: Self

42000 - syntax error or access rule violation, no subclass.

Source

pub const SYNTAX_INVALID: Self

42001 - invalid syntax.

Source

pub const SYNTAX_INVALID_REFERENCE: Self

42002 - invalid reference.

Source

pub const DEPENDENT_OBJECT_ERROR: Self

G1000 - dependent object error, no subclass.

Source

pub const GRAPH_TYPE_VIOLATION: Self

G2000 - graph type violation.

Source

pub fn from_str(s: &str) -> Option<Self>

Creates a GqlStatus from a 5-character string slice.

Returns None if the string is not exactly 5 ASCII characters.

Source

pub fn as_str(&self) -> &str

Returns the 5-character GQLSTATUS code as a string slice.

Source

pub fn class_code(&self) -> &str

Returns the 2-character class code (e.g., "00", "42").

Source

pub fn subclass_code(&self) -> &str

Returns the 3-character subclass code (e.g., "000", "001").

Source

pub fn is_success(&self) -> bool

True if this is a successful completion (class 00).

Source

pub fn is_warning(&self) -> bool

True if this is a warning (class 01).

Source

pub fn is_no_data(&self) -> bool

True if this is a no-data condition (class 02).

Source

pub fn is_exception(&self) -> bool

True if this is an exception condition (not success, warning, or no-data).

Trait Implementations§

Source§

impl Clone for GqlStatus

Source§

fn clone(&self) -> GqlStatus

Returns a duplicate 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 GqlStatus

Source§

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

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

impl Display for GqlStatus

Source§

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

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

impl From<&Error> for GqlStatus

Maps a Grafeo super::error::Error to a GQLSTATUS code.

Source§

fn from(err: &Error) -> Self

Converts to this type from the input type.
Source§

impl Hash for GqlStatus

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 PartialEq for GqlStatus

Source§

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

Source§

impl StructuralPartialEq for GqlStatus

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

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. 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,

Source§

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§

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

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.