►
From YouTube: 8. Generic types & traits (Курс Rust на NEAR)
Description
Все видео курса https://www.youtube.com/playlist?list=PL9tzQn_TEuFUakOn-IY9cDQL2ztNzZunh
Совместный курс NEAR & 4ire Labs
Подписывайтесь, чтобы получать обновления о новостях NEAR, акциях, запуске проектов, баунти, хакатонов
Русскоязычное сообщество NEAR https://t.me/near_protocol
Твиттер https://twitter.com/near_protocol
Общение с разработчиками https://t.me/openwebdev
Follow the latest from NEAR Protocol on:
Website: https://near.org/
Discord: https://near.chat/
Blog: https://near.org/blog/
Twitter: https://twitter.com/NEARProtocol
GitHub: https://github.com/near https://github.com/nearprotocol
#Blockchain #FutureIsNEAR #NEAR #nearprotocol #rust #wasm #assemblyscript #раст
A
Welcome
to
our
eighth
lecture
on
school
1,,
we
haven't
seen
each
other
for
a
long
time
and
today's
topic
is
devoted
to
the
topic
of
generics
and
trade,
and
this
is
already
one
of
the
advanced
topics
and
don't
be
afraid
if
something
is
not
clear
to
you,
in
any
case,.
You
can
return
to
this
topic
and.
A
A
What
goals
we
have
set
today,.
They
are
formulated
quite
succinctly:
what
is
janelle
exe
when
to
apply
them,,
and
we
will
understand
in
general
what
is
the
scope
of
their
use,?
We
will
consider
implementation
from
the
implementation
of
methods
for
data
structures
before
that,.
We
did
not
dive
deep
into
this
topic,.
A
Only
in
this
general
form,,
we
will
consider
what
trace
is
and
their
scope
of
application,,
and
we
will
also
deal
with
that.
This
gives
us
the
flexibility
and
practicality
of
skoda
in
combination
with
change
and
a
third,
in
general,.
Such
a
seemingly
modest
task
and
I
suggest,
let's
figure
out
what,
in
principle,
is
generics.
A
If
we
are
with
you,
we
will
present
to
you
a
mathematical
model
as
a
set
in
the
general
form
of
generics
and
reflects
this
concept,
that
is,
for
types.
We
can
use
such
a
general
concept
as
a
set,
that
is,
occurrences
of
something
more,,
including
this
implies
a
subset
and
thus
generics,
that
is,
a
certain
generic
type.
It
implements
a
more
rigorous
mathematical
concept
that
allows
you
to
operate
with
a
wider
set
of
data
and
types,,
and
this
allows
you
to
significantly
develop
the
design
of
our
program,
on
the
one
hand,
make
it
more
concise,.
A
Logical
and
one
of
the
first
tasks
that
generics
solve
as
such
in
general
code
duplication,,
which
code
duplication,
Well,
I,
will
show
with
examples
today
there
will
be
enough
examples
to
see
live
what
they
are,
but
in
general
terms,
it
allows
us
to
solve
one
of
the
problems
when
we
put
the
same
functionality
that
correlates
directly
with
types,.
In
this
case
it
concerns
not
functions,
but
types
when
we
can
imagine
how
some
kind
of
generalized
heat
or
generic
data
types
also
solves
the
problem
of
generalizing
types
to
given
constraints,
this.
A
B
B
A
End
with
these
types
and
let's
look
at
the
implementation-
the
implementation
of
a
specific
method
for
our
neck
structure.
Here
we
see
the
keyword
and
mpl
implementation
and,
in
general
terms,
the
description
of
the
implementation
is
quite
simple,
that
is,
the
impale
keyword
is
the
name
of
the
structure.
In
our
case
it
is
the
neck
and
also,
as
you
understand
it
can
be
for
us
with
which
we
are
before
considered
further,.
A
As
you
can
see,
when
we
describe
the
structures
of
the
ears
we
are
intentionally
described
as
public,
that
is,
we
can
use
it
outside
the
current
module
or
crate,
and
also
note
that
these
are
public
fields
of
the
structure,
that
is,,
if
I,
do
not
put
public
pub,
here,
I
will
not
have
access
to
these
fields
from
the
outside,
that
is,
there
may
be
a
situation
when
you
need
to
hide
these
fields,.
This
is
one
of
such
good
opportunities,
when,
for
example,.
You
can
do
x
and
not
public
make
y.
A
The
same
goes
for
fun
actions
in
the
implementation
of
our
structure
in
this
case,,
probably
correct,.
It
would
not
be
considered
as
a
certain
method,,
but
I
want
to
draw
your
attention
to
the
fact
that
it
is
a
mistake
to
represent
it
as
a
class
in
growth;.
There
are
no
classes;.
There
is
no
such
class
model;.
There
is
a
model
for
implementing
specific
methods
through
implementation
and
trade
and
3,
just
we
are
considering
today
and
what
the
description
of
this
particular
method
or
function
is,.
A
B
B
A
And
in
if
you
want
to
access
this
structure
with
a
look
of
chic,,
if
you
do
not
specify
villages,,
then
this
method
will
be
perceived
as
static
and,.
As
you
might
guess,,
you
will
not
be
able
to
get
particular
x
fields
in
this
neck,
structure,
or
I
will
also
draw
your
attention
to
birsan
3
in
general,.
It
is
here
is
not
at
all
accidental;.
It
is
connected
with
borrowing
the
corresponding.
A
Clearly,
when
ampersand
is
here,,
it
means
that
the
own
structure
is
passed
by
reference,,
but
if
the
ampersand
meter
does
not
indicate
borrowing
to
the
tabula,,
what
does
this
mean
in
practice?
In
practice,,
when
we
use
our
function
with
its
own
example
for
the
method,,
then
we
will
get
what
happens
after
it
today.
We
simply
cannot
use
the
variable
itself,
which
implements
the
neck
and
thinner,,
because.
A
It
has
been
moved
to
the
body
of
this
function,.
You
just
need
to
keep
in
mind.
There
are
situations
when
you
need
to
use
it
without
an
ampersand,,
but
I
think
you
will
encounter
this
very
rarely,
very
much.
So
you
need
to
remember
the
implementation
of
the
function
that
it
is
declared
through
as
a
regular
function.
It
has
and
requires
the
visibility
of
pub
also
I
want
to
say
that
in
Russia
there
are
additional
attributes
that
allow
you
to
adjust
the
visibility
of
the
example.
A
Example
already,
as
they
say,
on
self-studied
no,,
but
there
is
such
an
opportunity
and
what
is
this
function
to
do,?
It
just
takes
data
from
the
x
and
y
fields
and
adds
up
the
call
occurs
through
a
point
to
the
structure,
that
is,
just
as
before,
and,
let's
imagine
the
following
situation,.
We
have
exactly
the
same
structure,
but
like
you,
you
see
that
it
hasn’t
changed
in
this
case,.
We
have
changed
now,
it’s,
not
the
same
jar
fleet
and,
as
you
can
see,
in
fact,
nothing
has
changed
at
all,.
A
A
A
We
have
already
been
with
it
before
encountered
when
we
described
the
unclenched
communities
with
the
previous
topic
th.
So
these
are
the
brackets
and
the
rule
is
quite
simple.
In
these
brackets,
we
indicate
through
a
capital
letter
our
generic
type
for
generalization,.
They
usually
indicate
the
type
that
should
be
informative,
that
is,
in
this
case,.
Why?
Very
often
you
can
meet
bugurts
of
a
wide
variety
of
examples,,
because
today
we
have
everything
displays
the
keyword
type,
also.
B
A
B
A
B
A
Have
our
sheikh
structure,
for
example,
implement
a
type
that
relates
to
god
as
a
result
of
the
hash
function,
it
is
logical
and
to
call
through
the
letter
h,
it
will
be
simply
informative,
that
is,,
you
need
to
proceed
from
a
very
specific
context,
respectively,.
When
we
describe
the
structure,
here
we
indicate
what
the
name
of
the
generic
type
of
the
scientific
type
is
and
already
in
the
body
of
the
structure
itself,
we
can
actively
apply
it
in
this
case,
I
applied
it
to
two
clearings
x
and
y.
They
are
of
the
same
type,.
B
B
A
Or
any
other
type
from
here,
and
as
you
can
see,
within
this
structure,
we
can
actively
use
our
declaration
of
our
generic
site,
and
now,
let's
figure
out
what
happened
to
our
implementation
in
appearance,,
it
has
become
more
complicated.
This
is
one
of
the
things
that
sometimes
scares
people
a
little
because
in
Russia
a
lot
of
such
square
brackets
begin
to
appear
and
some
jokers
are
still
there
in
2015
compared
these
brackets
too,.
A
Although
these
parentheses
are
close,
but
however,
over
time,,
you
will
get
used
to
the
fact
that
there
can
be
a
lot
of
these
brackets,.
But
let's
take
a
closer
look
at
how
such
fixed
the
description
of
generic
types
or
generic
tights
in
the
implementation
near
the
implementation
keyword,
we
open
brackets,,
which
again
describe
our
type
that
we
described
the
description
structures
why
this
is
done.
This
type
extends
to
virtually
the
entire
body
of
implementation,,
including
the
description,
that
is,
the
structure
of
which
we
implement.
A
What
a
copy,
is,
I
will
tell
you
a
little
later
and,
as
you
can
see,,
since
we
have
our
shape
structure,,
it
takes
itself
a
generic
type.
We
declare
in
intro
mind
walkie-talkie
here
we
apply
it
here
and,
as
I
will
show
further,
it
can
be
extended
to
other
cases
and
note
that
here
is
the
declaration
we
can
now
use
here.
This
is
the
point
of
elementals.
We
can
now
use
in
the
body
of
the
function
that
we
implement,
meaning
you
their
description,
I.e.
A
This
case
we
take
x
and
return
it
to
because,
in
our
case
x,
when
the
structure
description
is
a
generic
type.
In
this
case
t,
it
is
quite
logical
that
our
types
are
the
same,
and
thus
we
actually
we
did
what
turned
out
to
be
such
a
thing
that,
as
a
generic
type,
we
can
actually
pass
any
type
to
an
example.
It
can
be
an
intended
boolean
or
our
custom
type.
A
B
A
Implies
that
in
general,
the
type
and
itself
represents
a
certain
single
element,.
If
we
turn
to
type
theory,,
then
they
give
us
prompt
that,
in
fact,
we
operate
with
a
single
structural
element
when
we
represent
it
as
a
set,,
although
it
is
not
represented
mathematically
as
a
set,.
This
means
that
we
have
a
certain
set
of
types
that
we
can
use
for
this
structure
and
implementation,.
B
A
Done,,
we
will
also
consider
it,,
and
now,
let's
complicate
our
task
a
little
bit
here
right
away,
I
introduce
a
type
restriction
through
three
spears.
Why
is
this
done?
If
I
I’ll
put
this
track
because,
as
you
can
see,
it
returns
without
an
ampersand,,
it
brought
it
not
as
a
reference,.
If
it
returned
as
a
reference,,
then
we
would
n’t
have
any
difficulties,
because,
as
you
remember,.
B
A
Is
tracked
and
the
case
when
I
would
not
use
the
trait
copy
and
tried
to
return
the
variable
x
by
the
compiler
of
the
correct
error
to
me,
because
the
lifetime
of
this
variable
drains
within
this
function,,
but
since
in
this
example,
I
specifically
show
how
to
use
restrictions
under
restrictions,.
This
is
the
third
mine.
What
a
trade
is,
I
will
consider
a
little
later,
just
note
that
there
is
such
a
specific
syntax
when,
through
two.
B
A
We
enumerate
what
restrictions
are
imposed,
and
again,
if
we
consider
our
structure
as
a
kind
of
set,
then
in
klimin
dances-
and
we
are
there
a
lot
limited
by
very
specific
criteria,
and
this
is
a
very
convenient
mathematical
model
that
will
help
you
navigate
with
how
you
can
set
up
generic
types
for
your
specific
tasks.
Example.
Today
we
will
consider
in
more
detail,
but
how
it
is
done,,
I
hope
it
will
be
clear
enough,,
and
so
what
does
it
mean
that
you
implement
read
copy,?
A
It
means
that
in
Russia
there
is
a
built-in
trade
that
implement
data
copying
by
default,.
This
refers
to
numbers,
simple
data,
to
what
can
be
operated
through
in
that
number
through
the
stack,
for
example,
for
a
string,.
This
can
no
longer
be
done,,
and
the
advantage
is
that
when
you
already
use
this
neck
structure,,
you
can
use
only
those
types
that
implement
this
3,.
How
does
it
mean
and
implements
this
trend,
today?
A
We
will
also
consider
in
detail
further
and
now,
let's
look
at
a
more
complex
structure
when
our
method
of
doing
something
is
already
plus
or
minus
useful,
as
you
can
see
gradually.
Our
implementation
becomes
more
complicated.
There
are
more
brackets
and
a
lot
of
incomprehensible
attachments,
let's
figure
out
what
is
happening,
so
our
task
has
changed.
We
have
requirements
so
that
the
fields
of
the
chic
structure,
x
and
y
add
up
at
the
same
time
about
Please
note
that
we
are
completely
unaware
of
some
type,
respectively,.
A
Since
we
do
not
know
any
type,,
we
must
prompt
the
compiler
and
give
restrictions
for
this
type
of
restriction,
again,.
They
are
made
through
the
trader,
and
so
the
first
thing
for
us,.
Each
of
these
types
must
implement
a
cube,,
because
how
do
you
you
see,?
We
don’t
return
peppers
through
from
the
pier,
and
since
borrowing
can
occur
in
this
case,.
This
raid
should
be
implemented
for
x,
such
and
such,.
Since
we
have
x
and
y
of
the
same
generic
type,
respectively,,
it
is
enough
to
describe
it
only
for
generic
type.
A
This
restriction-
and
here
some
incomprehensible
thing
already
appears,.
What
does
this
plus
mean,?
This
is
an
opening
parenthesis,,
let's
sort
it
out
in
stages
in
order
to
make
a
bowser,.
It
is
understood
that
the
multiple
use
of
other
trade
of,
that
is,
the
restriction
of
this
case,
restrictions-
and
the
third
is
not
only
restrictions,
this
and
much
more,
I-
will
stop
here
more
now.
A
What
do
you
have
not
to
confuse,
just
note
that
if
you
want
to
apply
several
trade
of
given
generics,,
this
is
done
through
a
plus,
not
a
comma,
not
a
dot,
not
a
parenthesis,
but
a
plus,
that
is,
this
is
such
a
mathematical
representation
would
be
like
this
today.
I
will
send
a
little
mathematics
when
we
we
make
some
such
intersections,.
Now.
Imagine
that
we
make
one
intersection
through
a
mine,
and,
accordingly,.
A
Our
scope
is
limited
by
another
restriction
through
plus,
we
make
through
and,
accordingly,
the
scope
of
application
decreases,
even
more,,
which
means
we
can
have
a
type
that
does
not
support
addition.
To
example
y.
We
have
numbers
they
support
addition.
There
is
an
example.
There
is
stone
and
earth
how
complex
they
are.
You
can’t
add
them
under,
because
these
types
do
not
support
addition
and
this
limitation
it
will
automatically
follow.
A
This
is
very
convenient
because,
in
fact,
at
the
implementation
level,
you
describe
everything
you
need
th
conditions
that
exist
for
a
specific
implementation
of
a
specific
function,,
and
so
what
is
it,
again,?
This
is
a
special
trade
that
says
that
these
types
have
the
property
of
addition,
since
here
in
warehouses,
what
output
means..
This
is
a
special
declared
type
attribute
that
says
what
type
we
need
to
return
and,
as
you
can
see,
it
is
returned
sorry.
It
is
described
again
in
square
brackets,
quite
unusual.
It
looks
but
over
time
you
get
used
to
it,
I.e.
A
in
this
case,
when
you
make
an
assignment.
It
means
that
this
one,
the
internal
structure,
would
probably
be
correct
to
say
the
type
or
field
that
refers
to
requires.
We
call
very
much,
and
you
mean
that
all
the
results
of
the
addition
that
we
have
here
they
will
be
of
the
type
of
our
generic
type
you
that
is,,
if
I
indicated
nothing
else,
here,
the
compiler
would
take
a
long
time
to
touch
and
I
cursed
and
I’m
afraid
that
this
would
be
the
end
of
it,.
You
may
have
a
question,.
Is
it.
A
Additional
30
generic
site,
in
principle,
it’s
possible,,
but
if
you
don’t
use
it,
I’m
afraid
that
the
compiler
may
be
offended
by
this
and
even
swear,,
and
as
you
see
now
with
us,
our
extended
example,
many
degrees
of
freedom,
appeared,,
and
so
we
can.
We
can
use
a
whole
lot
of
types
through
generic
types,.
A
We
can
impose
certain
requirements
on
these
types
through
straights,,
which
means
that
these
types
must
implement
these
three
of
these
optical
ones,,
I,
will
repeat,
and
I
will
show
how
this
is
done
today
in
our
case,.
We
already
use
two
whole
examples.
If
we
want
more,
then
we
write
the
leaves
through
a
plus
and
the
trade
we
need
is
indicated,
and,
as
you
can
see,
through
a
rather
concise
form,,
we
get
a
very
powerful
tool
for
developing
and,,
most
importantly,
designing
an.
A
B
A
B
A
The
field
for
structures
that
implement
another
generic,
old
and
1
and
the
specifics
are
that
if
you
want
to
add
another
generic
crowd
of
torsion
bars,,
yours
is
done
separated
by
commas,.
Everything
is
quite
simple.
The
only
thing
is
that,
if
you
describe
according
to
this
structure,,
you
should
use
it
and
again,
note
that
the
description
occurs
in
capital
letters,
it
matters,
because
the
compiler
will
still
get
upset.
A
A
Implementation
has
changed,
as
you
can
see
here.
An
extended
set
has
already
appeared
on
this
part.
I
will
not
stop,
but
where
we
have
you,
as
you
can
see
here,
we
also
have
restrictions,
but
after
three,
that
is,,
it
means
that
this
type
should
to
implement
in
this
case,
copy
is
just
copy,,
because
in
our
case
we
do
not
return.
This
variable,
this
variable
is
respectively
the
generic
type
you
what
it
means.
A
It
means
that,
in
fact,
we
can
use
two
different
types:
here,
that
is,
for
x
and
y,
for
example,
we
can
use
eager
and
for
z.
We
can
use
floor
and
this
will
also
apply
to
the
implementation,
and
also
note
that,
since
here
we
are
describing
our
generic
compliment.
Rate,
when
we
refer
to
the
type
here
here
is
the
description
again,.
We
must
definitely
indicate
which
generic
type
it
uses
In
this
case,
it
matters,.
As
you
can
see,,
we
have
sacrificed
a
more
extended
complex
model
and
learned
how
to
actually
do
that.
A
The
set
uses
different
generic
types,
that
is,
in
fact,
in
our
case,.
These
are
two
sets
that
do
not
intersect
and,
accordingly,.
We
have
expanded
our
implementation,,
which
allows
us
to
lean
from
leading
the
mind
different
sets
of
types,
respectively
2
data
type
generics,.
The
goal
is
to
look
rather
succinctly
and
in
fact,
and
allows
you
to
actually
get
rid
of
a
lot
of
code,
duplication
that
could
need
to
be
done.
For
example,.
B
A
A
Exist
somehow
ugly,
on
formatted
1,
there
is
a
keyword
in
I,
as
you
can
see
here
in
general.
Nothing
has
changed
because
the
implementation
remains
exactly
the
same,
but,
as
you
can
see
here,
we
include
the
words
and
mpl
the
square
bracket
of
the
entire
nose
and
goes
with
the
goal,
that
is,
a
very
concise
entry,.
The
keyword
appeared,,
which
means
that
we
are.
B
A
Here
in
more
detail
and
describe
which
three
you
should
implement
each
leaf,
that
is,
in
fact,
this
the
description
on
this
slide,
and
here
it
is.
They
do
not
differ
at
all
for
the
compiler.
It
is
the
same
thing
but
from
the
point
of
view
of
the
perception
of
the
code
I
found
out,
and
sometimes
the
description
through
vr
can
be
extremely
useful,
because
you
can
have
a
lot
of
these
entries
and
this
is
extremely
convenient
for
read.
The
same
keyword
applies,
nick
only
gimple
compliments,
but
their
function,
including
the
same
logic,
extends
to
functions.
A
Pay
attention
to
one
aspect
that
you
describe
before
opening
curly
braces
structure
the
following.
We
have
an
implementation
where
we
describe
the
generic
so
and
for
the
implementation
we
there
is
a
specific
structure
that
accepts
these
generic
Thai
and
in
this
case
the
mayor
of
it
is
written
which
trade
and
each
of
these
generic
types
accepts
and
that’s
all
and
curly
braces
important.
Such.
A
Be
understood
that
it’s
obvious
that
if
we
don’t
have
a
generic
for
the
structure,,
then
the
folder,
for
example,
here,,
as
if
it
were
not
to
implement
once,,
we
don’t
need
it.
It's
all
a
matter
of
describing.
This
only
applies
to
the
case
where
we
have
a
description
of
the
generic,.
This
is
actually
such
an
embellishment
that
greatly
simplifies
the
life
of
the
developers,
because
I
look
nice
to
you
and
let's
look
at
how
these
restrictions
that
we
talked
about
are
applied
to
the
specific
function.
A
As
you
can
see
those
type
of
neck,
we
have
then
the
same,
but
the
function
has
changed
something,
and
here
the
syntax.
It
already
looks
like,
as
you
noticed
differently,
let's
figure
it
out.
First,
we
have
the
faction
keyword
and
we
have
the
name
of
the
function
in
our
case
itself,
since
it
summarizes-
and
here
we
already
describe
the
generic
type
and
immediately
immediately
after
the
function
name,
that
is,
in
our
case
it
is
t
and
we
immediately
op,
we
study
what
trade
and
this
generic
type
should
implement.
A
In
our
case,
this
is
a
coupe
and
practically
this
entry
is
energetically
what
we
saw
in
the
implementation
here-
and
here
in
this
part,
including
as
you
can
see,
and
in
this
sense
it
just
makes
sense
to
remember
what,
after
and
I
have
a
function,.
We
have
a
junkie
right,
there,,
etc.
we
describe
them
right
away
here,
and
then
we
have
a
function
parameter
that
can
take
a
generic.
A
A
If
we
do
not
write
this
generic,
then
we
will
not
be
able
to
describe
this
structure,,
the
data
type
that
we
have
in
our
case,.
This
means
that
if
we
want
to
use
this
type,,
we
must
describe
in
the
function
itself,
in
this
case,,
this
generic
melts
in
the
function
itself,
and
since,
again,.
We
do
not
know
the
type
which
returns,
we
return
again,
in
fact,.
There
is
absolutely
nothing
new,.
A
A
Let's
see
how
the
call
happens,
as
you
see,
e
calls
are
quite
simple.
In
our
case,
we
describe
the
variable
of
our
type
through
the
layer,
for
example,
the
ship,
a
and
32
you
see
here
we
a
be
absolutely
any
type,
and
an
important
aspect
is
that,
for
example,.
If
we
look
here,
you
see,,
we
should
be
implemented
by
a
third
coupe
and
in
this
case,
32
by
default
in
the
standard
library,,
since
it
is
primitive,
I,
implement.
B
A
And
here,
accordingly,,
we
initialize
the
structure
itself
in
such
a
very
simple
way
and
now
pay
attention
to
what
happens
with
the
function
call,.
This
is
the
function
scrolling
slowly,
pay
attention
to
this
function
yourself
that
first
we
indicate
the
name
of
the
function
and
through
a
double
colon,
we
indicate
our
generic
type,.
B
A
Done
because
we
have
a
spike
here
and
32
what
type
our
generic
types
are
indicated
because
he
is
immediately
the
most,,
but
for
clarity,
I
show
you
how
generally
explicit
about
the
description
of
the
generic
type
of
the
function
takes
place,
and
again,
the
following,.
When
we
got
our
example,,
we
can
call
our
method
itself,,
which
was
described
earlier,.
A
A
A
A
Indicate
our
generic,
so
this
case
to
reach
and
again
I
repeat
that
we
can.
We
can
use
any
data
types
that
implement
this
generic
time
&
trade
and
which
relate
to
it,.
As
you
can
see,,
our
program
has
become
very
concise
and
there
is
no
code
duplication,.
It
is
quite
flexible
and
allows
you
to
solve
a
whole
range
of
tasks,
and,
most
importantly,.
What
it
does
for
how
many
times
is
strongly
typed
language,.
B
A
The
one
hand,
and
on
the
other
hand,
water
implements
memory
safety,
that
is,
we
cannot
arbitrarily
handle
variables,.
We
actually
have
a
fairly
powerful
tool
out
of
the
box.
When
everything
is
at
the
type
level,,
we
can
solve
a
whole
range
of
tasks
in
this
sense,
of
course,.
These
elements
relate
to
functional
programming
and
to
purely
functional
languages.
many
of
the
elements
of
growth
are
not.
A
This
case,
too,
generic
types
is
one
of
such
very
flexible
tools,
and
on
the
other,
hand,
and
I’m,
not
afraid
of
this
word,
I
strongly
hope
that
generic
dachshunds
didn’t
raise
any
special
questions,.
So
let’s
move
on
the
trinity
and
why,
in
fact,,
we
already
got
to
know
each
other
a
little
bit
and.
A
B
A
A
A
Describing,
we
are
announcing
this
hello
splitting,.
This
only
speaks
of
the
name
and,
as
elsewhere
in
Russia,.
It
is
customary
that
the
case
name
for
types
is
the
same
for
the
trade
forest
sour
to
describe
the
function
of
change
and,
as
you
can
see
here,
we
describe
some
abstract
methods
which
implement
must
implement
given
three
or
an
interface.
Let's.
A
The
first
case
it
doesn't
have,
as
you
can
see,
this
is
a
static
method,
because
it
is
not
accepted
itself,
and
this
means
that
given
3
I
must
implement
the
static
method.
New,
which
return-
and
here
we
have
a
new
keyword,
sat
down
with
capital
letter
means
that
it
returns
ti
n
of
the
structure
that
implements
this
track,
for
example,.
A
If
we
have
oh
32
Kaleshin
implements
trade
mall,,
then
this
means
that
when
declaring
these
structures,,
we
will
not
even
need
to
change,
once
the
compiler
will
independently
understand
that
it
is
the
type
that
implements
this
track,.
Everything
is
quite
simple,
and
so
we
have
already
seen
a
static
method
with
you,.
A
Let
me
remind
you
that
a
static
method
cannot
access
the
fields
of
the
structure
of
which
it
implements
for
this,
cells
are
needed,.
Then
we
see
the
declaration
with,
as
you
can
see,.
There
is
a
goal
here,
and
there
is
an
additional
variable
x,
which
is
32,
and
here
I’m
kind
of
not
going
to
go
into
details.
Just
note
that
there
are
different
types
of
function,
descriptions,.
A
Structure
also
applies
to
implementation,
that
is,.
If
we
want
to
change
the
data
of
the
structure
itself,
we
return,
in
fact,,
this
is
far
from
a
good
practice,.
It
would
be
better
to
do
better,
the
function.
Itself,
leave
it
clean,
clean.
It
develops
that
the
structure
that
contains
the
function
itself,
it
does
not
change.
A
So
it
makes
sense
to
proceed
from
a
specific
task
and
purely
rational
goals,,
and
here
is
one
of
such
unusual
records.
When
we
have
a
specific
implementation
of
the
function
is
described
here,.
This
is
a
default
description,,
which
means
that
if
we
do
not
write
this
this
function
in
the
third,,
then
it
will
default
to
exactly
such
x-men
with
this,,
which
means
that
all
functions
except
sap
oil
must
be
implemented
all
by
by
default,.
A
It
is
not
necessary
because
it
has
already
been
implemented,,
but
this
does
not
mean
that
it
is
for
me
need
to
be
implemented,
because
if
we
have
some
other
requirements,,
then
we
cannot
write
and
the
default
shareholder.
Implementation
will
be
changed,,
but
this
is
very
convenient
and
the
definition
when
there
is
an
implementation
is
silent,
and
maybe
you
noticed
such
a
strange
thing
that
there
is
nowhere
for
the
function
here.
A
B
B
A
B
A
Following
is
clearly
visible
here
that
we
use,
for
example,
thread
copy
here,
and
we
can
explicitly
indicate
that,
for
example,
we
have
our
spike
structure,
which,
for
example,
would
have
to
implement
save,
I.e.
in
this
case,
here,
instead
of
ours,.
It
would
be
a
helluva
lot
of
copin,,
which
should
implement
some
methods
there,,
but
for
clarity,
we
will
consider
exactly
our
rhyme
liter,,
which
should
implement
this
structure,
respectively,.
The
syntax
is
quite
simple
here
we
are
crayfish,,
but
we
describe
the
name
openly.
A
As
you
can
see,
this
raid
is
able
to
accept
Jedi
tariffs
and
specifying
the
structure
through
the
keyword
form,
that
is,.
If
you
just
say
that
the
interface
shaping
liter
should
be
implemented
for
the
structure
of
the
neck,
and
here
only
one
method
should
be
implemented
for
the
neck
of
the
ceiling,.
Only
the
method
itself
that
this
gives
us
this
gives
us
that
that
we
can.
A
A
If
we
previously
described
the
constraint
type
of
through:
as
you
remember,
for
specific
types,,
like
here,
in
our
case,,
we
already
make
a
type
restriction
for
our
track,,
as
you
can
see,
respectively,
generic,.
So
you
must
implement
our
trade
and
ship
kalkweiss,,
which
internally
accepts
generic
containers
and
also,
as
we
see
here,
our
chic
structure
is
described
and
in
order
to
simplify
the
notation,
we
will
dismiss
again.
The
keyword
in.
B
B
A
We
actually
have
4
3
copies.
We
are
already
familiar
with
him.
Also
familiar
with
him
also
appeared
himself
because,
as
you
can,
see,
subtraction
is
going
on
here,
and
the
fourth
one
is
our
personal
implementation
of
the
neck
of
a
liter
bottle,
and
now,
let's
look
at
at
least
something
new
in
the
implementation
of
the
function.
A
Itself,
that
is,,
we
have
our
separate
compilation
function
and
it
has
a
variable
z
that
takes
a
generic
type
and,
as
you
can
see
generic,
so
you
have
to
implement
4
trade,
a
ship
with
us
how
to
understand
personally
a
copy
of
it
and
itself.
This
means
that
we
can
operate
with
each
of
them,,
so
we
refer
to
the
method
itself
in
the
body
of
the
function
and
accordingly,
we
do
what
they
teach
and,
as
you
can
see,
what
does
not
stop.
A
A
A
Side,
here
we
have
access
to
5
cops,.
What
is
flexible
is
that
I
actually
declare
a
generic
type,.
We
automatically
already
have
the
ability
to
access
a
certain
method
and
on
the
one
hand
it
is
generic
and
on
the
other
hand,,
since
it
implements
a
specific
trade
to
our
sl
If,
we
teach
the
doll’s
share,,
then.
Accordingly,
we
can
refer
not
only
to
its
fields
from
our
cases
and,
for
example,
since,,
but
also
to
the
specific
methods
that
are
implemented
in
this
track,
and
let’s.
Look
at
one
more
additional
concept,.
A
This
is
a
trade
and
in
how
the
function
parameters.
There
is
another
special
set
keywords
and
what
it
is,,
as
you
can
see,
as
before,.
Our
structure
is
already
expanded,.
It
implements
3g
talk.
Liter,
here
is
our
function
of
which
has
not
changed
in
any
way,
and
we
have
an
additional
combination,
method
and.
A
In
our
case,
for
example,,
we
want
it
to
be
not
a
generic
type.
A
we
pass
the
parameters
directly
to
the
trade,.
This
means
that
our
variable
function,
parameter
z,
takes
directly
3
itself,
3
how
it
is
done,
and
birsan,
respectively,,
as
you
understand,
indicate
the
type
entity
for
trade
of,.
It
is
necessary
and
the
keyword,
implantation
and
mpl
and
the
name
trade
and
specifying
it
generic
type,
and,
accordingly,.
We
are
quite
easy.
A
We
can
refer
to
the
method
of
this
track
ourselves
and
subtract
it
from
the
structure
of
the
neck,
and
here,
in
fact,,
one
more
additional
power
of
generic
type
of
is
revealed,,
which
before
that
was
not
so
clear,.
This
is
when
here
in
the
implementation,
we
describe
generic
type
t
and
we
pass
it
through
the
description
of
trade
and
here,
in
fact,
that
is,.
It
means
that
we
can
describe
it
separately
by
the
rector
and
throw
it
in
a
third,
which,
for
the
implementation
of
the
function,,
including
for
returning
the
function,.
A
This
means
that
the
set
of
tools
for
designing
the
market
for
such
an
application,
design,
throw
it,
is
large
enough
and
provides
a
large
flexibility,
that
is,
as
you
can
see,.
We
have
two
types
of
access
1
through
with
generic,,
so
that
at
the
same
time
we
can
access
both
the
fields
of
the
structure
and
the
type,
and
on
the
other
hand,
we
can
pass
the
trade
itself
or
another
interface
directly
as
a
function,
parameter
and
access
its
method.
A
This
is
again
this
rather
large
flexibility,
and
again,.
I
will
remind
you
of
the
following
that.
If
you
want
to
merge
several
tracks,,
then
this
is
done
through
addition,
in
this
way,.
As
you
see
here
in
grow,,
one
of
the
specifics
is
manifested
that
there
can
be
quite
a
lot
of
such
brackets
and
at
times
there
can
be
a
lot
of
some
of
them,,
it's
confusing,.
A
But
if
you
use
the
normal
those.,
who
knows
how
to
highlight
curly
brackets
on
the
one
hand,
and
on
the
other,,
it
becomes
time
you
just
get
used
to
it,,
then
in
general,
there
shouldn’t
be
any
special
problems
in
this
and
let's
figure
out
what
materials
we
generally
have
on
the
topic,
I
specially
made
this
a
selection
that
deals
with
the
generic
type
of
trade
of
and
very
specific
examples
of
the
run.
Itself,
I
think
that
later
you
can’t
go
over
and
get
to
know
it
in
more
detail,.
A
Summing
up,
I
want
to
say
the
following:
that
generic
etc.
kiril
generalized
data
types
they
allow
you
to
operate
with
a
set
and
under
a
set
of
types,,
which
significantly
expands
the
possibility
of
writing
applications
and
design,
and
3.
Allow
you
to
implement
various
kinds
of
abstract
tools,,
thereby
expanding
the
functionality,,
because,
as
you
can
see,,
we
can
pass
it
both
as
generic
melts
and
as
a
function
parameter
and
in
a
variety
of
ways,.
This
significantly
expands
the
possibilities
for
implementation.
For
example,.
A
When
you
implement
your
own
library,,
then
the
correct
design
can
solve
everything,
because
you
don’t
know
how
much
the
user
will
use
and,
accordingly,,
if
not
very
evil,
abused,,
but
thoughtfully
enough,,
you
will
use
the
generic
type
or
trade
and
which
will
limit
this
type,.
Thus,
you
can
create
a
very
flexible
data
structure
on
the
one
hand
and
a
library,
and
on
the
other,
hand,
a
design
that
will
allow
you
to
reuse
your
library
in
the
widest
range
of
applications.
A
A
B
A
A
Listen
to
this
lecture
on
the
one
hand,
and
on
the
other,
hand,
turn
to
these
sources
of
documentation
and
read
there,
too,.
Quite
a
lot
has
been
written
about
this,
I
even
said
that
there
is
an
extended
set
that
concerns
lifetime
of
life
time,
and
we
deliberately
do
not
consider
it
because
this
is
a
big
topic
and
it
does
not
take
one
lecture
z.
We
have
quite
big
plans
because
how
to
move
on
ok
and
then
I
think
we
can
already
move
on
to
questions.
A
B
A
B
A
Just
the
name
of
the
generic
one,
what
it
means
it
means
that
for
some
reason
we
separated
them
and
most
likely,
if
in
a
generalized
form,
they
implement
different
sets,
and
maybe
these
sets
intersect
or
maybe
they
don’t
intersect.
If
I
use
the
word
set
too
much,
you’ll
excuse
me,,
but
it’s
easier
for
me
to
visualize
it,,
so
most
likely
they
still
don’t
match,,
because
you
intentionally
made
this
distinction,.
But
if
you
have
a
need
in
that
they
have
some
coincidences,,
then
after
three
floors
o
through
implementation
3,
you
can
do
this,,
but
again,.
A
This
needs
to
be
considered
in
a
very
specific
case,,
since
this
is
a
very
abstract
question,,
it
needs
to
be
considered
for
a
specific
case,.
So
I
will
answer
very
briefly
so
further
vadim,
why
the
gene,
genelec
type
of
a
function
is
indicated
precisely
through
a
double
colon.
Is
such
a
syntactic
element?
A
A
A
Actually,
what
does
it
mean
that
the
left
Part,
the
left
side
is
borrowed
from
us
and
I
think
this
was
done
intentionally
because
if,
for
example,
the
type
does
not
form
a
copy,,
then
what
will
happen
to
us
will
be
borrowed
and
we
will
no
longer
be
able
to
use
this
variable,
therefore,,
as
you
saw,,
our
generic
type
implemented
the
coupe
type.
It
is
precisely
due
to
the
fact
that,
in
the
description
that
you
showed
him
without
ampersand,
the
atheist
is
envying.
The
borrowing
of
rhs,
respectively,,
the
right
part,.
A
A
The
next
question
is
why
the
method
didn’t
understand,-
and
this
is
Maxim-
saying
that
he
had
this
question
gone,,
but
in
fact
he
didn’t
disappear,.
He
almost
wouldn’t
have
to
demand
and
buy,,
but
again
some
internal
implementation,
and
apparently
you
need
to
actually
look
at
how
it
does
not
implement.
But
I
think
that
this
is
a
log
justify.
A
Is
the
specifics
of
the
zoom
maybe
see
write
better
jibs
financially,
so
it
will
be
easier
why
the
type
of
gun
rick
functions
are
indicated
precisely
through
double:,
because
otherwise
there
will
be
ambiguity,
yes,,
but
look
there,
on
the
one
hand,.
We
have
a
description,
that
is,
a
declaration,
on
the
other
hand,
when
we
made
metal
through
a
colon
and
for
because,
as
you
saw,,
the
double
colon
of
the
area
speaks
of
a
specific
call,
well,
or
a
specific
appeal
about
now.
The
answers
are
visible.
A
B
A
A
A
A
I
actually
would
probably
consider
boxes
more
in
the
context
of
lifetime
but
lifetime,
and
we
we
do
n’t.
Consider
we
don’t
consider
it,,
unfortunately,
for
a
very
simple
reason
that
we
already
get
a
fairly
large
one
here
includes
smart
contracts
and
polka
dot,
and
them
a
lifetime
of
it
is
very
extensive,,
rich
in
all
sorts
of
pitfalls.