Created
July 15, 2025 14:08
-
-
Save ptdecker/9bf90846f2d2e0b54ac9729c487efaa1 to your computer and use it in GitHub Desktop.
Invalid type mismatch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[derive(Debug, Serialize, Deserialize)] | |
pub struct ConsumerRequest { | |
/// The unique identifier for the consumer record. This parameter is optional and only used | |
/// when updating or deleting a consumer record. | |
#[cfg(feature = "string-consumer-id")] | |
pub consumer_id: Option<String>, | |
#[cfg(not(feature = "string-consumer-id"))] | |
pub consumer_id: Option<Uuid>, | |
pub organization_id: Option<String>, | |
trace_id: Option<Uuid>, | |
trace: Option<EventTraceMap>, | |
} | |
impl Default for ConsumerRequest { | |
fn default() -> Self { | |
let consumer_id = ConsumerId::new().id; | |
Self { | |
consumer_id: Some(consumer_id), | |
organization_id: None, | |
trace_id: Some(Uuid::new_v4()), | |
trace: None, | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment