pub fn recv_timeout<'b, T: Deserialize<'b>>(
        &'b mut self,
        timeout: Duration,
    ) -> Result<Option<T>> {
        if self.position.is_some() {
            Err(Error::AlreadyReceived)
        } else {
            Ok(
                if let Some((value, position)) = self.receiver.recv_timeout_0(Some(timeout))? {
                    self.position = Some(position);
                    Some(value)
                } else {
                    None
                },
            )
        }
    }
/// Attempt to read a message, blocking for up to the specified duration if necessary until one becomes
/// available.
///
/// This will return `Err(`[`Error::AlreadyReceived`](enum.Error.html#variant.AlreadyReceived)`))` if this
/// instance has already been used to read a message.
Attempt to read a message, blocking for up to the specified duration if necessary until one becomes
available.


Attempt to read a message blocking for up to the specified duration if necessary until one becomes available .
pub fn recv_timeout<'b, T: Deserialize<'b>>(
        &'b mut self,
        timeout: Duration,
    ) -> Result<Option<T>> {
        if self.position.is_some() {
            Err(Error::AlreadyReceived)
        } else {
            Ok(
                if let Some((value, position)) = self.receiver.recv_timeout_0(Some(timeout))? {
                    self.position = Some(position);
                    Some(value)
                } else {
                    None
                },
            )
        }
    }
pub fn recv_timeout < ' b , T : Deserialize < ' b > > ( & ' b mut self , timeout : Duration , ) -> Result < Option < T > > { if self . position . is_some ( ) { Err ( Error :: AlreadyReceived ) } else { Ok ( if let Some ( ( value , position ) ) = self . receiver . recv_timeout_0 ( Some ( timeout ) ) ? { self . position = Some ( position ) ; Some ( value ) } else { None } , ) } }
Attempt to read a message, blocking for up to the specified duration if necessary until one becomes
available.
Attempt to read a message blocking for up to the specified duration if necessary until one becomes available .
&'b mut self
timeout
Duration
&'b mut self
timeout
Duration