Skip to main content

IntoStatus

Trait IntoStatus 

Source
pub trait IntoStatus {
    // Required method
    fn into_status(self, err: Status) -> Status;
}
Expand description

Converts a value into Status using a caller-provided error code.

This is especially useful for converting boolean checks into a status return.

Required Methods§

Source

fn into_status(self, err: Status) -> Status

Returns Status::Ok if self represents success, otherwise returns err.

Implementations on Foreign Types§

Source§

impl IntoStatus for bool

Implementors§