Documentation for method has_accessor assembled from the following pages:

Class: Attribute §

From Attribute

(Attribute) method has_accessor §

Defined as:

method has_accessor(Attribute:D: --> Bool:D)

Returns True if the attribute has a public accessor method.

class Container {
    has $!private;
    has $.public;
}
my $private = Container.^attributes(:local)[0];
my $public = Container.^attributes(:local)[1];
say $private.has_accessor# OUTPUT: «False␤» 
say $public.has_accessor;  # OUTPUT: «True␤»