=begin pod :kind("Type") :subkind("class") :category("exception")

=TITLE class Backtrace::Frame

=SUBTITLE Single frame of a Backtrace

    class Backtrace::Frame { }

A single backtrace frame. It identifies a location in the source code.

=head1 Methods

=head2 method file

Defined as:

    method file(Backtrace::Frame:D --> Str)

Returns the file name.

    my $bt = Backtrace.new;
    my $btf = $bt[0];
    say $btf.file;

=head2 method line

Defined as:

    method line(Backtrace::Frame:D --> Int)

Returns the line number (line numbers start counting from 1).

    my $bt = Backtrace.new;
    my $btf = $bt[0];
    say $btf.line;

=head2 method code

Defined as:

    method code(Backtrace::Frame:D)

Returns the code object into which C<.file> and C<.line> point, if available.

    my $bt = Backtrace.new;
    my $btf = $bt[0];
    say $btf.code;

=head2 method subname

Defined as:

    method subname(Backtrace::Frame:D --> Str)

Returns the name of the enclosing subroutine.

    my $bt = Backtrace.new;
    my $btf = $bt[0];
    say $btf.subname;

=head2 method is-hidden

Defined as:

    method is-hidden(Backtrace::Frame:D: --> Bool:D)

Returns C<True> if the frame is marked as hidden with the
C<is hidden-from-backtrace> trait.

    my $bt = Backtrace.new;
    my $btf = $bt[0];
    say $btf.is-hidden;

=head2 method is-routine

Defined as:

    method is-routine(Backtrace::Frame:D: --> Bool:D)

Return C<True> if the frame points into a routine (and not
into a mere L<Block|/type/Block>).

    my $bt = Backtrace.new;
    my $btf = $bt[0];
    say $btf.is-routine;

=head2 method is-setting

Defined as:

    method is-setting(Backtrace::Frame:D: --> Bool:D)

Returns C<True> if the frame is part of a setting.

    my $bt = Backtrace.new;
    my $btf = $bt[0];
    say $btf.is-setting; # OUTPUT: «True␤»

=end pod
