Conform to EntityIdentifierConvertible #72
magnusburton
started this conversation in
General
Replies: 1 comment 1 reply
-
Does it help if you conditionally make extension Tagged: EntityIdentifierConvertible where RawValue == String {
public var entityIdentifierString: String {
self.rawValue
}
public static func entityIdentifier(for entityIdentifierString: String) -> Tagged<Tag, RawValue>? {
Tagged(entityIdentifierString)
}
} If this is the correct thing for us to do we could include it in the library. Also, this is not really an issue with a library, and so I am going to convert this to a discussion. Feel free to continue the conversation over there. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I tried implementing conformity to
EntityIdentifierConvertible
in AppIntents, but I couldn't make it work. I'd like to be able to do the following:Now, as a work-around I define id in the entity as
Route.ID.RawValue
but that defeats the purpose a bit. What do you think?Beta Was this translation helpful? Give feedback.
All reactions