Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the meaning of `use path::{self}`?

Tags:

self

rust

I recently read the following line of code:

use fmt::{self, Debug}; 

What does the self keyword in the above statement mean?

like image 801
Volodymyr Boiko Avatar asked Mar 08 '18 23:03

Volodymyr Boiko


People also ask

What is the full meaning of paths?

noun, plural paths [pathz, pahthz, paths, pahths]. a way beaten, formed, or trodden by the feet of persons or animals. a narrow walk or way: a path through a garden; a bicycle path. a route, course, or track along which something moves: the path of a hurricane.

What is the path path?

countable noun. A path is a long strip of ground which people walk along to get from one place to another. We followed the path along the clifftops.

What is path () in Python?

path module is a very extensively used module that is handy when processing files from different places in the system. It is used for different purposes such as for merging, normalizing and retrieving path names in python . All of these functions accept either only bytes or only string objects as their parameters.

What does path mean in psychopath?

-path- comes from Greek, where it has the meaning "suffering; disease; feeling. '' This meaning is found in such words as: antipathy, apathetic, apathy, empathy, homeopathy, pathetic, pathology, pathos, psychopath, sympathetic, sympathize, sympathy, telepathy.


1 Answers

self here refers to the module itself, i.e. your line is equivalent to the two lines

use fmt::Debug;
use fmt;
like image 184
fjh Avatar answered Nov 14 '22 04:11

fjh