diff --git a/src/platform/mod.rs b/src/platform/mod.rs index 314705d..3957168 100644 --- a/src/platform/mod.rs +++ b/src/platform/mod.rs @@ -64,7 +64,7 @@ macro_rules! impl_platform_host { /// The **StreamId** implementation associated with the platform's dynamically dispatched /// **Host** type. - #[derive(Clone, Debug, Eq, PartialEq)] + #[derive(Clone, Debug, Eq, Hash, PartialEq)] pub struct StreamId(StreamIdInner); /// The **SupportedInputFormats** iterator associated with the platform's dynamically @@ -107,7 +107,7 @@ macro_rules! impl_platform_host { )* } - #[derive(Clone, Debug, Eq, PartialEq)] + #[derive(Clone, Debug, Eq, Hash, PartialEq)] enum StreamIdInner { $( $HostVariant(crate::host::$host_mod::StreamId), diff --git a/src/traits.rs b/src/traits.rs index fb48829..f50764e 100644 --- a/src/traits.rs +++ b/src/traits.rs @@ -195,4 +195,4 @@ pub trait EventLoopTrait { } /// The set of required bounds for host `StreamId` types. -pub trait StreamIdTrait: Clone + std::fmt::Debug + PartialEq + Eq {} +pub trait StreamIdTrait: Clone + std::fmt::Debug + std::hash::Hash + PartialEq + Eq {}