[][src]Struct tensorflow::Status

pub struct Status { /* fields omitted */ }

Holds error information when communicating with back and forth with tensorflow.

It either has an Code::Ok code, or otherwise an error code with an associated message.

Methods

impl Status[src]

pub fn new() -> Self[src]

Creates a status with Code::Ok and no message.

impl Status[src]

pub fn new_set(code: Code, msg: &str) -> Result<Status, NulError>[src]

Creates a status and sets its code and message.

pub fn code(&self) -> Code[src]

Returns the status's code.

pub fn is_ok(&self) -> bool[src]

Returns true if the status's code is Code::Ok.

pub fn set(&mut self, code: Code, msg: &str) -> Result<(), NulError>[src]

Sets the code and message.

Trait Implementations

impl From<NulError> for Status[src]

impl From<Utf8Error> for Status[src]

impl From<IntoStringError> for Status[src]

impl Drop for Status[src]

impl Debug for Status[src]

impl Display for Status[src]

impl Error for Status[src]

fn source(&self) -> Option<&(dyn Error + 'static)>
1.30.0
[src]

The lower-level source of this error, if any. Read more

Auto Trait Implementations

impl !Send for Status

impl !Sync for Status

Blanket Implementations

impl<T> From for T[src]

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

impl<T> ToString for T where
    T: Display + ?Sized
[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

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

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

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

The type returned in the event of a conversion error.