use ::{Result};
use parser::{IppHeader, IppParser};
use attribute::{IppAttributeList};
pub struct IppResponse {
header: IppHeader,
attributes: IppAttributeList
}
impl IppResponse {
pub fn from_parser(parser: &mut IppParser) -> Result<IppResponse> {
let res = try!(parser.parse());
Ok(IppResponse { header: res.header().clone(), attributes: res.attributes().clone() })
}
pub fn header<'a>(&'a self) -> &'a IppHeader {
&self.header
}
pub fn attributes<'a>(&'a self) -> &'a IppAttributeList {
&self.attributes
}
}