You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A textual representation that provides insights into implementation details and helps investigating bugs in the type that is being printed.
It potentially exposes private fields, which would generally elided from general-purpose output.
The output is not stable and makes no guarantees.
It is an @internal static method implemented by the runtime.
It uses runtime-internal facilities, which may ignore language rules to inspect innards of instances and retrieve information not accessible from user code, e. g. pointer addresses.
Supported by these facilities, it makes reasonable efforts to avoid non-termination due to circular references, disambiguation of equal but not identical references etc.
Usage does not require any kind of trait.
Output of debugString is "" except in release builds.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Plan
Stringable#toString()
focuses on general-purpose output:capacity
for collections, the structure of binary trees, the occupancy ratio of hash maps etc.).Stringable
traits, and putting that constraint on parameters/values when calling the method.runtime.debugString(value)
provides debugging-oriented output:@internal
static method implemented by the runtime.debugString
is""
except in release builds.Beta Was this translation helpful? Give feedback.
All reactions