pub fn filter_map<U: ?Sized, E, F>(this: Self, cb: F) -> Result<RwLockReadGuard<'rwlock, U>, (Self, E)>
        where F: FnOnce(&'rwlock T) -> Result<&'rwlock U, E>
    {
        match cb(this.__data) {
            Ok(new_data) => {
                let new = RwLockReadGuard {
                    __lock: this.__lock,
                    __data: new_data,
                    __marker: marker::PhantomData
                };

                mem::forget(this);

                Ok(new)
            },
            Err(e) => Err((this, e))
        }
    }
/// Conditionally get a new guard to a sub-borrow depending on the original
/// contents of the guard.
Conditionally get a new guard to a sub-borrow depending on the original
contents of the guard.
Conditionally get a new guard to a sub - borrow depending on the original contents of the guard .
pub fn filter_map<U: ?Sized, E, F>(this: Self, cb: F) -> Result<RwLockReadGuard<'rwlock, U>, (Self, E)>
        where F: FnOnce(&'rwlock T) -> Result<&'rwlock U, E>
    {
        match cb(this.__data) {
            Ok(new_data) => {
                let new = RwLockReadGuard {
                    __lock: this.__lock,
                    __data: new_data,
                    __marker: marker::PhantomData
                };
                mem::forget(this);
                Ok(new)
            },
            Err(e) => Err((this, e))
        }
    }
pub fn filter_map < U : ? Sized , E , F > ( this : Self , cb : F ) -> Result < RwLockReadGuard < ' rwlock , U > , ( Self , E ) > where F : FnOnce ( & ' rwlock T ) -> Result < & ' rwlock U , E > { match cb ( this . __data ) { Ok ( new_data ) => { let new = RwLockReadGuard { __lock : this . __lock , __data : new_data , __marker : marker :: PhantomData } ; mem :: forget ( this ) ; Ok ( new ) } , Err ( e ) => Err ( ( this , e ) ) } }
Conditionally get a new guard to a sub-borrow depending on the original
contents of the guard.
Conditionally get a new guard to a sub - borrow depending on the original contents of the guard .
this
Self
cb
F
this
Self
cb
F