Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not all types are deserialize #491

Open
bismitpanda opened this issue Dec 18, 2024 · 3 comments
Open

Not all types are deserialize #491

bismitpanda opened this issue Dec 18, 2024 · 3 comments

Comments

@bismitpanda
Copy link

The following types are not Deserialize in the networks nodule:

  • InspectNetworkOptions
  • ListNetworkOptions
  • ConnectNetworkOptions
  • DisconnectNetworkOptions
  • PruneNetworkOptions

Even though they could be trivially. I did not find any issue, discusion related to this. If there is, please link it here.

@fussybeaver
Copy link
Owner

They're not used for Deserializing... they're serialized into query strings in an API request..

@bismitpanda
Copy link
Author

bismitpanda commented Dec 19, 2024

I was making a docker web client using axum and needed the types as deserialize to use as Query parameters in the endpoint. Now I have to define everything manually a deserialize struct and then assign then to the bollard ones.

Is there any other way to go about it rather than creating other structs?

@markonyango
Copy link

Afaik there should be no other way because of the orphan rule. Deserialize is a foreign trait and the aforementioned structs are also foreign to your crate. Why not create your own structs and implement From for the option structs?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants