观察一些你所安装的crate 的代码来看看其内部结构是否不同于公有API。 Look at some of the code of crates you have installed to see if their internal structure differs from their public API. 虽然在本地开发crate 时,可以使用任何你喜欢的名称。 While you're working on a crate locally, you can name a crate whatever you would like. 绝对路径(absolutepath)从crate 根开始,以crate 名或者字面值crate 开头。 An absolute path starts from a crate root by using a crate name or a literal crate .示例14-4展示了一个使用artcrate 中PrimaryColor和mix项的crate的例子:. Listing 14-4 shows an example of a crate that uses the PrimaryColor and mix items from the art crate: . 基本上“use”总是从crate 的根开始,所以有下面的. Basically,“use” always starts from the root of the crate .
在绝对路径的情况下,我们从crate ,也就是crate根开始。 In the absolute path case, we start with crate , the root of our crate. . 使用他们描述其容器整体的目的来帮助crate 用户理解你的代码组织。 Use them to explain the overall purpose of the container to help your users understand the crate 's organization. 注意标准库(std)对于你的包来说也是外部crate 。 Note that the standard library(std) is also a crate that's external to your package. 但也存在goblincrate ,它支持Linux(ELF)、Mac(Mach-o)和Windows(PE32)的二进制格式!我可能会在某个时候切换到goblin。! But there's also the goblin crate , which supports Linux(ELF), Mac(Mach-o), and Windows(PE32) binary formats!! Rust的标准库是小而稳定的,不过crate 易于分享和使用,并采用一个不同语言自身的时间线来提供改进。 Rust's standard library is small and stable, but crates are easy to share, use, and improve on a timeline different from that of the language. 在《新千年施特劳斯与奥洛夫》(2003)中,Crate andNuttall(2009)和HastrupandRubow(2014)为这场辩论带来了经过编辑的书籍。 In the new millennium Strauss and Orlove(2003), Crate and Nuttall(2009) and Hastrup and Rubow(2014) brought edited volumes to the debate. Image by: Crate and Barrel. Source: Crate and Barrel. Photo credit: Crate and Barrel. Rs, which depends on the add-one crate . They founded Crate & Barrel in 1962. Now that you have added the rand crate to Cargo. It now says extern crate rand. Rather than starting from the crate root, the path starts from sound. 事实证明,有一个crate可以做到这一点:elfcrate !! It turns out that there's a crate to do that: the elf crate !
Display more examples
Results: 101 ,
Time: 0.026