-
Notifications
You must be signed in to change notification settings - Fork 56
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
The mutability of the API 0.6.4, is it by design? #155
Comments
Friendly ping @utam0k |
@Forsworns Why don't you use a builder pattern like that? |
@utam0k Thanks, but I only want to modify a single field of existing spec, as described above, the
|
I guess simply appending a |
I found that the LinuxMemory is without setter, is this by design?
BTW, the current API returns an immutable reference to the struct fields, making it hard to revise the spec in place. Why not simply return a mutable reference, so that we can use
get_or_insert
to modify it.For example, I have a mutable referenced spec
s
and want to only modify its cpu quota in palce. With current API (v0.6.4), I have to write the following code, right?So complicated :(
The text was updated successfully, but these errors were encountered: