[][src]Module photonix::focus

Type classes for getters and setters.

Modules

composites

Traits

Get

Returns the target field of a container (struct) by value, consumes the container (unless it implements Copy).

GetOption

Returns the target field of a container (enum) by value as an Option, consumes the container (unless it implements Copy).

GetRef

Returns the target field of a container (struct) by reference, keeps the container.

Modify

Updates the field of a container (struct/enum) by applying the provided function on the target value. Consumes the original container (unless it implements Copy), returns the updated one.

ModifyOption

Updates the field of a container (enum) by applying the provided function on the target value. Consumes the original container (unless it implements Copy), returns the updated one wrapped in an Option.

ReverseGet

Constructs the relevant enum variant based on the input.

Set

Updates the field of a container (struct/enum) with the provided value. Consumes the original container (unless it implements Copy), returns the updated one.

SetOption

Updates the field of a container (enum) with the provided value. Consumes the original container (unless it implements Copy), returns the updated one wrapped in an Option.