Macro nes::rw_read
[−]
[src]
macro_rules! rw_read { ( $rw:expr ) => { ... }; ( $rw:expr, $error:ident ) => { ... }; ( $rw:expr, $error:path ) => { ... }; ( $rw:expr, $rw:path, $( $arg:expr ),* ) => { ... }; }
This macro helps to lock rw_lock(calls read) and returns error if it is poisoned(second thread has locked the RwLock and panicked).
Where are 4 forms:
let guard=rw_read(rw_lock)
returns "Error::Poisoned"
let guard=rw_read(rw_lock,ErrorName)
returns "ErrorName::Poisoned"
let guard=rw_read(rw_lock,ErrorName::Variant)
returns "ErrorName::Variant"
let guard=rw_read(rw_lock,ErrorName::Variant,arg1,arg2,...)
returns "ErrorName::Variant(arg1,arg2,...)"