Struct AsyncTap

Source
pub struct AsyncTap<T, D: AsyncSyslogDestination> { /* private fields */ }
Expand description

A structure which holds a socket instance and all necessary information which can be used to reestablish the connection. This is for async only.

Trait Implementations§

Source§

impl AsyncSyslogTap<SyslogFile> for AsyncTap<File, SyslogFile>

Source§

fn new(req_tap: SyslogFile) -> SyRes<Self>

Proves the new instance of the syslog communication. Read more
Source§

async fn connectlog(&mut self) -> SyRes<()>

Opens a connection to target.
Source§

async fn send(&mut self, msg: &[u8]) -> Result<usize>

Writes provided data to socket
Source§

async fn disconnectlog(&mut self) -> Result<()>

Disconnects the connection.
Source§

fn is_connected(&self) -> bool

Tells if connection was opened.
Source§

fn get_type(&self) -> TapType

Returns the exact type of the connection.
Source§

fn get_max_msg_size(&self) -> usize

Returns (in bytes) the maximum message size (including headers).
Source§

fn update_tap_data(&mut self, tap_data: SyslogFile)

Updates the connection information without breaking tap.
Source§

impl AsyncSyslogTap<SyslogLocal> for AsyncTap<UnixDatagram, SyslogLocal>

Source§

fn new(req_tap: SyslogLocal) -> SyRes<Self>

Proves the new instance of the syslog communication. Read more
Source§

async fn connectlog(&mut self) -> SyRes<()>

Opens a connection to target.
Source§

async fn send(&mut self, msg: &[u8]) -> Result<usize>

Writes provided data to socket
Source§

async fn disconnectlog(&mut self) -> Result<()>

Disconnects the connection.
Source§

fn is_connected(&self) -> bool

Tells if connection was opened.
Source§

fn get_type(&self) -> TapType

Returns the exact type of the connection.
Source§

fn get_max_msg_size(&self) -> usize

Returns (in bytes) the maximum message size (including headers).
Source§

fn update_tap_data(&mut self, tap_data: SyslogLocal)

Updates the connection information without breaking tap.
Source§

impl AsyncSyslogTap<SyslogNetTcp> for AsyncTap<TcpStream, SyslogNetTcp>

Source§

fn new(req_tap: SyslogNetTcp) -> SyRes<Self>

Proves the new instance of the syslog communication. Read more
Source§

async fn connectlog(&mut self) -> SyRes<()>

Opens a connection to target.
Source§

async fn send(&mut self, msg: &[u8]) -> Result<usize>

Writes provided data to socket
Source§

async fn disconnectlog(&mut self) -> Result<()>

Disconnects the connection.
Source§

fn is_connected(&self) -> bool

Tells if connection was opened.
Source§

fn get_type(&self) -> TapType

Returns the exact type of the connection.
Source§

fn get_max_msg_size(&self) -> usize

Returns (in bytes) the maximum message size (including headers).
Source§

fn update_tap_data(&mut self, tap_data: SyslogNetTcp)

Updates the connection information without breaking tap.
Source§

impl AsyncSyslogTap<SyslogNetUdp> for AsyncTap<UdpSocket, SyslogNetUdp>

Source§

fn new(req_tap: SyslogNetUdp) -> SyRes<Self>

Proves the new instance of the syslog communication. Read more
Source§

async fn connectlog(&mut self) -> SyRes<()>

Opens a connection to target.
Source§

async fn send(&mut self, msg: &[u8]) -> Result<usize>

Writes provided data to socket
Source§

async fn disconnectlog(&mut self) -> Result<()>

Disconnects the connection.
Source§

fn is_connected(&self) -> bool

Tells if connection was opened.
Source§

fn get_type(&self) -> TapType

Returns the exact type of the connection.
Source§

fn get_max_msg_size(&self) -> usize

Returns (in bytes) the maximum message size (including headers).
Source§

fn update_tap_data(&mut self, tap_data: SyslogNetUdp)

Updates the connection information without breaking tap.
Source§

impl AsyncSyslogTap<SyslogTls> for AsyncTap<TlsStream<TcpStream>, SyslogTls>

Source§

fn new(req_tap: SyslogTls) -> SyRes<Self>

Proves the new instance of the syslog communication. Read more
Source§

async fn connectlog(&mut self) -> SyRes<()>

Opens a connection to target.
Source§

async fn send(&mut self, msg: &[u8]) -> Result<usize>

Writes provided data to socket
Source§

async fn disconnectlog(&mut self) -> Result<()>

Disconnects the connection.
Source§

fn is_connected(&self) -> bool

Tells if connection was opened.
Source§

fn get_type(&self) -> TapType

Returns the exact type of the connection.
Source§

fn get_max_msg_size(&self) -> usize

Returns (in bytes) the maximum message size (including headers).
Source§

fn update_tap_data(&mut self, tap_data: SyslogTls)

Updates the connection information without breaking tap.
Source§

impl<T: Debug, D: Debug + AsyncSyslogDestination> Debug for AsyncTap<T, D>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<T, D> Freeze for AsyncTap<T, D>
where D: Freeze, T: Freeze,

§

impl<T, D> RefUnwindSafe for AsyncTap<T, D>

§

impl<T, D> Send for AsyncTap<T, D>
where T: Send,

§

impl<T, D> Sync for AsyncTap<T, D>
where D: Sync, T: Sync,

§

impl<T, D> Unpin for AsyncTap<T, D>
where D: Unpin, T: Unpin,

§

impl<T, D> UnwindSafe for AsyncTap<T, D>
where D: UnwindSafe, T: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.