/// Content type of the event `data` or `metadata`.
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
pub enum ContentType {
    /// Raw bytes
    Bytes,
    /// JSON values usable with projections in EventStore
    Json
}

impl From<ContentType> for i32 {
    fn from(content_type: ContentType) -> Self {
        match content_type {
            ContentType::Bytes => 0,
            ContentType::Json => 1,
        }
    }
}

/// Content type of the event `data` or `metadata`.
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
pub enum ContentType {
    /// Raw bytes
    Bytes,
    /// JSON values usable with projections in EventStore
    Json
}

impl Into<i32> for ContentType {
    fn into(self) -> i32 {
        match self {
            ContentType::Bytes => 0,
            ContentType::Json => 1,
        }
    }
}

--- 
+++ 
@@ -7,9 +7,9 @@
     Json
 }
 
-impl Into<i32> for ContentType {
-    fn into(self) -> i32 {
-        match self {
+impl From<ContentType> for i32 {
+    fn from(content_type: ContentType) -> Self {
+        match content_type {
             ContentType::Bytes => 0,
             ContentType::Json => 1,
         }
content-type: Replace the Into impl by a From impl

library doc:

Library authors should not directly implement this trait, but should prefer implementing the From trait, which offers greater flexibility and provides an equivalent Into implementation for free, thanks to a blanket implementation in the standard library.
