►
Description
We're taking some of our code in our wasmCloud shell (wash) CLI and putting it in a Rust library, aka a crate. Come learn about Rust, some basics about creating idiomatic APIs, and hang out with some wasmCloud maintainers!
https://wasmcloud.com
A
Work
and
one
of
these
things
is
this
config
command.
What
we,
what
we
have
in
here
is
the
config
directory,
and
this
config
directory
has
a
whole
bunch
of
things
that
it
it
sets
up.
For
us,
it's
checking
if
a
specific
wash
directory
exists
gets
the
the
configuration
directory
inside
of
the
wash
directory
and
the
reason
I
chose
to
go
with
this
is
I
started.
Looking
at
some
of
these
commands,
that
might
be
fun
to
like
move
over
and
one
of
them
was
drain
and
inside
of
drain.
A
We
have
these
things
where
we've
like
pulled
in
like
a
configure,
and
then
we
have
some
other
things
down
here
that
look
like
oh
look,
model,
caster
and
downloads.
A
Are
all
these
things
sound
like
pieces
of
information
that
you
would
want
to
use
so
the
way
the
first
thing
I
do
when
I'm
creating
any
sort
of
rest,
API,
and
especially
when
I'm
refactoring
from
an
existing
thing
like
this
is
I,
say:
what's
the
type
of
information
that
people
are
going
to
want
to
see
what
is
what's
the
thing
they're
going
to
want
to
consume
for
their
Library,
because
most
libraries
are
used
to
be
extension
points
for
something
else.
A
Almost
everything
I've
ever
used
has
been
used
that
way
and
anything
that
I've
had
people
use
in
mind
is
also
used.
That
way,
so
I
want
to
think
of
information
that
I
can
basically
export
for
users
to
have
available.
Whoever
consumes
this
eventual
crate,
and
so
my
first
thought
was
well.
We
need
to
create
a
config,
a
config
module.
This
config
module
have
all
these
kind
of
constants
and
directories
and
those
kind
of
things,
and
so
I
created
config.rs
and
I
copied
over
what
we
had
now.
A
The
first
thing
I
did
was
I
started,
looking
around
and
and
I'll.
Let
you
know
I'll
do
this.
I
didn't
do
too
much.
So
I'm
just
going
to
copy
paste
it
from
here
again
just
so,
people
can
see
what
logic
I'm
following
here
so
inside
of
this
config.rs.
The
first
thing
you
do
is
you
create
a
config.rs
and
then
inside
of
your
lib
file,
you
have
to
say
that
there
is
a
module
there.
So
this
is
for
those
who
aren't
familiar
to
ref.
A
Just
so
you
know,
like
you
have
to
say,
I
have
a
module.
It's
called
config
and
rest
will
look
for
a
folder.
That's
called
config
with
a
file
called
mod.rs
inside
of
it,
and
you
can
see
that
right
here
on
my
left,
sidebar
with
the
start
thing,
there's
a
start
mod.rs
or
it
will
look
for
a
single
file
named
config.rs
in
this
case,
so
I'm
going
to
start
with
just
a
top
level
file.
A
I
could
be
wanting
to
do
this
in
more
files
later,
but
we're
just
going
to
start
easy
and
then
expand
as
we
need
to.
A
So
what
I've
done
is
created
this
and
the
first
thing
I
look
through
is
I,
say:
okay,
we're
using
this
anyhow
result.
Type
anyhow
result
is
kind
of
like
a
catch-all
error.
That's
a
lot
easier
to
use
than
the
like
error
trait.
It
still
implements
the
error
trait
and
rest,
which
is
the
the
thing
pretty
much.
Any
type
of
error
should
be
implementing,
but
it
kind
of
is
a
free
form
error.
A
You
can,
you
can
add
a
lot
of
like
call
Stacks
and
other
things
to
it,
but
it
doesn't
necessarily
provide
a
lot
of
context
without
looking
at
the
message,
and
so
this
is
great
for
things
that
are
going
to
be
consumed
from
like
a
CLI
format
or
things
that
might
have
multiple
types
of
error
cases
that
you
can't
capture
all
of
them
into
a
single
thing.
A
So
here,
though,
if
I'm
looking
at
this,
this
error-
we're
using
this-
I
o
error
kind,
and
so
the
first
thing
I'm
going
to
say,
is
well
what
looks
like
this
is
going
to
be
returned
as
an
I
o
error,
and
this
is
going
to
be
standard.
Fs
Creator
all
also
returns
an
I
o
result,
which
is
I
o
result.
A
It's
just
a
result
with
a
response
and
an
I
o
error,
and
so
my
thinking
is
as
a
user.
If
I'm
consuming
this-
and
this
is
creating
things
on
a
file
system-
I
want
to
know
that
it's
it's
a
file
set
like
it's
a
file
system
related
thing.
It's
I
o
related
and
so
I'm
going
to
swap
that
and
say
you
know,
we
actually
don't
need
the
anyhow
result,
we're
just
going
to
use
the
standard,
stuff
and
I'm
going
to
change
this.
A
To
result,
half
buff
and
actually
I
can
do
IO
do
result
and
then
add
IO,
result
and
I'm
going
to
say
I
o
result
and
return
a
path
buff,
and
so
that
way
everything
now
just
returns
an
I
o
here.
B
So
Taylor
You've
said
a
few
things
about
like
any
how
results
and
and
like
standard
results
or
standard
errors.
So
I
guess
I
have
two
questions.
One
is,
is
anyhow
not
a
part
of
the
standard
library
and
rest,
and
and
why
would
you
you
know
if
there's
kind
of
we
already
had
this
anyhow
error?
A
Yeah,
so
anyhow,
error
is
something
we're
going
to
continue
to
use
throughout
this
this
crate,
but
in
this
case
everything
that
we
have
so
far
is
I
o
results.
Driven
and
I
also
know
just
from
this
is
just
for
me.
Having
done
a
lot
of
rest,
I
know
that
the
other
things
that
we're
doing
where
we're
fetching
directory
stuff
is
also
going
to
be.
A
I
o
errors
if
they
don't
exist,
and
so
what
I'm
going
to
do
is
just
start
with
that,
because
it
is
the
most
logical
error,
so
someone
who
uses
this
can
now
handle
it
very
specifically
based
on
the
kind
of
error
that
happens,
they
can
tell
a
user
who
consumes
this.
Oh
sorry,
like
I,
tried
to
create
this
directory,
but
I
don't
have
permissions
rather
than
just
wrapping
there
and
you
can
have
it
can
respond
to
it
in
code.
A
B
A
So
right
here,
I'm
gonna
do
something
else.
So
you're
gonna
see
also
some
of
my
programming
idiosyncrasies
I
hate
wrapping
on
80.
I
prefer
rapping
on
100,
at
least
because
you
know
we
aren't
stuck
to
89
80
column
terminals
anymore,
so
I
always
wrap
those
to
there.
A
It
just
seems
to
be
one
that
I've
standardized
with
other
people.
I've
talked
to
about
it.
It's
not
actually
a
standard.
So
this
in
rest,
if
you're
not
familiar
a
triple
a
triple
slash,
is
a
documentation
comment.
This
gets
turned
into
the
documentation
you
see
in
create
documentation
online.
This
is
auto-generated
and
created
for
you.
The
other
thing
I'm
going
to
do
is
I'm
just
going
to
start
off
by
adding
a
little
bit
of
what
we
call
module,
documentation
and
module.
A
Documentation
is
a
slash
bang
and
when
you
do
that,
it's
saying
this
is
the
documentation
that
goes
to
the
very
top
and
describes
what
this
module
does
so
I'm
going
to
basically
give
it
a
quick
description
here
of
what
this
module
does.
A
Okay,
so
that's
good
enough
for
now.
I'll
probably
update
this
with
even
more
with
even
more
information
down
the
line,
but
I
just
wanted
to
start
with
with
that.
So
this
was
just
the
first
thing
to
copy
it
over
now,
because
I
want
to
work
on
this
drain
command
next
I'm
going
to
start
pulling
over
pulling
over
some
of
the
stuff
that's
in
there.
A
Now
there
is
a
there's,
a
question
here
that
popped
up
in
chat
and
I
wanted
to
address
that
one
real
quick
before
we
do
it
and
it's
right
on
your
screen.
So
we
have
this
idea
if
a
strict
uses,
lots
of
option
types
or
even
nested,
strikes
like
when
you
build
a
library,
what's
the
best
way
to
deal
with
these
option
types
of
nesting
other
strikes,
so
it
really
depends
on
what
what
you're
doing
with
it.
A
So
there's
some
that
you
they
have
to
do
it
by
nature
and
you
just
end
up
with
this
really
long
stream
of
handling
options.
One
of
these
is,
for
example,
the
crates
that
deal
with
kubernetes
inside
of
rust,
I,
actually
really
like
kubernetes
code
and
rust.
It's
a
lot
cleaner,
but
the
problem
is
because
everything's
optional
everything
is
wrapped
in
one
of
these
options,
so
you
have
to
do
like
unwrapping
of
all
those
those
options
down
the
line.
A
So
the
best
way
to
deal
with
it
is
to
try
to
abstract
it
away
from
the
user.
This
is
what
I
found
so
I
don't
know.
If
we
have
an
example
right
here.
Let
me
go
back
to
the
config,
because
I
know
we
had
a
few
things.
So
we
have
this.
A
There's
a
lot
of
code
in
here,
so
it
might
take
a
second
for
me
to
find
it
for
you,
but
yeah
we'll
see
if
we
can
get
to
it,
but
basically
what
I
do
is
I
try
to
wrap
things
in
with
helper
functions
that
can
unwrap
you
to
the
specific
thing.
So
we
did
this
actually
I
do
have
an
example:
I
can
pull
up
from
presslet,
so
let
me
go
ahead
and
creslit
is
another
project
that
I
did
a
long
time
ago.
A
At
this
point,
I
started
a
long
time
ago
with
some
of
my
other
co-workers
around
running
wasm
inside
of
kubernetes
and
so
they're,
we've
kind
of
like
moved
on
since
then,
but
I
will
go
ahead
and
find
the
code
and
then
zoom
in
so
everybody
can
see
it.
But
one
of
the
things
that
we
have
inside
of
here
is
the
kubelet
and
inside
of
kublet.
We
have
I
believe
it
is
the
pod
mod
as
we
like
to
call
it.
A
So
what
we've
done
in
here
is
we
have
the
coupon
and
coupon
is
the
actual
like
pod
object,
and
it's
a
little
bit
it's
a
little
bit
gnarly,
because
there's
so
many
different
like
sums
and
things
you
have
to
get
through
to
actually
get
the
data
that
you
want.
So
what
we
did
is
we
created
a
wrapper
around
it
for
creating
this
data,
so
this
is
just
only
if
you're
consuming
data
that
you
do
not
have
control
over.
A
If
you
have
control
over,
you
can
probably
find
ways
to
eliminate
the
need
for
options,
but
here
we
do
a
bunch
of
things
where
we
like
go
down
and
we
de-ref
it
and
try
to
get
it
out
or
we
come
we're
able
to
then
go
down
and
unwrap
down
the
line,
and
it
just
returned
this
little
helper
thing
right
here.
A
This
question
mark
is
called
the
try
operator
and
when
you
use
a
try
operator
on
an
option
as
long
as
you're
returning
an
option,
if
it
if
it
gets
to
it,
and
it
finds
that
there's
a
none,
it'll
return
a
none,
and
so
we
tried
to
like
basically
abstract
over
this
as
quickly
as
possible.
So
anyway,
that's
just
an
example,
but
we'll
go
ahead
and
go
back
to
the
code
here
and
kind
of
show
like
what
we're
doing
next.
So
that
was
a
great
question.
A
So,
first
off
there's
a
couple
things
of
data
here
that
we're
looking
at
one
of
them
is
like:
where
are
we
caching,
our
models,
I'm
guessing
and
I
I
haven't
looked
yet
is
that
we
also
do
some
validation
of
models
inside
of
we,
we
do
some
model
validation
inside
of
wash
and
so
I'm
going
to
go
ahead
and
check
that
and
it
is
wash
inside
of
Smithy
I'm
assuming
there's,
probably
something
in
here.
A
That's
similar
I'm
not
going
to
go,
try
to
find
all
of
it
right
now,
because
I'm
not
refactoring
it,
but
basically
I'm,
assuming
this
code
is
likely
to
be
used
in
more
than
one
place
when
somebody
uses
this
as
a
as
a
library,
so
I'm
going
to
take
these
two
things
right
here
and
I'm
going
to
go
ahead
and
put
them
inside
of
the
config
module
I
just
created
up
here.
A
So
first
thing:
I'm
going
to
need
to
do
is
do
a
pub
on
these,
because
I
want
them
to
be
exported
for
people
to
use
and
then
right
now,
I'm
not
exporting
the
Worcester
constant,
because
I
figure
that
this
is
one
where
we
want
people
accessing
it
as
an
actual
path
that
we
get
back,
which
is
the
whole
configure
thing.
So
the
configure
actually
creates
it
with
like
washter
and
then
does
the
actual
path
for
you,
so
we're
trying.
What
we're
trying
to
do
is
it
is
give
people
the
right
tools
to
have
here.
A
So
we
could
give
people
raw
strings,
but
if
I'm,
making
someone
manually
put
stuff
together
that
they
might
use
that,
then,
for
me,
that's
an
indication
that
this
is
probably
the
right
way
to
do
it
so
for
me,
I
expose
it
as
things
they
can
use,
which
is,
in
this
case
getting
a
config
directory,
getting
cache
directories
and
getting
the
download
directory
and
you'll
notice
that
this
thing
also
calls
the
configure
now.
What
we're
going
to
have
to
do
now
is.
A
A
So
that's
not
going
to
fly
here.
So
what
we're
going
to
to
do
is
also
make
this
an
I
o
result.
A
With
a
path
buff,
so
what
what
we're
able
to
do
now
is
actually
do
an
unwrap
or
an
error,
but
like
right
here
we're
just
matching
the
the
configure
and
we're
doing
a
join
with
it.
A
So
what
we
can
do
is
replace
the
entire
match
block
with
something
that's
really
cool
in
rest,
which
is
the
idea
of
mapping
of
results,
and
so
what
we
will
instead
do
is
configure
dot
and
then
we're
going
to
go
ahead
and
unwrap
that,
so
that
will
return
an
error
as
the
right
type
if
it
is
an
error
and
then
other
otherwise,
it'll
continue
on
actually
I'm
going
to
do
this
a
little
bit
different
I'm
not
going
to
do
that,
I'm
going
to
say
map
and
inside
of
here.
A
So
a
map
takes
the
if
the
result
was
okay.
Instead
of
an
error,
it's
going
to
return.
It's
going
to
put
that
type
in
here
and
I'm
going
to
be
able
to
map
it.
So
I'm
going
to
take
that
path,
and
you
can
see
the
the
autocomplete's
telling
me
that's
a
path.
Buff
I
got
and
I'm
going
to
do
p,
dot,
join
and
do
download,
stir.
A
And
so
then,
this
joins
with
the
with
that
thing.
So
basically
I'm
going
to
get
a
new
directory
out.
That's
still
a
path
buff,
but
it's
going
to
have
this
new
downloader
created
and
then
I
can
just
return
it
because
right
now
this
is
a
an.
I
o
result
with
a
path
buff
on
the
inside,
so
foreign,
so
I
just
now
turn
that
into
a
one-liner.
So
if
you're
not
familiar
with
rust,
this
mapping
functionality
is
very
useful.
A
It
takes
from
the
ideas
of
functional
programming,
languages
and
like,
and
it
puts
together
this
kind
of
pipeline
things
that
you
can
do
with
the
data
and
in
this
case
we're
we're
actually
doing
that
here.
A
So
that
was
that
was
that
one
we
solved
it
here
now
we
have
to
do
the
same
thing
up
here
with
the
model
cache
directory.
So
welcome
is
something
that
was
pulled
in
there,
but
I
don't
think
we
have
inside
of
our
thing
so
right
here.
This
is
the
cargo.com
for
the
whole
thing,
and
we
have
a
weld
code,
gen
right
here
and
I'm
not
going
to
worry
about
update.
A
This
is
telling
me
it's
not
up
to
date
right
now,
but
we
can
do
that
later
and
so
over
here,
I'm
going
to
look
and
I
can
see.
I
don't
have
weld
code,
yet
so
I'm
going
to
come
over
here
and
add
weld
code,
gen
and
save
it,
and
then
cargo
is
going
to
pull
down
the
the
things
I
need
and
then
over
here.
As
soon
as
it
finishes
running
it's
going
to
be
able
to
tell
me
and
generate
what
the
the
result
type
is
for
weld
caster.
A
While
that's
compiling
we'll
go
ahead
and
come
up
here
and
say:
okay,
this
looks
right,
so
we
have
a
pub
we've
exported
we're
not
exporting
wash
directory.
This
is
ready
to
go
now.
We
can
go
ahead.
Okay,
so
I
just
double
checked.
The
Matrix
did
everything
right
there.
A
I'm
going
to
check
one
more
place.
Actually,
while
this
is
going
on,
I
think
there
was
a.
A
So
there's
stuff
here
in
util
that
looks
like
it
could
come
over
here
now.
The
reason
I
always
look
in
util
function,
util
things
because
they
always
become
kitchen
sinks,
no
matter
how
hard
we
try
and
over
here
we
have
this
idea
of
a
okay
I
have
a
bunch
of
default
ports
and
things
and
timeouts
that
I
need.
A
A
A
A
Oh
actually,
I'm,
sorry,
wait.
We
don't
even
have
to
map
the
first
one
because
it's
already
a
path
buff.
So
if
we
get
a
path
buff,
that's
all
we
need
so
I'm
going
to
do
math
error
and,
in
this
case,
I'm
doing
the
same
thing
that
I
was
doing
before,
but
I'm
mapping
the
error
that
came
through
and
in
this
case
it's
it.
The
error
for
a
weld
for
weld
for
basically
wasn't
bus,
RPC,
so
I'm
actually
going
to
go
back
to
that.
A
And
oh
here
we
are
so
here's
the
error
and
here's
the
different
error
types
I'm
looking
through
so
I
can
like
check
like
what
this
might
be.
This
is
where
I
think
we
could
improve
our
our
life.
This
is
a
library
that
we,
this
is
a
library
that
we
maintain
and
I
should
probably
fix
this.
A
So
it's
a
little
bit
more
clear
about
like
what
this
thing
can
return,
but
it
looks
like
we
get
an
error
other
here
rather
than
like
doing
something
so
we're
going
to
go
ahead
and
say:
okay,
this
is
just
another
error
that
we're
gonna
get
so
in
this
case,
because
it's
likely
some
sort
of
underlying
directory
error,
which
we
were
not
clear
about
in
the
in
our
own
error.
A
I'm
going
to
say,
let's
map
this
as
an
I
o
error,
I'm
not
going
to
do
something
else,
I'm
going
to
do
the
same
thing
it's
going
to
be.
I
o
result
path,
buff,
because
I
don't
want.
This
is
actually
another
design
consideration
right
here.
I
do
not
want
people
to
have
to
know
about
the
underlying.
Like
was
a
bus
RPC
like
some
of
the
code
and
like
people
don't
I'm
trying
not
to
expose
too
many
types
to
a
user,
and
so
here
I
am
making
the
conscious
decision
to
say.
A
I
am
going
to
take
this
and
I'm
going
to
turn
it
into
a
turn
it
into
a
type
that
the
user
is
already
expecting
from
the
rest
of
these
functions.
I.
Don't
really
want
to
mix
error
types,
so
I'm
going
to
do
the
same
thing
like
I
did
here,
I'm
going
to
say
air
new,
and
this
is
just
going
to
be
air
kind
other
because
we're
not
exactly
sure
what
it
is
given.
The
library
we're
consuming
and
then
I'm
going
to
pass
through
the
error
message
here.
A
Oh
actually,
I
can
do
this
simpler,
I'm,
going
to
say
e
dot,
2.2
strings,
so
all
errors,
Implement
to
string
and
so
you're
able
to
then
like
format
them.
Just
like
you
would
a
string
now
sometimes
there's
some
intricacies
around
there,
so
that
just
did
it
all.
I
just
mapped
the
error,
and
now
I
can
come
back
here
and
delete
all
this
and
go
ahead
and
save
the
cargo
formatter
will
run.
A
For
me,
oh-
and
this
says,
hey
I
can't
find
downloadster,
so
the
I
know
exactly
what
happened
here,
because
I
copied
it
from
the
drain
command
and
we
have
a
downloads
dir
that
we
imported.
So
we
we
imported
this
from
up.
So
this
is
actually
inside
of
this
code
right
here
and
we
have
that
actually
I
can
find
this
simpler.
I'm,
smart
I
can
use
my
editor
okay,
so
right
here
we
have
this
config.rs
inside
of
it.
A
So
a
lot
of
this
stuff
right
here
could
probably
go
inside
of
inside
somewhere
else,
but
I'll
have
to
look
because
some
of
this
was
specifically
made
because
it's
either
specific
to
the
wash
code
and
not
to
everybody
else.
But
this,
however,
is
a
pub
const
that
seems
like
it
should
belong
in
our
config,
so
I'm
going
to
go
ahead
and
pull
it
up
to
here
and
do
my
downloads
directory
so
now
I
can
save
it,
and
I
should
have
no
more
errors.
After
that.
A
B
Yeah
yeah
I
will
start
with
that.
I
actually
have
a
question,
but
we
can
do
that
on
the
way
back.
So
it
came
from
someone
paying
me
in
the
wasmcloud
community
slack.
They
don't
have
a
Twitch
account,
but
they
were
wondering
what
factors
should
someone
consider
when
you're,
trying
or
when
you're
deciding
to
create
functions
as
methods
in
an
impul
block
or
kind
of
just
what
you're
doing
now,
which
is
just
plain
plain
old
functions
like
how
do
you
kind
of
decide
between
those.
A
Yeah,
so
that's
a
really
really
good
question
actually
and
the
way
I
approach.
This
is
more
of
a
question
of
am
I
getting
a
single
piece
of
data,
or
is
this
data
related
to
something
else?
A
And
so
for
me,
all
of
these
functions
are
a
single
piece
of
data
I'm,
looking
for
a
specific
cache
directory,
I'm
looking
for
a
specific
downloads
directory
I'm
looking
for
any
of
those
kind
of
things,
and
so
that's
what
I
I
go
for
with
this
first
stuff,
but
when
we
look
and
I
think
we
have
some
of
this
inside
of
a
start,
those
actually
might
be
mostly
top
level
functions.
A
Here's
a
good
example,
so
this
is
some
of
the
parser
stuff
for
the
watsoncloud.tomel,
that's
used
in
washbuild,
and
this
is
something
where
you
have
a
common
set
of
data
that
could
be
reused
multiple
times,
and
so
the
reason
why
that
makes
it
really
good
for
a
struct
is
you're
able
to
do
like
you're
putting
all
that
data
together.
A
So
right
here
we
say:
oh,
we
have
like
config
for
rest
or
we
have
config
for
tiny
go
and
we
have
configure
the
different
things
and
here's
the
project
config
and
then
all
this
data
I
think
this
one
is
mostly
raw
data,
but
if
I
then
need
I'm
able
to
use
like
an
impul
on
it
now
to
answer
that
question
once
again,
I
can
go
to
code
that
I've
written
before,
because,
like
I
said
this
is
very
new
you're.
Getting
like
we're
just
starting
to
do
this
refactor
to
make
this
as
real
as
possible.
A
But
this
is
from
another
project.
I
had
called
bindle
and
vindal's
a
really
interesting
project
that
you're
interested
in
looking
at
it
later,
but
one
of
the
things
that
we
do
in
here.
A
Let's
look:
this
is
actually
a
really
interesting
one
because
of
the
the
signature
code.
So
right
here
we
have
something
called
like
a
signature
and
underneath
or
sorry
signature
role.
This
is
the
better
one.
A
You
don't
have
to
know
about
it
to
understand
this,
but,
like
example,
we're
able
to
then
Implement
traits
on
that
type,
and
so
that
allows
us
to
like
print
them
in
certain
ways
or
to
format
or
to
like
parse
them
certain
ways,
but
then
we're
able
to
do
these
things
down
down
the
line
where
we
have
passing
in
specific
types
so
like
right
here,
I'm
doing
an
implementation
on
a
type
that
allows
me
to
do
method
that
accesses
that
data.
A
We
also
get
this
inside
of
oh
yeah,
right
here,
key
rings
and
other
men.
So
this
idea
of
a
key
ring
is,
is
pretty
straightforward.
Right,
like
you
need
a
specific
set
of
keys
that
you
trust
and
you're
able
to
create
a
new
one,
and
there
is
common
data.
That's
stored
inside
of
this,
that
you
can
access
publicly.
So
this
is
configuration
data
like
plane,
but
it
also
gives
us
some
methods
that
allows
us
to
consume
or
reuse
that
data,
so
we're
able
to
like
do
a
contains.
A
Does
this
thing
contain
my
public
key
and
it
does
all
the
things
around
it
and
inside
of
like
the
key
entry
itself,
I'm
able
to
say
I
can
sign
something
with
it
or
I
can
verify
something
with
it,
so
you're
able
to
do
something
with
the
function
that's
outside
of
it.
Now
you
compare
that
to
our
code
that
we're
doing
like
the
start
code,
there's
nothing
that
we're
really
doing.
A
That's
special
we're
just
saying,
like
start
an
app
server
or
start
a
wasm
cloud
process
right
here,
like
we
just
say,
insure,
wasn't
loud
like
we're
just
starting
a
process.
There's
no
extra
data.
That's
returned
to
this!
So
that's
a
really
good
question,
but
yeah
it's
you
kind
of
have
to
feel
it
out
and
I'm
hoping
we
might
get
to
that
as
we
pull
over
some
of
the
drain
stuff.
A
But
some
of
these
things
are
just
better
as
functions,
because
you're
you're
doing
one
task
if
you're
doing
it
with
like
an
actual
struct
and
an
impul.
That
means
you
have
some
sort
of
data
that
gets
carried
along
with
the
task
or
that
you
need
to
reuse
multiple
times.
B
And
then
one
kind
of
quick
follow-up
onto
that
I
I
know
that
you're
making
constants
and
functions
like
public
like
public
to
external
users.
Can
you
make
an
impul
Pub.
A
Yeah,
so
an
impul
itself
is
not
public,
but
the
functions
inside
of
an
impul
are
public.
So
if
we
go
back
here,
you'll
see
that
these
all
have
Pub
labels
in
front
of
their
in
front
their
functions.
Now
you
can
have
a
couple
levels
of
visibility
here
you
can
have
Hub,
which
is
obviously
completely
accessible.
You
have
Pub
crate,
which
means
it's
accessible
to
anything
inside
of
this
crate,
and
then
you
have
I
think
right.
A
This
one
I
can
actually
have
no,
it
doesn't,
but
sometimes
they
just
have
a
plane
like
without
any
Pub.
It
just
says:
FN
like
public
or
whatever,
and
those
are
entirely
private
implementations
for
the
function
and
even
the
even
the
crate
itself.
Unless
it's
inside
of
the
same
module,
it
can't
call
that
private
function,
so
things
in
the
rest
of
the
crate
would
not
be
able
to
call
a
private
function
along
those
things.
So
that's
that's
a
great
question
as
well.
Neat,
okay,
so
we'll
go
ahead
and
we're
gonna
pull
up
drain.
A
So
drain
is
the
next
thing
we're
gonna
do
so.
I
picked
this
one,
because
I
figured
it'd
be
fairly
simple,
to
go
ahead
and
and
do
some
of
this
stuff.
This
is
a
command
we
use
when
we're
just
like
cleaning
up
caches
and
things
locally.
A
This
is
used
definitely
by
developers
and
also
by
by
people
who
who
who
are
just
trying
to
like
clear
out
some
stuff
or
debug,
that's
kind
of
the
common
use
cases
and
we're
able
to
drain
a
couple
different
things
now.
Luckily,
this
code
is
actually
fairly
well
designed,
so
we're
going
to
be
able
to
pull
it
pretty
much
straight
over.
A
But
what
we'll
do
is
I'll
say
copy
this
right
here,
so
we
have
this.
Oh
sorry,
this
is
a
sub
command,
so
we're
not
so
we're
going
to
have
to
change
this
out
a
little
bit,
because
this
is
attaching
some
CLI
stuff
to
it.
So
this
sub
command
thing
is
actually
from
clap,
which
is
a
CLI
Library.
A
So
we're
going
to
go
ahead
and
copy
this
we're
going
to
have
to
modify
it
a
bit
and
then
we
already
copied
these
downloaders
function,
and
then
we
have
this
impul
that
we've
talked
about,
and
this
has
a
function
that
allows
us
to
drain
something
so
we're
going
to
go
ahead
and
take
this
copy
it
and
we're
going
to
create
a
new
file.
So
now,
you're
going
to
see
me
do
this,
like
I,
was
describing
at
the
beginning
so
I'm
going
to
create
a
new
file
inside
of
source
called
drain
dot.
A
Rs
I'm
I'm,
pretty
certain
I'm
only
going
to
need
one
file
for
this
and
then
I'm
going
to
come
here
and
say:
Hub
mod
drain
and
save
it.
And
so
then
it
knows
that
it's
a
a
module
and
the
pub
monitoring
means
I'm,
exposing
the
the
module
publicly
when
this
crate
is
out
there
and
then
I'm
going
to
copy
paste.
This
and
I
know
I'm
going
to
need
to
do
a
couple
things.
So
first
thing,
I
know:
sub
command
doesn't
exist,
I'm,
going
to
delete
that
now.
This
derived
thing
is
called
a
macro.
A
And
then
this
we're
going
to
want
to
say
you
know
what
this
is
Hub
in
green
selection,
so
we're
going
to
offer
a
bunch
of
different
a
bunch
of
different
ways
for
people
to
do
their
they're
draining
here
now
we
can
structure
this
a
couple
different
ways,
but
I
think
I'm
actually
going
to
keep
this
as
a
an
enum
and
an
impul
right
now,
so
I
actually
don't
think
we're
going
to
need
this
into
iterator.
For
what
we're
doing
we're
going
to
just
have
people
be
able
to
call?
A
Oh
sorry,
no,
we
do
need
this
intuiter.
So
this
right
here
is
some
code
that
was
already
written.
I
was
able
to
copy
paste.
Now
an
iterator
is
exactly
as
it
sounds
allows
you
to
have
something
that
you
can
go
through
in
a
list
and
what
it's
doing
is
it's
just
kind
of
wrapping
the
details
behind
what
this
turns
into
into
its
own
set
of
directories
that
it
needs
to
drain.
A
So
all
is
going
to
take
all
of
the
directories
and
put
them
together
and
then
lib
is
just
only
going
to
do
like
the
lib
directory
like
where
we're
storing
the
cache
or
like
we're,
restoring
the
oci
cache
or
the
Smithy
models
or
all
those
different
kinds
of
things.
A
And
so
then
we
take
that
and
we
just
take
those
paths
and
turn
them
into
an
iterator.
So
it's
pretty
it's
pretty
straightforward.
How
this
all
works,
but
we're
going
to
keep
this
code
exactly
as
it
as
it
stands.
A
So
one
thing
I
am
going
to
change
here
and
we're
going
to
go
a
little
bit
into.
This
is
right
here:
we're
we're
borrowing
a
drain
selection.
A
We
don't
actually
need
to
to
borrow
this
anymore,
because
people
will
probably
be
calling
this
to
look
like
this
they'll
say
like
drain
selection
or
I'll.
Probably
just
call
this
drain
now.
A
So
they'll
probably
call
drain
all
and
do
the
the
drain
function
on
it.
I
think
is
what
that
would
look
like
the
other
way.
We
could
also
write
this
API
is,
we
could
say
we
could
just
have
this
module,
have
a
function
called
drain
and
it
takes
a
a
drain
type
or
something
like
that,
and
then
this
would
be
drain
like
it
could
be
drain
type.
A
All
or
something
like
that,
so
there's
two
different
ways:
we
can.
We
can
do
this
so
I'm
going
to
go
ahead
and
just
stick
with
the
enum
for
now
and
I'm
going
to
see
how
I
feel
at
the
end
and
I
might
switch
it
to
this
type
instead,
but
we're
just
going
to
play
with
it
and
see
so.
This
is
where
I
just
kind
of
play
and
see
what
it
looks
like
as
we
as
we
use
it.
So
we'll
keep
this
as
a
drain.
A
A
A
There's
another
library
that
we
have
called
durs,
actually
I'm
going
to
import
it,
and
that
has
a
more
like
standard
interface
of
like
being
able
to
get
like
the
temp
directory,
because
sometimes
when
you
use
like
your
normal
standard,
amp
temp
directory,
there's
a
bunch
of
gotchas.
So
if
we
do
standard
actually,
I
can
shoot
this.
A
So
right
here
this
returns
a
path
of
a
temporary
directory,
there's
platform
specific
behavior
here,
there's
there's
just
a
whole
bunch
of
things.
So
the
idea
is
somebody
created
another
crate.
That's
called
dirs
that
we
use
to
access
this
so
I'm
actually
going
to
change
it.
This
to
durs.
A
Oh
no
I
was
wrong,
see
you're,
getting
me
remembering
how
to
code
some
of
these
things
live.
So
no
we
still
we're
going
to
use
that
instead.
So
that
is
correct
and
then
down
here
we
have
this
drain
function,
so
this
drain
has
a
result
and
when
we
look
at
drain,
what
kind
of
result
was
it
it
was
in
any
hat
result.
A
So
I
think
that,
for
what
we're
doing
here,
we're
probably
going
to
want
an
I
o
error,
because
pretty
much
everything
we're
doing
is
cleaning
out
cleaning
out
directories
and
things.
So
that's
I'm,
pretty
sure.
That's
going
to
be
all
I
o
errors,
so
I
forgot,
there's
one
more
function,
I
need
to
copy
and
it's
removed.
Contents.
A
Okay,
so
drain
is
going
to
take
self
and
I'm
actually
going
to
say
we're
going
to
consume
it.
So
this
is
once
again
an
ownership
thing
for
most
apis.
The
way
I
think
of
it
is
if
this
is
the
last
time
you're
going
to
use
that
thing,
then
you
should
consume
it.
That
means
you
take
ownership
of
it.
You
don't
have
to
borrow
any
of
the
data
and
that's
what
I'm
going
to
do
here
so
for
drain
I'm
going
to
consume,
consume
cells.
So
that
means
I
can
do
this.
A
This
API
that
I
showed
up
here
in
the
comments
foreign
and
my
result
is
going
to
need
to
be
an
I
o
result,
and
so
I'll
go
ahead
and
import
now
generally
standard
practice.
Is
you
put
standard
Imports
on
top,
then
you
put
a
external
crate
Imports,
then
you
put
crate
Imports
at
the
bottom.
So
right
here,
we're
going
to
say,
use
standard.
A
Standard
path
I
mean
we
need
a
couple
of
things,
actions
we're
using
that
below
and
then
we
need
a.
I
o
results.
So
we'll
do
IO
result
and
we'll
stick
with
that
for
now
and
so
down
here,
we'll
say:
Okay
cleared
so
we're
gonna
go
self
intuiter.
So
that'll
get
us
all
the
paths
that
we
need
from
the
path
buff
it's
going
to
filter
and
check
that
the
path
exists
on
the
directory
and
then
so.
A
This
is
another
one
of
those
like
functional
programming,
things
that
rust
has
has
borrowed
from
so
it
filters
the
data
and
then
it
goes
ahead
and
says
I'm
going
to
map
each
of
those
into
remove
the
directory
contents
there,
which
does
the
actual,
removing
and
it's
going
to
say,
FS
reader
FS
path,
and
so
it's
going
to
check
that
that
first,
it's
able
to
read
the
directory
and
then
it's
going
to
return
a
result.
But
in
this
case
it's
doing
anyhow
results.
But
so
right
here,
oops
I
took
standard
FS.
A
So
this
reader
gives
us
a
reader
thing
that
we
can
iterate
through,
and
so
it's
a
result
so
we're
going
to
return
an
I
o
result
here
and
then
we
get
the
the
actual
entry,
which
is
we
iterate
over
each
entry
in
the
directory.
And
then,
if
it's
a
directory,
we
remove
the
whole
directory
and
if
it's
a
file,
we
remove
the
file.
A
We
don't
need
to
know
like
which
paths
we
we
removed
necessarily
so
I'm,
going
to
just
call
this
a
unit
type
which
is
just
an
empty
type,
and
then
this
will
return.
Okay,
once
it
gets
to
the
end.
A
And
so
up
here
when
we
actually
call
it
that
should
remove
it,
we'll
get
the
result,
we're
able
to
return-
and
here
we're
going
to
say
this
is
also
a
result
of
this
now,
let's
think
now.
This
is
where
we
have
to
make
an
API
decision,
so
we
can
either
say
all
of
this
was
drained
or
we
can
say
this
is
the
thing
that
we
drained
out.
A
So
we
can
return
a
list
of
everything
we
drained:
I
I'm,
guessing
that
that's
probably
not
necessary
now,
but
that's
something
we
could
add
in
the
future.
So
what
we
have
no
so
now.
This
is
where
this
so
you're
getting
me
live
streaming.
My
thoughts
too.
So
now
that
I'm
thinking
about
it,
the
first
consumer
of
this,
is
going
to
be
the
wash
CLI.
A
The
wash
CLI
expects
a
list
of
things
that
were
drained
to
be
returned
back
so
I'm
going
to
change
my
mind
and
I'm
going
to
say
we're
going
to
return
a
string
still
and
we're
going
to
then
take
that
string
and
turn
it
into
effect.
So
I
think
we're
going
to
keep
that,
but
we're
going
to
change
what
the
return
type
is
up
here.
B
So
Taylor
just
to
kind
of
clarify
the
thought
process
that
you
were
kind
of
going
through
there
you're
thinking
now
of
not
just
like
what
this
method
should
print
out
but
like
what
useful
information
needs
to
come
out
of
it,
so
that
it's
like
a
consumer
of
this
could
act
on
it.
Starting
with
like
the
watch,
CLI
yeah.
A
That's
exactly
what
it
is
so
I
have
to
think
about
it
in
terms
of
consumers
when
I'm
writing
apis
yeah
I
mean
it
kind
of
sounds
like
stupid
to
say
it
that
way,
but
I'm,
just
saying
like
you
have
to
put
yourself
in
the
user's
shoes
and
it's
very
critical
when
you're
writing
any
library
in
any
language,
but
also
like
inside
of
rest,
to
make
this
nice
and
easy
to
use.
A
Another
thing
here
about
API
design
that
I
just
kind
of
lost
over
is
rest
has
something
called
The
Trait
system
and
traits
are
a
really
really
cool
thing
that
is
kind
of
like
declaring
like
a
class
in
another
language,
but
it's
more
inherent.
It's
not
inheritance
space,
but
it's
composition
instead,
and
so
one
of
the
coolest
types
of
traits
are
these
conversion
traits
that
are
inside
of
rest
and
one
of
them
is
as
ref.
A
So
what
I'm
is
being
done
here
and
I
didn't
write
this
code,
but
I'm
pretty
sure
Brooks
might
have
written
a
scout
that
when
we
say
p
as
ref
path,
this
is
saying
that
anything
that
can
be
turned
into
or
referred
to
as
a
path
which
is
like
a
file
system
path
can
be
passed
in
here.
That
means
in
this
function,
I
can
pass
in
a
string.
I
can
pass
in
an
actual
path.
Type
I
can
pass
in
a
path.
A
Buff
I
can
Pat
there's
a
couple
other
things
that
Implement
path,
an
azuref
path
and
so
I'm
able
to
use
any
of
those
types
inside
of
here
without
defining
like
multiple
types
that
can
be
allowed
inside
of
the
function,
and
so,
even
though
this
is
a
private
function
that
we're
not
ever
going
to
export
we're
going
to
go
ahead
and
use
it
as
like,
make
it
as
easy
to
use
for
ourselves
as
possible.
A
The
other
thing
that
is
really
important
here.
This
is
a
great
example
of
when
we
use
an
impul
versus
an
external
function.
This
external
function
is
something
that's
getting
passed
into
the
map.
Now.
This
is
not
a
hard
and
fast
rule,
but
a
lot
of
times
when
you're
doing
this.
This
is
just
like
you're
trying
to
make
sure
you're
not
passing
a
whole
function
into
here
by
itself,
because
we
could
do
this
manually
and
say:
oh
here's,
my
my
item
and
then
I'm
going
to
inside
of
here.
Do
this
whole
thing.
A
Now
I'm,
that's
like
that's
just
really
clunky
to
read,
and
so
we
separate
that
out
into
its
own
function
and
makes
it
and
makes
that
easier.
Now.
The
other
thing
we're
going
to
use
is
this
simple
drain
you'll
see
that
right
now
it's
not
exploited,
so
we
have
to
say
Pub
FN
drain,
and
then
we
need
to
change
this
type
down
here
to
the
okay.
A
We
have
this
hash
map,
so
this
is
returning
it
for
like
a
specific
command
output
format,
which
we
don't
care
about
in
this
library,
because
that's
only
for
outputting
and
that
should
be
a
consumer's
thing.
They
might
be
outputting
it
to
all
sorts
of
different
styles
and
things,
and
we
don't
want
to
mess
with
that.
A
So
we
just
want
to
give
them
data,
that's
easy
to
be
consumed,
and
so
I'm
actually
going
to
change
this
now
that
I'm
thinking
about,
instead
of
it
being
a
string
I'm
going
to
make
it
the
a
path
buff,
not
a
path
bug,
though,
and
so
down
here,
instead
of
formatting
this
as
a
string
or
doing
a
two
string
on
it,
we're
just
going
to
say
FS,
remove
file
path
and
we're
going
to
remove.
A
Okay,
so
what
did
I
do
there
in
line
so
this
right
here,
although
for
this
Library
it
wouldn't
matter
too
much
I
try
to
I
try
to
make
a
great
comment
too.
I
try
to
make
this
a
decision
of
do
I
need
to
copy
data.
So
inside
of
rest,
you
know
anytime,
you're,
copying
data,
so
basically,
if
you're
reallocating
something
and
in
performance,
critical
circumstances
that
matters
a
lot
but
I
try
to
follow
those
rules
anywhere
I
go
so
we
it's
it's
called
zero
cost.
A
And
actually
now
that
I'm
thinking
about
it,
that
makes
less
sense.
So
you
learned
a
lesson
but
now
I'm
going
to
change
my
mind
because
that's
what
happens
when
you're
coding
live
so
I'm
actually
going
to
make
these
a
path,
though,
and
let
me
explain
why
so
I
am
consuming
self
here,
which
means
every
bit
of
data
is
going
to
get
deallocated
as
soon
as
it's
done.
A
So
what
I
can
instead
take
is
for
this
specific
instance,
because
we're
not
using
it
anywhere
else,
I'm
actually
going
to
remove
the
generics
and
I'm
going
to
take
this
and
make
it
a
path
buff.
So
oops.
A
Oops
right
there
there
and
then
I'm
going
to
return
the
path.
So
this
means
I'm
just
consuming
the
data
and
passing
it
around
rather
than
like
reallocating
anything.
So
this
returns
a
whole
set
of
path,
Buffs
and
then
inside
of
here
I'm
going
to
return
a
vac
past,
buff
and
say.
A
A
And
now
it's
saying
I,
don't
know
what
this
oh
look.
I
need
a
result
here,
and
so
this
is
getting
like
the
model
caster
which
we
we
did
not
have
wrapped
in
a
result,
so
we're
going
to
have
to
change
some
code
here
to
make
this
work.
So
let's
go
ahead
and
do
that.
A
So
I'm
trying
to
think
what
the
best
option
would
be.
So
if
we
can't
find
the
model
Caster
I
think
the
best
option
would
just
be
to
like
essentially
return
an
empty
path
buff,
because
if
you
try
to
do
anything
with
an
empty
path,
buff
it's
going
to
find
that
it
doesn't
exist,
and
so
that's
probably
our
best
option.
Now.
A
This
is
where
rust
has
some
nice
things
called
there's
unwrap
now
you
rarely
want
to
use
unwrap
generally,
if
I'm
reviewing
rest
code
and
I
see
an
unwrap
or
an
expect
or
any
of
those
things.
I'm
immediately
going
to
be
suspicious
and
I'm
going
to
ask
and
make
sure
that
the
code
is
safe,
that
you
know
that
you
can
unwrap
without
causing
a
panic,
because
if
you
don't
an
unwrap,
will
cause
a
panic
in
your
code
and
everything
shut
down.
A
With
the
unwrap
of
a
path
buff,
and
so
that
should
make
that
all
go
away,
okay
and
then
we're
going
to
get
the
same
thing
with
downloadster,
so
we're
going
to
do
the
exact
same
thing
here
now.
The
reason
this
is
okay
to
do
is,
if
you
remember
down
in
this
drain,
it
says:
does
the
path
exist?
So
if
the
path
doesn't
exist,
it's
going
to
just
ignore
it
and
then
continue
on
with
its
life
and
just
say:
oh
yep
I
succeeded
because
it
completely
filtered
it
out.
A
So
we're
going
to
do
the
same
thing
here,
we're
going
to
go
ahead
and
save
it.
Okay,
that
should
be
all
the
bugs.
So
now,
one
last
thing
to
tidy
this
up
is
I
need
to
add
documentation.
This
is
another
critical
thing,
so
I
need
to
have
documentation
in
two
different
places.
First
off
I
need
to
say:
okay,
what
does
this
function
do?
A
So
I
have
that
and
then
I'm
also
going
to
put
it
on.
Basically,
anything
public
can
be
done.
This
and
I
haven't
enabled
it
yet,
but
you
can
enable
basically
and
enforce
that
all
docs
need
to
be
there
for
or
else
it
causes
a
compilation,
failure
and
I'm
gonna
say.
A
A
And
so
now,
I
have
all
that
I
could
probably
add
some
module
level
documentation
here,
but
there's
not
going
to
be
too
much
so
with
that.
We
just
poured
it
over
just
one
of
the
commands
over
into
what
will
what
will
be
washlib,
so
I'm
gonna
pause
there.
We
have
a
little
bit
of
time
and
I
can
show
you
how
this
will
that
now
work
inside
of
wash
but
I
wanted
to
just
pause
in
case.
There
are
any
questions
that
people
had.
B
I
had
a
quick
question
while
they,
while
they
roll
in
or
well,
and
he
may
roll
in
Taylor,
so
you
said
that
unwrapping
you
know
kind
of
makes
your
program
panic
and
crash.
B
A
Yeah,
so
a
library
should
never
Panic
for
a
user
unless
you
explicitly
say
that
the
only
time
I
see
that
is
when
you're
like
creating
an
initial
like
structure
of
something,
and
if
something
isn't
there,
you
can
Panic
then,
but
you
generally
document
it
that
way.
Outside
of
that,
you
do
not
see
panics
in
libraries
in
at
least
in
well-maintained
libraries,
they're
generally
frowned
upon
for
your
for
a
CLI,
it's
much
more
common
to
do
something
like
yep.
A
It
didn't
exist
like
because
you're
at
the
very
the
very
end,
you're
the
end
consumer,
you,
the
thing
is
with
something
like
a
crate
like
a
what
like
wash
lib,
there
could
be
three
other
crates
using
it
before
it
gets
to
like
an
end
user
State
like
the
actual
final
person
consuming
it.
So
you
don't
want
to
ever
cause
like
an
error
that
causes
a
panic
like
way
deep
in
somebody's
code.
A
Okay,
I
haven't
seen
any
questions
yet
so
we'll
see.
If
we
can
do
this
real,
quick,
so
I'm
going
to
go
back
down
to
drain
and
there's
a
couple
different
things
here.
So
first
off
we
have
this
this
drain
selection
and
we've
done
a
sub
command.
A
We're
still
gonna
need
to
have
this
enum
and
it's
basically
copy
pasted.
We're
gonna
try
to
find
a
way
if
we
can
maybe
manually
like
attach
some
of
this
stuff
down
the
line,
but
for
now
this
is
just
going
to
have
to
be
be
cloned.
Now,
there's
another
question
that
popped
up,
really
quick
and
whether
it's
better
to
expose
a
trace
or
just
a
specific
error.
For
me,
it
depends
on
what
you
can
do
with
it.
A
If
it's
something
that
a
user
can't
do
anything
with,
for
example,
I
always
think
like
up
or
no
not,
this
isn't
even
one
I'm,
just
saying
a
user
can't
do
something
with
and
I
want
them
to
be
able
to
just
see
that
something
happened
generally
tracing
is
done
best
in
like
an
end
like
a
consumer
of
a
crate
and
the
crate
can
log
and
Trace
things,
but
like
we
don't
want
to
use
that
just
as
an
error
most
the
time
we
use
what's
called
what's
called.
A
A
So
inside
of
here,
when
we're
looking
at
the
result,
type
and
look
at
the
error,
we
have
this-
this
error
derived
and
we
I
really
like
this
style
of
errors
that
you
expose
all
different
error.
Cases
is
an
enum
and
that
allows
a
user
to
be
able
to
make
a
specific
decision.
So
this
is
things
like
retry
decisions,
whether
they
should
bail
out
so
I
always
try
to
provide
as
much
information
as
possible,
so
that
I
can
react
to
that
error.
Properly.
A
I'd,
say
80
of
the
time.
I
just
end
up
returning
the
error
back
at
the
stack,
but
the
other
20
of
the
time.
I
actually
use
that
error
to
trigger
certain
logic
and
behavior.
So
that's
a
really
like
a
really
good
distinction
to
make.
A
So
just
keep
that
in
mind
that
most
the
time
you
want
to
return
like
a
specific
error
and
we
didn't
get
to
in
this
case,
we
are
returning
specific
errors
that
are,
I
o
errors,
we're
knowing
exactly
what
happened
when
you
tried
to
clean
something
up,
but
there
can
be
cases
where
you
want
to
do
more
generic
or
you
can
have
your
own
custom
errors
or
whatever
it
might
be.
A
Okay
and
then,
let's
see,
we
have
three
minutes
till
the
top
of
the
hour,
because
I
promised
only
an
hour.
So
let's
try
and
this
so
we're
gonna
go
ahead
and
and
take
we
don't
need
this
anymore,
because
we
already
have
that
salt.
A
We
do
need
this
handle
command
because
it's
used
by
our
thing,
but
we're
going
to
have
to
adapt
our
our
train
to
do
this
command
output.
So
what
I'm
going
to
do
is
just
to
convert
this
I'm
going
to
say
impul.
A
A
A
A
A
Downloads
Okay,
so
we've
converted
we're
able
to
convert
it.
So
what
we'll
do
is
we'll
say
command
say
drain
from
you
can
also
use
into
with
this
we'll
say,
drain
from
command
and
then
dot
drain,
and
so
this
will
give
us
our
let
tab
equal.
A
Now
this
is
the
case,
because
this
is
a
consumer,
a
CLI
Library
we're
just
turning
into
an
anyhow,
because
we
just
want
to
get
the
text
message
back
to
the
user,
so
we're
just
getting
a
vector
path,
Buffs
right
here
and
then
the
old
way
of
doing
this
was
to
get
a
command
output.
So
let
me
I
shouldn't
have
deleted
that
code.
A
And
so
here,
I'm
going
to
say,
map
insert
drains
to
string
and
Json
cleared,
and
so
in
this
case
I'm
going
to
say
Json
I'm,
sorry,
I'm
taking
this
is
a
Json
macro.
It
turns
it
into
basically
a
Json
value
and
I'm
going
to
take
paths
and
turn
that
into
it
instead
and
then
we
should
be
able
to
just
do
it
that
way
and
also
remove
this.
A
A
Okay-
and
it
tells
us
all
the
things
here
at
the
top-
that
we're
not
using
anymore
so
I'm
going
to
go
ahead
and
remove
those
and
we
shouldn't
need
configure
or
upload
up
downloads
there
anymore.
We
should
just
need
command
output
and
then
I'm
going
to
put
the
standard
Imports
up
at
the
top.
Like
I
said,
this
is
just
kind
of
standard
practice
and
then
we'll
do
this.
One.
A
A
So
now
we
have
this.
This
Library
all
put
together
and
everything's.
Compiling
I
have
all
my
Lids
succeeding,
and
you
can
see
that,
even
though
we
did
have
to
do
this
kind
of
janky
thing
to
convert
between
the
new
types,
we
now
have
something
that
is
way
shorter
than
it
was
before
and
like
the
actual
code
itself
is
44
lines.
So
now
that
code
is
reusable
elsewhere
and
inside
of
the
CLI,
it's
just
consuming
it.
A
B
I
didn't
see
anything
didn't
see
anything
in
the
chat
after
that
last
question.
B
Okay,
but
I
think
I
mean
this
is
pretty
sweet,
I
think,
overall,
the
changes
that
you
added
is
probably
like
throughout
this
refactor
is
probably
gonna
reduce
the
lines
of
code
that
we
have
I
think
with
some
of
your
changes
to
make
it
a
little
more
consumable
and
putting
it
into
one
lines.
We're
probably
overall
gonna
benefit
with
some
shorter
lines
of
code,
which
is
nice.
A
Yeah
well
and
yeah,
and
thank
you
so
much
for
the
the
feedback
there
I'm
glad
this
was
useful.
Hopefully
people
find
it
useful
here.
We'll
probably
do
some
more
of
these
we'll
see
maybe
like
next
week
how
things
are
going
as
well
or
maybe
later
in
the
week,
but
this
is
these
are
things
that
we
we
try
to
do
really
well
and
present
it
to
the
community.
So
hopefully
this
was
helpful
for
all
of
you
and
hopefully
tune
in
next
time
for
our
next.