//---------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool. Changes to this
//     file may cause incorrect behavior and will be lost
//     if the code is regenerated.
//
//     Generated on 2022 March 13 05:25:13 UTC
// </auto-generated>
//---------------------------------------------------------
using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using atomic = go.runtime.@internal.atomic_package;
using @unsafe = go.@unsafe_package;

#nullable enable

namespace go
{
    public static partial class runtime_package
    {
        [GeneratedCode("go2cs", "0.1.2.0")]
        private partial struct metricData
        {
            // Constructors
            public metricData(NilType _)
            {
                this.deps = default;
                this.compute = default;
            }

            public metricData(statDepSet deps = default, Action<ptr<statAggregate>, ptr<metricValue>> compute = default)
            {
                this.deps = deps;
                this.compute = compute;
            }

            // Enable comparisons between nil and metricData struct
            [MethodImpl(MethodImplOptions.AggressiveInlining)]
            public static bool operator ==(metricData value, NilType nil) => value.Equals(default(metricData));

            [MethodImpl(MethodImplOptions.AggressiveInlining)]
            public static bool operator !=(metricData value, NilType nil) => !(value == nil);

            [MethodImpl(MethodImplOptions.AggressiveInlining)]
            public static bool operator ==(NilType nil, metricData value) => value == nil;

            [MethodImpl(MethodImplOptions.AggressiveInlining)]
            public static bool operator !=(NilType nil, metricData value) => value != nil;

            [MethodImpl(MethodImplOptions.AggressiveInlining)]
            public static implicit operator metricData(NilType nil) => default(metricData);
        }

        [GeneratedCode("go2cs", "0.1.2.0")]
        private static metricData metricData_cast(dynamic value)
        {
            return new metricData(value.deps, value.compute);
        }
    }
}