Len returns the number of keys in the State.
()
| 87 | |
| 88 | // Len returns the number of keys in the State. |
| 89 | func (s *State) Len() int { |
| 90 | length := 0 |
| 91 | s.dependencies.Range(func(_, _ any) bool { |
| 92 | length++ |
| 93 | return true |
| 94 | }) |
| 95 | |
| 96 | return length |
| 97 | } |
| 98 | |
| 99 | // GetState retrieves a value from the State and casts it to the desired type. |
| 100 | // It returns the casted value and a boolean indicating if the cast was successful. |