diff --git a/src/components.rs b/src/components.rs index f23714a..f5c256d 100644 --- a/src/components.rs +++ b/src/components.rs @@ -184,6 +184,12 @@ impl Deref for Incoming { } } +impl AsRef for Incoming { + fn as_ref(&self) -> &T { + &self.0 + } +} + /// Bevy Event for outgoing IRC messages and commands #[derive(Event, Debug, Clone)] pub struct Outgoing(pub(crate) T); @@ -196,6 +202,12 @@ impl Deref for Outgoing { } } +impl AsRef for Outgoing { + fn as_ref(&self) -> &T { + &self.0 + } +} + impl Outgoing { /// Create a new outgoing command event #[inline]