pub struct Connection { /* private fields */ }
Expand description
Simplified connection
Has the most simplified methods for communication
Implementations§
Source§impl Connection
impl Connection
Sourcepub fn connect(ip: &str) -> Result<Connection>
pub fn connect(ip: &str) -> Result<Connection>
Makes a connection and returns a Connect if successful
Sourcepub fn parse_incoming(&mut self) -> Result<HttpData>
pub fn parse_incoming(&mut self) -> Result<HttpData>
Performs stream reading and parsing
Returns a request / response if successful
Sourcepub fn write_builder<T>(&mut self, response: T) -> Result<()>where
T: Builder,
pub fn write_builder<T>(&mut self, response: T) -> Result<()>where
T: Builder,
Writes a structure that implements the trait Builder
Structure in process consumed
Auto Trait Implementations§
impl Freeze for Connection
impl RefUnwindSafe for Connection
impl Send for Connection
impl Sync for Connection
impl Unpin for Connection
impl UnwindSafe for Connection
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more