[][src]Enum screeps::constants::ReturnCode

#[repr(i16)]pub enum ReturnCode {
    Ok,
    NotOwner,
    NoPath,
    NameExists,
    Busy,
    NotFound,
    NotEnough,
    InvalidTarget,
    Full,
    NotInRange,
    InvalidArgs,
    Tired,
    NoBodypart,
    RclNotEnough,
    GclNotEnough,
}

Variants

Ok
NotOwner
NoPath
NameExists
Busy
NotFound
NotEnough
InvalidTarget
Full
NotInRange
InvalidArgs
Tired
NoBodypart
RclNotEnough
GclNotEnough

Implementations

impl ReturnCode[src]

pub fn as_result(self) -> Result<(), Self>[src]

Turns this return code into a result.

ReturnCode::Ok is turned into Result::Ok, all other codes are turned into Result::Err(code)

Trait Implementations

impl Clone for ReturnCode[src]

impl Copy for ReturnCode[src]

impl Debug for ReturnCode[src]

impl<'de> Deserialize<'de> for ReturnCode[src]

impl Eq for ReturnCode[src]

impl FromPrimitive for ReturnCode[src]

impl Hash for ReturnCode[src]

impl PartialEq<ReturnCode> for ReturnCode[src]

impl Serialize for ReturnCode[src]

impl StructuralEq for ReturnCode[src]

impl StructuralPartialEq for ReturnCode[src]

impl TryFrom<Value> for ReturnCode[src]

type Error = ConversionError

The type returned in the event of a conversion error.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> IntoExpectedType<U> for T where
    U: FromExpectedType<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.