pub struct Rcon { /* private fields */ }
Expand description
RCON connection struct for handling sending and receiving RCON packets
Implementations§
Source§impl Rcon
impl Rcon
pub fn new(args: &Args) -> RconResult
pub fn get_conn(ip: &str, port: &str) -> Result<TcpStream>
pub fn authenticate(&mut self) -> bool
Sourcepub fn send_cmd(&mut self, body: &str) -> Result<Vec<Packet>, RconError>
pub fn send_cmd(&mut self, body: &str) -> Result<Vec<Packet>, RconError>
API function to send RCON commands and receive packets
pub fn run(self) -> RconResult
Auto Trait Implementations§
impl Freeze for Rcon
impl RefUnwindSafe for Rcon
impl Send for Rcon
impl Sync for Rcon
impl Unpin for Rcon
impl UnwindSafe for Rcon
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