| /third_party/rust/crates/is-terminal/ |
| D | README.md | 2 <h1><code>is-terminal</code></h1> 9 …="https://github.com/sunfishcode/is-terminal/actions?query=workflow%3ACI"><img src="https://github… 10 …<a href="https://crates.io/crates/is-terminal"><img src="https://img.shields.io/crates/v/is-termin… 11 …<a href="https://docs.rs/is-terminal"><img src="https://docs.rs/is-terminal/badge.svg" alt="docs.r… 15 is-terminal is a simple utility that answers one question: 20 and may support color and other special features. This crate doesn't provide 23 On Unix-family platforms, this is effectively the same as the [`isatty`] 25 high-level stream types instead of raw file descriptors. 30 This crate is derived from [the atty crate] with [PR \#51] bug fix and 31 [PR \#54] port to windows-sys applied. The only additional difference is that [all …]
|
| /third_party/rust/crates/nix/src/sys/ioctl/ |
| D | mod.rs | 3 //! This library is pretty low-level and messy. `ioctl` is not fun. 8 //! The `ioctl` syscall is the grab-bag syscall on POSIX systems. Don't want to add a new 15 //! * Provide read/write access to out-of-band data related to a device such as configuration 17 //! * Provide a mechanism for performing full-duplex data transfers (for instance, xfer on SPI 19 //! * Provide access to control functions on a device (for example, on Linux you can send 29 //! Historically `ioctl` numbers were arbitrary hard-coded values. In Linux (before 2.6) and some 30 //! unices this has changed to a more-ordered system where the ioctl numbers are partitioned into 32 …`Documentation/ioctl/ioctl-number.rst`](https://elixir.bootlin.com/linux/latest/source/Documentati… 41 //! how old `ioctl`s are, however, there are many hard-coded `ioctl` identifiers. These are 57 //! # #[macro_use] extern crate nix; [all …]
|
| /third_party/rust/crates/regex/src/ |
| D | lib.rs | 2 This crate provides a library for parsing, compiling, and executing regular 3 expressions. Its syntax is similar to Perl-style regular expressions, but lacks 8 This crate's documentation provides some simple examples, describes 17 This crate is [on crates.io](https://crates.io/crates/regex) and can be 25 # Example: find a date 28 expression and then using it to search, split or replace text. For example, 33 let re = Regex::new(r"^\d{4}-\d{2}-\d{2}$").unwrap(); 34 assert!(re.is_match("2014-01-01")); 37 Notice the use of the `^` and `$` anchors. In this crate, every expression 42 This example also demonstrates the utility of [all …]
|
| /third_party/rust/crates/clap/src/_derive/ |
| D | mod.rs | 6 //! 2. [Command Attributes](#command-attributes) 7 //! 2. [ArgGroup Attributes](#arggroup-attributes) 8 //! 3. [Arg Attributes](#arg-attributes) 9 //! 4. [ValueEnum Attributes](#valueenum-attributes) 10 //! 5. [Possible Value Attributes](#possible-value-attributes) 11 //! 3. [Arg Types](#arg-types) 12 //! 4. [Doc Comments](#doc-comments) 13 //! 5. [Mixing Builder and Derive APIs](#mixing-builder-and-derive-apis) 18 //! To derive `clap` types, you need to enable the [`derive` feature flag][crate::_features]. 20 //! Example: [all …]
|
| /third_party/rust/crates/cxx/book/src/build/ |
| D | cargo.md | 1 {{#title Cargo-based setup — Rust ♡ C++}} 2 # Cargo-based builds 7 experience `#include`-ing C++ headers across dependencies. 11 CXX's integration with Cargo is handled through the [cxx-build] crate. 13 [cxx-build]: https://docs.rs/cxx-build 25 [build-dependencies] 26 cxx-build = "1.0" 30 [`cc::Build`] instance (from the usual widely used `cc` crate) on which you can 41 .flag_if_supported("-std=c++11") 42 .compile("cxxbridge-demo"); [all …]
|
| /third_party/rust/crates/env_logger/.github/workflows/ |
| D | ci.yml | 6 - "**.rs" 7 - "Cargo.toml" 8 - "Cargo.lock" 13 runs-on: ubuntu-latest 15 - name: Checkout sources 18 - name: Install Rust toolchain 19 uses: actions-rs/toolchain@v1 26 - name: Check formatting 27 uses: actions-rs/cargo@v1 30 args: -- --check [all …]
|
| /third_party/rust/crates/aho-corasick/ |
| D | README.md | 1 aho-corasick 6 [Aho-Corasick algorithm](https://en.wikipedia.org/wiki/Aho%E2%80%93Corasick_algorithm), 11 … status](https://github.com/BurntSushi/aho-corasick/workflows/ci/badge.svg)](https://github.com/Bu… 12 [](https://crates.io/crates/aho-coras… 14 Dual-licensed under MIT or the [UNLICENSE](https://unlicense.org/). 19 https://docs.rs/aho-corasick 28 aho-corasick = "0.7" 32 ### Example: basic searching 34 This example shows how to search for occurrences of multiple patterns 57 ### Example: case insensitivity [all …]
|
| /third_party/rust/crates/memchr/src/ |
| D | lib.rs | 6 This section gives a brief high level overview of what this crate offers. 8 * The top-level module provides routines for searching for 1, 2 or 3 bytes 12 * The [`memmem`] sub-module provides forward and reverse substring search 16 is exactly what you want when searching either UTF-8 or arbitrary bytes. 18 # Example: using `memchr` 20 This example shows how to use `memchr` to find the first occurrence of `z` in 30 # Example: matching one of three possible bytes 47 # Example: iterating over substring matches 49 This example shows how to use the [`memmem`] sub-module to find occurrences of 64 # Example: repeating a search for the same needle [all …]
|
| /third_party/rust/crates/regex/ |
| D | PERFORMANCE.md | 2 crate. 4 This guide assumes some familiarity with the public API of this crate, which 9 One of the design goals of this crate is to provide worst case linear time 11 means that, *in theory*, the performance of this crate is much better than most 15 For example, try opening a Python interpreter and typing this: 24 The promise of this crate is that *this pathological behavior can't happen*. 37 expression in this crate is quite expensive. It is conceivable that it may get 42 the time of writing, for example, `\pL{100}` takes around 44ms to compile. This 44 turn it into a proper automaton that decodes a subset of UTF-8 which 55 life-before-main, and therefore, one cannot utter this: [all …]
|
| D | README.md | 4 syntax is similar to Perl-style regular expressions, but lacks a few features 10 [](https://github.com/rus… 12 [](https://github.com/rust… 26 To bring this crate into your repository, either add `regex` to your 29 Here's a simple example that matches a date in YYYY-MM-DD format and prints the 38 - 40 - 43 let caps = re.captures("2010-03-14").unwrap(); 52 easy to adapt the above example with an iterator: 58 On 2010-03-14, foo happened. On 2014-10-14, bar happened. [all …]
|
| D | UNICODE.md | 3 This document describes the regex crate's conformance to Unicode's 14 are ASCII-only definitions. 19 For example, tackling canonical equivalence such that matching worked as one 46 fixed-width variants of the same idea. 48 Note that when Unicode mode is disabled, any non-ASCII Unicode codepoint is 51 U+00FF (encoded as `\xC3\xBF` in UTF-8) while the regex `(?-u)\xFF` matches 61 points specified by Unicode. The regex crate does not provide exhaustive 86 via `\p{alpha}` (for example). 88 For example, `\p{Letter}` can be equivalently written as `\pL`. 90 The following is a list of all properties supported by the regex crate (starred [all …]
|
| /third_party/rust/crates/rust-openssl/openssl/src/ssl/ |
| D | connector.rs | 5 use crate::dh::Dh; 6 use crate::error::ErrorStack; 8 use crate::ssl::SslVersion; 9 use crate::ssl::{ 13 use crate::version; 17 -----BEGIN DH PARAMETERS----- 24 -----END DH PARAMETERS----- 28 fn ctx(method: SslMethod) -> Result<SslContextBuilder, ErrorStack> { in ctx() 49 // caused CVEs in OpenSSL pre-1.0.1h, according to in ctx() 60 /// A type which wraps client-side streams in a TLS session. [all …]
|
| /third_party/rust/crates/termcolor/ |
| D | README.md | 6 are provided for use in single-threaded or multi-threaded command line 12 Dual-licensed under MIT or the [UNLICENSE](https://unlicense.org/). 47 ### Example: using `StandardStream` 49 The `StandardStream` type in this crate works similarly to `std::io::Stdout`, 51 For example, to write some green text: 57 fn write_green() -> io::Result<()> { 64 ### Example: using `BufferWriter` 70 This example shows how to print some green text to stderr. 76 fn write_green() -> io::Result<()> { 95 * In non-Windows environments, if `TERM` is not set, then colors will be [all …]
|
| /third_party/rust/crates/clap/src/ |
| D | macros.rs | 8 /// # extern crate clap; 26 /// `"author1 lastname <author1@example.com>:author2 lastname <author2@example.com>"` 29 /// replacement string, so, for example, 31 /// `"author1 lastname <author1@example.com>,\nauthor2 lastname <author2@example.com>,\nauthor3 las… 37 /// # extern crate clap; 70 /// # extern crate clap; 89 /// When the crate name is set to something different from the package name, 91 /// See [the Cargo Book](https://doc.rust-lang.org/cargo/reference/environment-variables.html) 98 /// # extern crate clap; 115 /// **NOTE:** Changing the values in your `Cargo.toml` does not trigger a re-build automatically, [all …]
|
| /third_party/rust/crates/termcolor/wincolor/ |
| D | README.md | 1 ## **This crate has reached its end-of-life and is now deprecated.** 3 This crate was rolled into the 4 [`winapi-util`](https://crates.io/crates/winapi-util) 5 crate since `wincolor` is quite small and didn't otherwise have a good reason 6 for living life as a distinct crate. 9 [`console`](https://docs.rs/winapi-util/0.1.*/x86_64-pc-windows-msvc/winapi_util/console/index.html) 10 module of `winapi-util` is a drop-in replacement for `wincolor`. 15 The purpose of this crate is to expose the full inflexibility of the Windows 20 Dual-licensed under MIT or the [UNLICENSE](https://unlicense.org/). 35 and this to your crate root: [all …]
|
| /third_party/rust/crates/cxx/src/ |
| D | lib.rs | 1 …hub]](https://github.com/dtolnay/cxx) [![crates-io]](https://crates.io/crates/cxx) [![do… 3 //! [github]: https://img.shields.io/badge/github-8da0cb?style=for-the-badge&labelColor=555555&logo… 4 //! [crates-io]: https://img.shields.io/badge/crates.io-fc8d62?style=for-the-badge&labelColor=55555… 5 //! [docs-rs]: https://img.shields.io/badge/docs.rs-66c2a5?style=for-the-badge&labelColor=555555&lo… 11 //! wrong when using bindgen or cbindgen to generate unsafe C-style bindings. 29 //! example code. 36 //! embedded together in one Rust module (the next section shows an example). 56 //! combination. CXX guarantees an ABI-compatible signature that both sides 58 //! expose an idiomatic API on those types to the other language. For example 65 //! # Example [all …]
|
| /third_party/rust/crates/libc/ |
| D | CONTRIBUTING.md | 4 to the `libc` crate. 8 If you want to add your changes to v0.2, please submit them to the `libc-0.2` branch. 18 The internal structure of this crate is designed to minimize the number of 20 to all platforms in the future. As a result, the crate is organized 29 platforms of that level. For example, when adding a Unix API it should be added 30 to `src/unix/mod.rs`, but when adding a Linux-only API it should be added to 34 at, fear not! This crate has CI support which tests any binding against all 39 symbols list(s) found in the `libc-test/semver` directory. These lists keep 40 track of what symbols are public in the libc crate and ensures they remain 41 available between changes to the crate. If the new symbol(s) are available on [all …]
|
| /third_party/rust/crates/regex/regex-syntax/ |
| D | README.md | 1 regex-syntax 3 This crate provides a robust regular expression parser. 5 [](https://github.com/rus… 6 [](https://crates.io/crates/regex-syn… 7 [](https://github.com/rust… 12 https://docs.rs/regex-syntax 17 There are two primary types exported by this crate: `Ast` and `Hir`. The former 28 ### Example subsection in regex-syntax 30 This example shows how to parse a pattern string into its HIR: 46 This crate has no `unsafe` code and sets `forbid(unsafe_code)`. While it's [all …]
|
| /third_party/rust/crates/syn/ |
| D | README.md | 4 [<img alt="github" src="https://img.shields.io/badge/github-dtolnay/syn-8da0cb?style=for-the-badge&… 5 [<img alt="crates.io" src="https://img.shields.io/crates/v/syn.svg?style=for-the-badge&color=fc8d62… 6 [<img alt="docs.rs" src="https://img.shields.io/badge/docs.rs-syn-66c2a5?style=for-the-badge&labelC… 7 …/github/actions/workflow/status/dtolnay/syn/ci.yml?branch=master&style=for-the-badge" height="20">… 15 - **Data structures** — Syn provides a complete syntax tree that can represent 21 - **Derives** — Of particular interest to derive macros is [`syn::DeriveInput`] 22 which is any of the three legal input items to a derive macro. An example 24 user-defined trait. 26 - **Parsing** — Parsing in Syn is built around [parser functions] with the 27 signature `fn(ParseStream) -> Result<T>`. Every syntax tree node defined by [all …]
|
| /third_party/rust/crates/bindgen/book/src/ |
| D | tutorial-6.md | 1 # Publish Your Crate! 3 That's it! Now we can publish our crate on crates.io and we can write a nice, 4 Rust-y API wrapping the raw FFI bindings in a safe interface. However, there is 5 already a [`bzip2-sys`][bz-sys] crate providing raw FFI bindings, and there is 6 already a [`bzip2`][bz] crate providing a nice, safe, Rust-y API on top of the 9 Check out the [full code on Github!][example] 11 [bz-sys]: https://crates.io/crates/bzip2-sys 13 [example]: https://github.com/fitzgen/bindgen-tutorial-bzip2-sys
|
| /third_party/rust/crates/codespan/ |
| D | README.md | 1 # codespan-reporting 3 [![Continuous integration][actions-badge]][actions-url] 4 [![Crates.io][crate-badge]][crate-url] 5 [![Docs.rs][docs-badge]][docs-url] 6 [![Matrix][matrix-badge]][matrix-lobby] 8 [actions-badge]: https://img.shields.io/github/workflow/status/brendanzab/codespan/Continuous%20int… 9 [actions-url]: https://github.com/brendanzab/codespan/actions 10 [crate-url]: https://crates.io/crates/codespan-reporting 11 [crate-badge]: https://img.shields.io/crates/v/codespan-reporting.svg 12 [docs-url]: https://docs.rs/codespan-reporting [all …]
|
| /third_party/rust/crates/lazy-static.rs/src/ |
| D | lib.rs | 1 // Copyright 2016 lazy-static.rs Developers 3 // Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or 4 // http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or 31 # extern crate lazy_static; 34 /// This is an example for using doc comment attributes 35 static ref EXAMPLE: u8 = 42; 53 - Any type in them needs to fulfill the `Sync` trait. 54 - If the type has a destructor, then it will not run when the process exits. 56 # Example 62 extern crate lazy_static; [all …]
|
| /third_party/rust/crates/clap/examples/ |
| D | cargo-example.md | 2 book](https://doc.rust-lang.org/cargo/reference/external-tools.html#custom-subcommands). 3 The crate [`clap-cargo`](https://github.com/crate-ci/clap-cargo) can help in 8 $ cargo-example --help 12 example A simple to use, efficient, and full-featured Command Line Argument Parser 16 -h, --help Print help 18 $ cargo-example example --help 19 A simple to use, efficient, and full-featured Command Line Argument Parser 21 Usage: cargo example [OPTIONS] 24 --manifest-path <PATH> 25 -h, --help Print help [all …]
|
| D | cargo-example-derive.md | 2 book](https://doc.rust-lang.org/cargo/reference/external-tools.html#custom-subcommands). 3 The crate [`clap-cargo`](https://github.com/crate-ci/clap-cargo) can help in 8 $ cargo-example-derive --help 12 example-derive A simple to use, efficient, and full-featured Command Line Argument Parser 16 -h, --help Print help 18 $ cargo-example-derive example-derive --help 19 A simple to use, efficient, and full-featured Command Line Argument Parser 21 Usage: cargo example-derive [OPTIONS] 24 --manifest-path <MANIFEST_PATH> 25 -h, --help Print help [all …]
|
| /third_party/rust/crates/nom/src/character/ |
| D | complete.rs | 5 use crate::branch::alt; 6 use crate::combinator::opt; 7 use crate::error::ErrorKind; 8 use crate::error::ParseError; 9 use crate::internal::{Err, IResult}; 10 use crate::lib::std::ops::{Range, RangeFrom, RangeTo}; 11 use crate::traits::{ 14 use crate::traits::{Compare, CompareResult}; 19 /// # Example 24 /// fn parser(i: &str) -> IResult<&str, char> { [all …]
|