Zig 0.17.0-dev (Split by item)

Shortcut keys
?
Show these tips
S
Focus search field
Esc
Clear focus & close tips
U
Jump to source code
↑
Move up in search results
↓
Move down in search results
↵
Go to active search result
This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig standard library. Public Struct

Fn

Public Struct
std.lang.Type.Fn
pub const Fn = struct

This data structure is used by the Zig language code generation and therefore must be kept in sync with the compiler implementation.

Fields

attrs: Attributes
is_generic: bool
return_type: ?type

null means the return type is generic, i.e. it depends on a function argument.

param_types: []const ?type

A null element represents either an anytype parameter, or a parameter with a generic type, i.e. where the type depends on a previous function argument.

param_attrs: []const ParamAttributes

Guaranteed to have the same length as param_types.

Structs

File

lang.zig:848
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
    pub const Fn = struct {
        attrs: Attributes,
        is_generic: bool,
        /// `null` means the return type is generic, i.e. it depends on a function argument.
        return_type: ?type,

        /// A `null` element represents either an `anytype` parameter, or a parameter with a generic
        /// type, i.e. where the type depends on a previous function argument.
        param_types: []const ?type,
        /// Guaranteed to have the same length as `param_types`.
        param_attrs: []const ParamAttributes,

        pub const ParamAttributes = struct {
            @"noalias": bool = false,
        };

        pub const Attributes = struct {
            @"callconv": CallingConvention = .auto,
            varargs: bool = false,
        };
    }