pub fn peek(&self) -> Result<&Ty, QueueErr>
    {
        if self.start < self.end
        {
            let v = &self.buff[self.start];
            match v
            {
                Some(ref x) => return Ok(x),
                _ => return Err(QueueErr::UnknownError) /* This should never happen */
            }
        }
        if self.start > self.end
        {
            let v = &self.buff[self.start];
            match v
            {
                Some(ref x) => return Ok(x),
                _ => return Err(QueueErr::UnknownError) /* This should never happen */
            }
        }
        return Err(QueueErr::Empty);
    }
/// Returns an immutable reference to the first element
/// of the queue or Err(QueueErr::Empty), if no
/// element is in the queue
Returns an immutable reference to the first element
of the queue or Err(QueueErr::Empty), if no
element is in the queue
Returns an immutable reference to the first element of the queue or Err ( QueueErr :: Empty ) if no element is in the queue
pub fn peek(&self) -> Result<&Ty, QueueErr>
    {
        if self.start < self.end
        {
            let v = &self.buff[self.start];
            match v
            {
                Some(ref x) => return Ok(x),
                _ => return Err(QueueErr::UnknownError) /* This should never happen */
            }
        }
        if self.start > self.end
        {
            let v = &self.buff[self.start];
            match v
            {
                Some(ref x) => return Ok(x),
                _ => return Err(QueueErr::UnknownError) /* This should never happen */
            }
        }
        return Err(QueueErr::Empty);
    }
pub fn peek ( & self ) -> Result < & Ty , QueueErr > { if self . start < self . end { let v = & self . buff [ self . start ] ; match v { Some ( ref x ) => return Ok ( x ) , _ => return Err ( QueueErr :: UnknownError ) /* This should never happen */ } } if self . start > self . end { let v = & self . buff [ self . start ] ; match v { Some ( ref x ) => return Ok ( x ) , _ => return Err ( QueueErr :: UnknownError ) /* This should never happen */ } } return Err ( QueueErr :: Empty ) ; }
Returns an immutable reference to the first element
of the queue or Err(QueueErr::Empty), if no
element is in the queue
Returns an immutable reference to the first element of the queue or Err ( QueueErr :: Empty ) if no element is in the queue
&self
&self