url stringlengths 11 2.25k | text stringlengths 88 50k | ts timestamp[s]date 2026-01-13 08:47:33 2026-01-13 09:30:40 |
|---|---|---|
https://doc.rust-lang.org/stable/std/index.html | std - Rust This old browser is unsupported and will most likely display funky things. Crate std std 1.92.0 (ded5c06cf 2025-12-08) All Items Sections The Rust Standard Library How to read this documentation What is in the standard library documentation? Contributing changes to the documentation A Tour of The Rust Standard Library Containers and collections Platform abstractions and I/O Use before and after main() Crate Items Primitive Types Modules Macros Keywords Crate std Copy item path 1.0.0 · Source Expand description § The Rust Standard Library The Rust Standard Library is the foundation of portable Rust software, a set of minimal and battle-tested shared abstractions for the broader Rust ecosystem . It offers core types, like Vec<T> and Option<T> , library-defined operations on language primitives , standard macros , I/O and multithreading , among many other things . std is available to all Rust crates by default. Therefore, the standard library can be accessed in use statements through the path std , as in use std::env . § How to read this documentation If you already know the name of what you are looking for, the fastest way to find it is to use the search button at the top of the page. Otherwise, you may want to jump to one of these useful sections: std::* modules Primitive types Standard macros The Rust Prelude If this is your first time, the documentation for the standard library is written to be casually perused. Clicking on interesting things should generally lead you to interesting places. Still, there are important bits you don’t want to miss, so read on for a tour of the standard library and its documentation! Once you are familiar with the contents of the standard library you may begin to find the verbosity of the prose distracting. At this stage in your development you may want to press the “ Summary” button near the top of the page to collapse it into a more skimmable view. While you are looking at the top of the page, also notice the “Source” link. Rust’s API documentation comes with the source code and you are encouraged to read it. The standard library source is generally high quality and a peek behind the curtains is often enlightening. § What is in the standard library documentation? First of all, The Rust Standard Library is divided into a number of focused modules, all listed further down this page . These modules are the bedrock upon which all of Rust is forged, and they have mighty names like std::slice and std::cmp . Modules’ documentation typically includes an overview of the module along with examples, and are a smart place to start familiarizing yourself with the library. Second, implicit methods on primitive types are documented here. This can be a source of confusion for two reasons: While primitives are implemented by the compiler, the standard library implements methods directly on the primitive types (and it is the only library that does so), which are documented in the section on primitives . The standard library exports many modules with the same name as primitive types . These define additional items related to the primitive type, but not the all-important methods. So for example there is a page for the primitive type char that lists all the methods that can be called on characters (very useful), and there is a page for the module std::char that documents iterator and error types created by these methods (rarely useful). Note the documentation for the primitives str and [T] (also called ‘slice’). Many method calls on String and Vec<T> are actually calls to methods on str and [T] respectively, via deref coercions . Third, the standard library defines The Rust Prelude , a small collection of items - mostly traits - that are imported into every module of every crate. The traits in the prelude are pervasive, making the prelude documentation a good entry point to learning about the library. And finally, the standard library exports a number of standard macros, and lists them on this page (technically, not all of the standard macros are defined by the standard library - some are defined by the compiler - but they are documented here the same). Like the prelude, the standard macros are imported by default into all crates. § Contributing changes to the documentation Check out the Rust contribution guidelines here . The source for this documentation can be found on GitHub in the ‘library/std/’ directory. To contribute changes, make sure you read the guidelines first, then submit pull-requests for your suggested changes. Contributions are appreciated! If you see a part of the docs that can be improved, submit a PR, or chat with us first on Zulip #docs. § A Tour of The Rust Standard Library The rest of this crate documentation is dedicated to pointing out notable features of The Rust Standard Library. § Containers and collections The option and result modules define optional and error-handling types, Option<T> and Result<T, E> . The iter module defines Rust’s iterator trait, Iterator , which works with the for loop to access collections. The standard library exposes three common ways to deal with contiguous regions of memory: Vec<T> - A heap-allocated vector that is resizable at runtime. [T; N] - An inline array with a fixed size at compile time. [T] - A dynamically sized slice into any other kind of contiguous storage, whether heap-allocated or not. Slices can only be handled through some kind of pointer , and as such come in many flavors such as: &[T] - shared slice &mut [T] - mutable slice Box<[T]> - owned slice str , a UTF-8 string slice, is a primitive type, and the standard library defines many methods for it. Rust str s are typically accessed as immutable references: &str . Use the owned String for building and mutating strings. For converting to strings use the format! macro, and for converting from strings use the FromStr trait. Data may be shared by placing it in a reference-counted box or the Rc type, and if further contained in a Cell or RefCell , may be mutated as well as shared. Likewise, in a concurrent setting it is common to pair an atomically-reference-counted box, Arc , with a Mutex to get the same effect. The collections module defines maps, sets, linked lists and other typical collection types, including the common HashMap<K, V> . § Platform abstractions and I/O Besides basic data types, the standard library is largely concerned with abstracting over differences in common platforms, most notably Windows and Unix derivatives. Common types of I/O, including files , TCP , and UDP , are defined in the io , fs , and net modules. The thread module contains Rust’s threading abstractions. sync contains further primitive shared memory types, including atomic , mpmc and mpsc , which contains the channel types for message passing. § Use before and after main() Many parts of the standard library are expected to work before and after main() ; but this is not guaranteed or ensured by tests. It is recommended that you write your own tests and run them on each platform you wish to support. This means that use of std before/after main, especially of features that interact with the OS or global state, is exempted from stability and portability guarantees and instead only provided on a best-effort basis. Nevertheless bug reports are appreciated. On the other hand core and alloc are most likely to work in such environments with the caveat that any hookable behavior such as panics, oom handling or allocators will also depend on the compatibility of the hooks. Some features may also behave differently outside main, e.g. stdio could become unbuffered, some panics might turn into aborts, backtraces might not get symbolicated or similar. Non-exhaustive list of known limitations: after-main use of thread-locals, which also affects additional features: thread::current() under UNIX, before main, file descriptors 0, 1, and 2 may be unchanged (they are guaranteed to be open during main, and are opened to /dev/null O_RDWR if they weren’t open on program start) Primitive Types § array A fixed-size array, denoted [T; N] , for the element type, T , and the non-negative compile-time constant size, N . bool The boolean type. char A character type. f32 A 32-bit floating-point type (specifically, the “binary32” type defined in IEEE 754-2008). f64 A 64-bit floating-point type (specifically, the “binary64” type defined in IEEE 754-2008). fn Function pointers, like fn(usize) -> bool . i8 The 8-bit signed integer type. i16 The 16-bit signed integer type. i32 The 32-bit signed integer type. i64 The 64-bit signed integer type. i128 The 128-bit signed integer type. isize The pointer-sized signed integer type. pointer Raw, unsafe pointers, *const T , and *mut T . reference References, &T and &mut T . slice A dynamically-sized view into a contiguous sequence, [T] . str String slices. tuple A finite heterogeneous sequence, (T, U, ..) . u8 The 8-bit unsigned integer type. u16 The 16-bit unsigned integer type. u32 The 32-bit unsigned integer type. u64 The 64-bit unsigned integer type. u128 The 128-bit unsigned integer type. unit The () type, also called “unit”. usize The pointer-sized unsigned integer type. f16 Experimental A 16-bit floating-point type (specifically, the “binary16” type defined in IEEE 754-2008). f128 Experimental A 128-bit floating-point type (specifically, the “binary128” type defined in IEEE 754-2008). never Experimental The ! type, also called “never”. Modules § alloc Memory allocation APIs. any Utilities for dynamic typing or type reflection. arch SIMD and vendor intrinsics module. array Utilities for the array primitive type. ascii Operations on ASCII strings and characters. backtrace Support for capturing a stack backtrace of an OS thread borrow A module for working with borrowed data. boxed The Box<T> type for heap allocation. cell Shareable mutable containers. char Utilities for the char primitive type. clone The Clone trait for types that cannot be ‘implicitly copied’. cmp Utilities for comparing and ordering values. collections Collection types. convert Traits for conversions between types. default The Default trait for types with a default value. env Inspection and manipulation of the process’s environment. error Interfaces for working with Errors. f32 Constants for the f32 single-precision floating point type. f64 Constants for the f64 double-precision floating point type. ffi Utilities related to FFI bindings. fmt Utilities for formatting and printing String s. fs Filesystem manipulation operations. future Asynchronous basic functionality. hash Generic hashing support. hint Hints to compiler that affects how code should be emitted or optimized. i8 Deprecation planned Redundant constants module for the i8 primitive type . i16 Deprecation planned Redundant constants module for the i16 primitive type . i32 Deprecation planned Redundant constants module for the i32 primitive type . i64 Deprecation planned Redundant constants module for the i64 primitive type . i128 Deprecation planned Redundant constants module for the i128 primitive type . io Traits, helpers, and type definitions for core I/O functionality. isize Deprecation planned Redundant constants module for the isize primitive type . iter Composable external iteration. marker Primitive traits and types representing basic properties of types. mem Basic functions for dealing with memory. net Networking primitives for TCP/UDP communication. num Additional functionality for numerics. ops Overloadable operators. option Optional values. os OS-specific functionality. panic Panic support in the standard library. path Cross-platform path manipulation. pin Types that pin data to a location in memory. prelude The Rust Prelude primitive This module reexports the primitive types to allow usage that is not possibly shadowed by other declared types. process A module for working with processes. ptr Manually manage memory through raw pointers. rc Single-threaded reference-counting pointers. ‘Rc’ stands for ‘Reference Counted’. result Error handling with the Result type. slice Utilities for the slice primitive type. str Utilities for the str primitive type. string A UTF-8–encoded, growable string. sync Useful synchronization primitives. task Types and Traits for working with asynchronous tasks. thread Native threads. time Temporal quantification. u8 Deprecation planned Redundant constants module for the u8 primitive type . u16 Deprecation planned Redundant constants module for the u16 primitive type . u32 Deprecation planned Redundant constants module for the u32 primitive type . u64 Deprecation planned Redundant constants module for the u64 primitive type . u128 Deprecation planned Redundant constants module for the u128 primitive type . usize Deprecation planned Redundant constants module for the usize primitive type . vec A contiguous growable array type with heap-allocated contents, written Vec<T> . assert_ matches Experimental Unstable module containing the unstable assert_matches macro. async_ iter Experimental Composable asynchronous iteration. autodiff Experimental This module provides support for automatic differentiation. bstr Experimental The ByteStr and ByteString types and trait implementations. f16 Experimental Constants for the f16 half-precision floating point type. f128 Experimental Constants for the f128 quadruple-precision floating point type. from Experimental Unstable module containing the unstable From derive macro. intrinsics Experimental Compiler intrinsics. pat Experimental Helper module for exporting the pattern_type macro random Experimental Random value generation. range Experimental Experimental replacement range types simd Experimental Portable SIMD module. unsafe_ binder Experimental Operators used to turn types into unsafe binders and back. Macros § assert Asserts that a boolean expression is true at runtime. assert_ eq Asserts that two expressions are equal to each other (using PartialEq ). assert_ ne Asserts that two expressions are not equal to each other (using PartialEq ). cfg Evaluates boolean combinations of configuration flags at compile-time. column Expands to the column number at which it was invoked. compile_ error Causes compilation to fail with the given error message when encountered. concat Concatenates literals into a static string slice. dbg Prints and returns the value of a given expression for quick and dirty debugging. debug_ assert Asserts that a boolean expression is true at runtime. debug_ assert_ eq Asserts that two expressions are equal to each other. debug_ assert_ ne Asserts that two expressions are not equal to each other. env Inspects an environment variable at compile time. eprint Prints to the standard error. eprintln Prints to the standard error, with a newline. file Expands to the file name in which it was invoked. format Creates a String using interpolation of runtime expressions. format_ args Constructs parameters for the other string-formatting macros. include Parses a file as an expression or an item according to the context. include_ bytes Includes a file as a reference to a byte array. include_ str Includes a UTF-8 encoded file as a string. is_ x86_ feature_ detected A macro to test at runtime whether a CPU feature is available on x86/x86-64 platforms. line Expands to the line number on which it was invoked. matches Returns whether the given expression matches the provided pattern. module_ path Expands to a string that represents the current module path. option_ env Optionally inspects an environment variable at compile time. panic Panics the current thread. print Prints to the standard output. println Prints to the standard output, with a newline. stringify Stringifies its arguments. thread_ local Declare a new thread local storage key of type std::thread::LocalKey . todo Indicates unfinished code. try Deprecated Unwraps a result or propagates its error. unimplemented Indicates unimplemented code by panicking with a message of “not implemented”. unreachable Indicates unreachable code. vec Creates a Vec containing the arguments. write Writes formatted data into a buffer. writeln Writes formatted data into a buffer, with a newline appended. cfg_ select Experimental Selects code at compile-time based on cfg predicates. concat_ bytes Experimental Concatenates literals into a byte slice. const_ format_ args Experimental Same as format_args , but can be used in some const contexts. log_ syntax Experimental Prints passed tokens into the standard output. trace_ macros Experimental Enables or disables tracing functionality used for debugging other macros. Keywords § SelfTy The implementing type within a trait or impl block, or the current type within a type definition. as Cast between types, rename an import, or qualify paths to associated items. async Returns a Future instead of blocking the current thread. await Suspend execution until the result of a Future is ready. become Perform a tail-call of a function. break Exit early from a loop or labelled block. const Compile-time constants, compile-time blocks, compile-time evaluable functions, and raw pointers. continue Skip to the next iteration of a loop. crate A Rust binary or library. dyn dyn is a prefix of a trait object ’s type. else What expression to evaluate when an if condition evaluates to false . enum A type that can be any one of several variants. extern Link to or import external code. false A value of type bool representing logical false . fn A function or function pointer. for Iteration with in , trait implementation with impl , or higher-ranked trait bounds ( for<'a> ). if Evaluate a block if a condition holds. impl Implementations of functionality for a type, or a type implementing some functionality. in Iterate over a series of values with for . let Bind a value to a variable. loop Loop indefinitely. match Control flow based on pattern matching. mod Organize code into modules . move Capture a closure ’s environment by value. mut A mutable variable, reference, or pointer. pub Make an item visible to others. ref Bind by reference during pattern matching. return Returns a value from a function. self The receiver of a method, or the current module. static A static item is a value which is valid for the entire duration of your program (a 'static lifetime). struct A type that is composed of other types. super The parent of the current module . trait A common interface for a group of types. true A value of type bool representing logical true . type Define an alias for an existing type. union The Rust equivalent of a C-style union . unsafe Code or interfaces whose memory safety cannot be verified by the type system. use Import or rename items from other crates or modules, use values under ergonomic clones semantic, or specify precise capturing with use<..> . where Add constraints that must be upheld to use an item. while Loop while a condition is upheld. | 2026-01-13T09:29:13 |
https://docs.rs/reqwest/0.7.2/reqwest/struct.Error.html#method.get_ref | reqwest::Error - Rust Docs.rs reqwest-0.7.2 reqwest 0.7.2 Docs.rs crate page MIT / Apache-2.0 Links Repository crates.io Source Owners seanmonstar Dependencies log ^0.3 normal native-tls ^0.1.3 normal tokio-tls ^0.1 normal tokio-core ^0.1.6 normal futures ^0.1.14 normal libflate ^0.1.5 normal url ^1.2 normal serde_json ^1.0 normal bytes ^0.4 normal hyper ^0.11 normal hyper-tls ^0.1.2 normal serde ^1.0 normal tokio-io ^0.1 normal serde_urlencoded ^0.5 normal error-chain ^0.10 normal env_logger ^0.4 normal serde_derive ^1.0 normal Versions Go to latest version Platform i686-apple-darwin i686-pc-windows-gnu i686-pc-windows-msvc x86_64-apple-darwin x86_64-pc-windows-gnu x86_64-pc-windows-msvc x86_64-unknown-linux-gnu Feature flags docs.rs About docs.rs Badges Builds Metadata Shorthand URLs Download Rustdoc JSON Build queue Privacy policy Rust Rust website The Book Standard Library API Reference Rust by Example The Cargo Guide Clippy Documentation This old browser is unsupported and will most likely display funky things. Struct Error Methods Trait Implementations reqwest Struct reqwest :: Error [ − ] [src] pub struct Error { /* fields omitted */ } The Errors that may occur when processing a Request . Examples #[ macro_use ] extern crate serde_derive ; extern crate reqwest ; #[ derive ( Deserialize )] struct Simple { key : String } fn run () { match make_request () { Err ( e ) => handler ( e ), Ok (_) => return , } } // Response is not a json object conforming to the Simple struct fn make_request () -> Result < Simple , reqwest :: Error > { reqwest :: get ( "http://httpbin.org/ip" ) ? . json () } fn handler ( e : reqwest :: Error ) { if e . is_http () { match e . url () { None => println ! ( "No Url given" ), Some ( url ) => println ! ( "Problem making request to: {}" , url ), } } // Inspect the internal error and output it if e . is_serialization () { let serde_error = match e . get_ref () { None => return , Some ( err ) => err , }; println ! ( "problem parsing information {}" , serde_error ); } if e . is_redirect () { println ! ( "server redirecting too many times or making loop" ); } } Methods impl Error [src] fn url (&self) -> Option <& Url > Returns a possible URL related to this error. Examples // displays last stop of a redirect loop let response = reqwest :: get ( "http://site.with.redirect.loop" ); if let Err ( e ) = response { if e . is_redirect () { if let Some ( final_stop ) = e . url () { println ! ( "redirect loop at {}" , final_stop ); } } } fn get_ref (&self) -> Option <&( StdError + Send + Sync + 'static)> Returns a reference to the internal error, if available. The 'static bounds allows using downcast_ref to check the details of the error. Examples extern crate url ; // retries requests with no host on localhost let invalid_request = "http://" ; let mut response = reqwest :: get ( invalid_request ); if let Err ( e ) = response { match e . get_ref (). and_then ( | e | e . downcast_ref :: < url :: ParseError > ()) { Some ( & url :: ParseError :: EmptyHost ) => { let valid_request = format ! ( "{}{}" , invalid_request , "localhost" ); response = reqwest :: get ( & valid_request ); }, _ => (), } } fn is_http (&self) -> bool Returns true if the error is related to HTTP. fn is_serialization (&self) -> bool Returns true if the error is serialization related. fn is_redirect (&self) -> bool Returns true if the error is from a RedirectPolicy . fn is_client_error (&self) -> bool Returns true if the error is from a request returning a 4xx error. fn is_server_error (&self) -> bool Returns true if the error is from a request returning a 5xx error. fn status (&self) -> Option < StatusCode > Returns the status code, if the error was generated from a response. Trait Implementations impl Debug for Error [src] fn fmt (&self, __arg_0: &mut Formatter ) -> Result Formats the value using the given formatter. impl Display for Error [src] fn fmt (&self, f: &mut Formatter ) -> Result Formats the value using the given formatter. Read more impl StdError for Error [src] fn description (&self) -> & str A short description of the error. Read more fn cause (&self) -> Option <& StdError > The lower-level cause of this error, if any. Read more Help Keyboard Shortcuts ? Show this help dialog S Focus the search field ⇤ Move up in search results ⇥ Move down in search results ⏎ Go to active search result + Collapse/expand all sections Search Tricks Prefix searches with a type followed by a colon (e.g. fn: ) to restrict the search to a given type. Accepted types are: fn , mod , struct , enum , trait , type , macro , and const . Search functions by type signature (e.g. vec -> usize or * -> vec ) | 2026-01-13T09:29:13 |
https://vi-vn.facebook.com/login/?next=https%3A%2F%2Fl.facebook.com%2Fl.php%3Fu%3Dhttps%253A%252F%252Fwww.instagram.com%252F%26amp%253Bh%3DAT1ho_VP7aujGp5hB4ABLthmbsEWrryyldymj0vBdjJwyRf7zNOtfd1oG7waETjDOdLBwcZdBo3rgfTtglHDh6uX0PyAMCZgocf5nLGRtfjyQI5DR8xukPL7vIBSBrdeFJ7kQX0NDPsm3Epp | Facebook Facebook Email hoặc điện thoại Mật khẩu Bạn quên tài khoản ư? Tạo tài khoản mới Bạn tạm thời bị chặn Bạn tạm thời bị chặn Có vẻ như bạn đang dùng nhầm tính năng này do sử dụng quá nhanh. Bạn tạm thời đã bị chặn sử dụng nó. Back Tiếng Việt 한국어 English (US) Bahasa Indonesia ภาษาไทย Español 中文(简体) 日本語 Português (Brasil) Français (France) Deutsch Đăng ký Đăng nhập Messenger Facebook Lite Video Meta Pay Cửa hàng trên Meta Meta Quest Ray-Ban Meta Meta AI Nội dung khác do Meta AI tạo Instagram Threads Trung tâm thông tin bỏ phiếu Chính sách quyền riêng tư Trung tâm quyền riêng tư Giới thiệu Tạo quảng cáo Tạo Trang Nhà phát triển Tuyển dụng Cookie Lựa chọn quảng cáo Điều khoản Trợ giúp Tải thông tin liên hệ lên & đối tượng không phải người dùng Cài đặt Nhật ký hoạt động Meta © 2026 | 2026-01-13T09:29:13 |
https://doc.rust-lang.org/std/str/struct.ParseBoolError.html | ParseBoolError in std::str - Rust This old browser is unsupported and will most likely display funky things. ParseBoolError std 1.92.0 (ded5c06cf 2025-12-08) Parse Bool Error Trait Implementations Clone Debug Display Eq Error PartialEq StructuralPartialEq Auto Trait Implementations Freeze RefUnwindSafe Send Sync Unpin UnwindSafe Blanket Implementations Any Borrow<T> BorrowMut<T> CloneToUninit From<T> Into<U> ToOwned ToString TryFrom<U> TryInto<U> In std:: str std :: str Struct Parse Bool Error Copy item path 1.0.0 · Source #[non_exhaustive] pub struct ParseBoolError; Expand description An error returned when parsing a bool using from_str fails Trait Implementations § 1.0.0 · Source § impl Clone for ParseBoolError Source § fn clone (&self) -> ParseBoolError Returns a duplicate of the value. Read more 1.0.0 · Source § fn clone_from (&mut self, source: &Self) Performs copy-assignment from source . Read more 1.0.0 · Source § impl Debug for ParseBoolError Source § fn fmt (&self, f: &mut Formatter <'_>) -> Result < () , Error > Formats the value using the given formatter. Read more 1.0.0 · Source § impl Display for ParseBoolError Source § fn fmt (&self, f: &mut Formatter <'_>) -> Result < () , Error > Formats the value using the given formatter. Read more 1.0.0 · Source § impl Error for ParseBoolError 1.30.0 · Source § fn source (&self) -> Option <&(dyn Error + 'static)> Returns the lower-level source of this error, if any. Read more 1.0.0 · Source § fn description (&self) -> & str 👎 Deprecated since 1.42.0: use the Display impl or to_string() Read more 1.0.0 · Source § fn cause (&self) -> Option <&dyn Error > 👎 Deprecated since 1.33.0: replaced by Error::source, which can support downcasting Source § fn provide <'a>(&'a self, request: &mut Request <'a>) 🔬 This is a nightly-only experimental API. ( error_generic_member_access #99301 ) Provides type-based access to context intended for error reports. Read more 1.0.0 · Source § impl PartialEq for ParseBoolError Source § fn eq (&self, other: & ParseBoolError ) -> bool Tests for self and other values to be equal, and is used by == . 1.0.0 · Source § fn ne (&self, other: &Rhs ) -> bool Tests for != . The default implementation is almost always sufficient, and should not be overridden without very good reason. 1.0.0 · Source § impl Eq for ParseBoolError 1.0.0 · Source § impl StructuralPartialEq for ParseBoolError Auto Trait Implementations § § impl Freeze for ParseBoolError § impl RefUnwindSafe for ParseBoolError § impl Send for ParseBoolError § impl Sync for ParseBoolError § impl Unpin for ParseBoolError § impl UnwindSafe for ParseBoolError Blanket Implementations § Source § impl<T> Any for T where T: 'static + ? Sized , Source § fn type_id (&self) -> TypeId Gets the TypeId of self . Read more Source § impl<T> Borrow <T> for T where T: ? Sized , Source § fn borrow (&self) -> &T Immutably borrows from an owned value. Read more Source § impl<T> BorrowMut <T> for T where T: ? Sized , Source § fn borrow_mut (&mut self) -> &mut T Mutably borrows from an owned value. Read more Source § impl<T> CloneToUninit for T where T: Clone , Source § unsafe fn clone_to_uninit (&self, dest: *mut u8 ) 🔬 This is a nightly-only experimental API. ( clone_to_uninit #126799 ) Performs copy-assignment from self to dest . Read more Source § impl<T> From <T> for T Source § fn from (t: T) -> T Returns the argument unchanged. Source § impl<T, U> Into <U> for T where U: From <T>, Source § fn into (self) -> U Calls U::from(self) . That is, this conversion is whatever the implementation of From <T> for U chooses to do. Source § impl<T> ToOwned for T where T: Clone , Source § type Owned = T The resulting type after obtaining ownership. Source § fn to_owned (&self) -> T Creates owned data from borrowed data, usually by cloning. Read more Source § fn clone_into (&self, target: &mut T ) Uses borrowed data to replace owned data, usually by cloning. Read more Source § impl<T> ToString for T where T: Display + ? Sized , Source § fn to_string (&self) -> String Converts the given value to a String . Read more Source § impl<T, U> TryFrom <U> for T where U: Into <T>, Source § type Error = Infallible The type returned in the event of a conversion error. Source § fn try_from (value: U) -> Result <T, <T as TryFrom <U>>:: Error > Performs the conversion. Source § impl<T, U> TryInto <U> for T where U: TryFrom <T>, Source § type Error = <U as TryFrom <T>>:: Error The type returned in the event of a conversion error. Source § fn try_into (self) -> Result <U, <U as TryFrom <T>>:: Error > Performs the conversion. | 2026-01-13T09:29:13 |
https://rust-lang.github.io/api-guidelines/documentation.html#examples | Documentation - Rust API Guidelines About Checklist 1. Naming 2. Interoperability 3. Macros 4. Documentation 5. Predictability 6. Flexibility 7. Type safety 8. Dependability 9. Debuggability 10. Future proofing 11. Necessities External links Light (default) Rust Coal Navy Ayu Rust API Guidelines Documentation Crate level docs are thorough and include examples (C-CRATE-DOC) See RFC 1687 . All items have a rustdoc example (C-EXAMPLE) Every public module, trait, struct, enum, function, method, macro, and type definition should have an example that exercises the functionality. This guideline should be applied within reason. A link to an applicable example on another item may be sufficient. For example if exactly one function uses a particular type, it may be appropriate to write a single example on either the function or the type and link to it from the other. The purpose of an example is not always to show how to use the item. Readers can be expected to understand how to invoke functions, match on enums, and other fundamental tasks. Rather, an example is often intended to show why someone would want to use the item. // This would be a poor example of using clone(). It mechanically shows *how* to // call clone(), but does nothing to show *why* somebody would want this. fn main() { let hello = "hello"; hello.clone(); } Examples use ? , not try! , not unwrap (C-QUESTION-MARK) Like it or not, example code is often copied verbatim by users. Unwrapping an error should be a conscious decision that the user needs to make. A common way of structuring fallible example code is the following. The lines beginning with # are compiled by cargo test when building the example but will not appear in user-visible rustdoc. /// ```rust /// # use std::error::Error; /// # /// # fn main() -> Result<(), Box<dyn Error>> { /// your; /// example?; /// code; /// # /// # Ok(()) /// # } /// ``` Function docs include error, panic, and safety considerations (C-FAILURE) Error conditions should be documented in an "Errors" section. This applies to trait methods as well -- trait methods for which the implementation is allowed or expected to return an error should be documented with an "Errors" section. For example in the standard library, Some implementations of the std::io::Read::read trait method may return an error. /// Pull some bytes from this source into the specified buffer, returning /// how many bytes were read. /// /// ... lots more info ... /// /// # Errors /// /// If this function encounters any form of I/O or other error, an error /// variant will be returned. If an error is returned then it must be /// guaranteed that no bytes were read. Panic conditions should be documented in a "Panics" section. This applies to trait methods as well -- traits methods for which the implementation is allowed or expected to panic should be documented with a "Panics" section. In the standard library the Vec::insert method may panic. /// Inserts an element at position `index` within the vector, shifting all /// elements after it to the right. /// /// # Panics /// /// Panics if `index` is out of bounds. It is not necessary to document all conceivable panic cases, especially if the panic occurs in logic provided by the caller. For example documenting the Display panic in the following code seems excessive. But when in doubt, err on the side of documenting more panic cases. #![allow(unused)] fn main() { /// # Panics /// /// This function panics if `T`'s implementation of `Display` panics. pub fn print<T: Display>(t: T) { println!("{}", t.to_string()); } } Unsafe functions should be documented with a "Safety" section that explains all invariants that the caller is responsible for upholding to use the function correctly. The unsafe std::ptr::read requires the following of the caller. /// Reads the value from `src` without moving it. This leaves the /// memory in `src` unchanged. /// /// # Safety /// /// Beyond accepting a raw pointer, this is unsafe because it semantically /// moves the value out of `src` without preventing further usage of `src`. /// If `T` is not `Copy`, then care must be taken to ensure that the value at /// `src` is not used before the data is overwritten again (e.g. with `write`, /// `zero_memory`, or `copy_memory`). Note that `*src = foo` counts as a use /// because it will attempt to drop the value previously at `*src`. /// /// The pointer must be aligned; use `read_unaligned` if that is not the case. Prose contains hyperlinks to relevant things (C-LINK) Regular links can be added inline with the usual markdown syntax of [text](url) . Links to other types can be added by marking them with [`text`] , then adding the link target in a new line at the end of the docstring with [`text`]: <target> , where <target> is described below. Link targets to methods within the same type usually look like this: [`serialize_struct`]: #method.serialize_struct Link targets to other types usually look like this: [`Deserialize`]: trait.Deserialize.html Link targets may also point to a parent or child module: [`Value`]: ../enum.Value.html [`DeserializeOwned`]: de/trait.DeserializeOwned.html This guideline is officially recommended by RFC 1574 under the heading "Link all the things" . Cargo.toml includes all common metadata (C-METADATA) The [package] section of Cargo.toml should include the following values: authors description license repository keywords categories In addition, there are two optional metadata fields: documentation homepage By default, crates.io links to documentation for the crate on docs.rs . The documentation metadata only needs to be set if the documentation is hosted somewhere other than docs.rs , for example because the crate links against a shared library that is not available in the build environment of docs.rs . The homepage metadata should only be set if there is a unique website for the crate other than the source repository or API documentation. Do not make homepage redundant with either the documentation or repository values. For example, serde sets homepage to https://serde.rs , a dedicated website. Release notes document all significant changes (C-RELNOTES) Users of the crate can read the release notes to find a summary of what changed in each published release of the crate. A link to the release notes, or the notes themselves, should be included in the crate-level documentation and/or the repository linked in Cargo.toml. Breaking changes (as defined in RFC 1105 ) should be clearly identified in the release notes. If using Git to track the source of a crate, every release published to crates.io should have a corresponding tag identifying the commit that was published. A similar process should be used for non-Git VCS tools as well. # Tag the current commit GIT_COMMITTER_DATE=$(git log -n1 --pretty=%aD) git tag -a -m "Release 0.3.0" 0.3.0 git push --tags Annotated tags are preferred because some Git commands ignore unannotated tags if any annotated tags exist. Examples Serde 1.0.0 release notes Serde 0.9.8 release notes Serde 0.9.0 release notes Diesel change log Rustdoc does not show unhelpful implementation details (C-HIDDEN) Rustdoc is supposed to include everything users need to use the crate fully and nothing more. It is fine to explain relevant implementation details in prose but they should not be real entries in the documentation. Especially be selective about which impls are visible in rustdoc -- all the ones that users would need for using the crate fully, but no others. In the following code the rustdoc of PublicError by default would show the From<PrivateError> impl. We choose to hide it with #[doc(hidden)] because users can never have a PrivateError in their code so this impl would never be relevant to them. #![allow(unused)] fn main() { // This error type is returned to users. pub struct PublicError { /* ... */ } // This error type is returned by some private helper functions. struct PrivateError { /* ... */ } // Enable use of `?` operator. #[doc(hidden)] impl From<PrivateError> for PublicError { fn from(err: PrivateError) -> PublicError { /* ... */ } } } pub(crate) is another great tool for removing implementation details from the public API. It allows items to be used from outside of their own module but not outside of the same crate. | 2026-01-13T09:29:13 |
https://doc.rust-lang.org/cargo/commands/cargo-fix.html | cargo fix - The Cargo Book Keyboard shortcuts Press ← or → to navigate between chapters Press S or / to search in the book Press ? to show this help Press Esc to hide this help Auto Light Rust Coal Navy Ayu The Cargo Book cargo-fix(1) NAME cargo-fix — Automatically fix lint warnings reported by rustc SYNOPSIS cargo fix [ options ] DESCRIPTION This Cargo subcommand will automatically take rustc’s suggestions from diagnostics like warnings and apply them to your source code. This is intended to help automate tasks that rustc itself already knows how to tell you to fix! Executing cargo fix will under the hood execute cargo-check(1) . Any warnings applicable to your crate will be automatically fixed (if possible) and all remaining warnings will be displayed when the check process is finished. For example if you’d like to apply all fixes to the current package, you can run: cargo fix which behaves the same as cargo check --all-targets . cargo fix is only capable of fixing code that is normally compiled with cargo check . If code is conditionally enabled with optional features, you will need to enable those features for that code to be analyzed: cargo fix --features foo Similarly, other cfg expressions like platform-specific code will need to pass --target to fix code for the given target. cargo fix --target x86_64-pc-windows-gnu If you encounter any problems with cargo fix or otherwise have any questions or feature requests please don’t hesitate to file an issue at https://github.com/rust-lang/cargo . Edition migration The cargo fix subcommand can also be used to migrate a package from one edition to the next. The general procedure is: Run cargo fix --edition . Consider also using the --all-features flag if your project has multiple features. You may also want to run cargo fix --edition multiple times with different --target flags if your project has platform-specific code gated by cfg attributes. Modify Cargo.toml to set the edition field to the new edition. Run your project tests to verify that everything still works. If new warnings are issued, you may want to consider running cargo fix again (without the --edition flag) to apply any suggestions given by the compiler. And hopefully that’s it! Just keep in mind of the caveats mentioned above that cargo fix cannot update code for inactive features or cfg expressions. Also, in some rare cases the compiler is unable to automatically migrate all code to the new edition, and this may require manual changes after building with the new edition. OPTIONS Fix options --broken-code Fix code even if it already has compiler errors. This is useful if cargo fix fails to apply the changes. It will apply the changes and leave the broken code in the working directory for you to inspect and manually fix. --edition Apply changes that will update the code to the next edition. This will not update the edition in the Cargo.toml manifest, which must be updated manually after cargo fix --edition has finished. --edition-idioms Apply suggestions that will update code to the preferred style for the current edition. --allow-no-vcs Fix code even if a VCS was not detected. --allow-dirty Fix code even if the working directory has changes (including staged changes). --allow-staged Fix code even if the working directory has staged changes. Package Selection By default, when no package selection options are given, the packages selected depend on the selected manifest file (based on the current working directory if --manifest-path is not given). If the manifest is the root of a workspace then the workspaces default members are selected, otherwise only the package defined by the manifest will be selected. The default members of a workspace can be set explicitly with the workspace.default-members key in the root manifest. If this is not set, a virtual workspace will include all workspace members (equivalent to passing --workspace ), and a non-virtual workspace will include only the root crate itself. -p spec … --package spec … Fix only the specified packages. See cargo-pkgid(1) for the SPEC format. This flag may be specified multiple times and supports common Unix glob patterns like * , ? and [] . However, to avoid your shell accidentally expanding glob patterns before Cargo handles them, you must use single quotes or double quotes around each pattern. --workspace Fix all members in the workspace. --all Deprecated alias for --workspace . --exclude SPEC … Exclude the specified packages. Must be used in conjunction with the --workspace flag. This flag may be specified multiple times and supports common Unix glob patterns like * , ? and [] . However, to avoid your shell accidentally expanding glob patterns before Cargo handles them, you must use single quotes or double quotes around each pattern. Target Selection When no target selection options are given, cargo fix will fix all targets ( --all-targets implied). Binaries are skipped if they have required-features that are missing. Passing target selection flags will fix only the specified targets. Note that --bin , --example , --test and --bench flags also support common Unix glob patterns like * , ? and [] . However, to avoid your shell accidentally expanding glob patterns before Cargo handles them, you must use single quotes or double quotes around each glob pattern. --lib Fix the package’s library. --bin name … Fix the specified binary. This flag may be specified multiple times and supports common Unix glob patterns. --bins Fix all binary targets. --example name … Fix the specified example. This flag may be specified multiple times and supports common Unix glob patterns. --examples Fix all example targets. --test name … Fix the specified integration test. This flag may be specified multiple times and supports common Unix glob patterns. --tests Fix all targets that have the test = true manifest flag set. By default this includes the library and binaries built as unittests, and integration tests. Be aware that this will also build any required dependencies, so the lib target may be built twice (once as a unittest, and once as a dependency for binaries, integration tests, etc.). Targets may be enabled or disabled by setting the test flag in the manifest settings for the target. --bench name … Fix the specified benchmark. This flag may be specified multiple times and supports common Unix glob patterns. --benches Fix all targets that have the bench = true manifest flag set. By default this includes the library and binaries built as benchmarks, and bench targets. Be aware that this will also build any required dependencies, so the lib target may be built twice (once as a benchmark, and once as a dependency for binaries, benchmarks, etc.). Targets may be enabled or disabled by setting the bench flag in the manifest settings for the target. --all-targets Fix all targets. This is equivalent to specifying --lib --bins --tests --benches --examples . Feature Selection The feature flags allow you to control which features are enabled. When no feature options are given, the default feature is activated for every selected package. See the features documentation for more details. -F features --features features Space or comma separated list of features to activate. Features of workspace members may be enabled with package-name/feature-name syntax. This flag may be specified multiple times, which enables all specified features. --all-features Activate all available features of all selected packages. --no-default-features Do not activate the default feature of the selected packages. Compilation Options --target triple Fix for the specified target architecture. Flag may be specified multiple times. The default is the host architecture. The general format of the triple is <arch><sub>-<vendor>-<sys>-<abi> . Possible values: Any supported target in rustc --print target-list . "host-tuple" , which will internally be substituted by the host’s target. This can be particularly useful if you’re cross-compiling some crates, and don’t want to specify your host’s machine as a target (for instance, an xtask in a shared project that may be worked on by many hosts). A path to a custom target specification. See Custom Target Lookup Path for more information. This may also be specified with the build.target config value . Note that specifying this flag makes Cargo run in a different mode where the target artifacts are placed in a separate directory. See the build cache documentation for more details. -r --release Fix optimized artifacts with the release profile. See also the --profile option for choosing a specific profile by name. --profile name Fix with the given profile. As a special case, specifying the test profile will also enable checking in test mode which will enable checking tests and enable the test cfg option. See rustc tests for more detail. See the reference for more details on profiles. --timings= fmts Output information how long each compilation takes, and track concurrency information over time. Accepts an optional comma-separated list of output formats; --timings without an argument will default to --timings=html . Specifying an output format (rather than the default) is unstable and requires -Zunstable-options . Valid output formats: html (unstable, requires -Zunstable-options ): Write a human-readable file cargo-timing.html to the target/cargo-timings directory with a report of the compilation. Also write a report to the same directory with a timestamp in the filename if you want to look at older runs. HTML output is suitable for human consumption only, and does not provide machine-readable timing data. json (unstable, requires -Zunstable-options ): Emit machine-readable JSON information about timing information. Output Options --target-dir directory Directory for all generated artifacts and intermediate files. May also be specified with the CARGO_TARGET_DIR environment variable, or the build.target-dir config value . Defaults to target in the root of the workspace. Display Options -v --verbose Use verbose output. May be specified twice for “very verbose” output which includes extra output such as dependency warnings and build script output. May also be specified with the term.verbose config value . -q --quiet Do not print cargo log messages. May also be specified with the term.quiet config value . --color when Control when colored output is used. Valid values: auto (default): Automatically detect if color support is available on the terminal. always : Always display colors. never : Never display colors. May also be specified with the term.color config value . --message-format fmt The output format for diagnostic messages. Can be specified multiple times and consists of comma-separated values. Valid values: human (default): Display in a human-readable text format. Conflicts with short and json . short : Emit shorter, human-readable text messages. Conflicts with human and json . json : Emit JSON messages to stdout. See the reference for more details. Conflicts with human and short . json-diagnostic-short : Ensure the rendered field of JSON messages contains the “short” rendering from rustc. Cannot be used with human or short . json-diagnostic-rendered-ansi : Ensure the rendered field of JSON messages contains embedded ANSI color codes for respecting rustc’s default color scheme. Cannot be used with human or short . json-render-diagnostics : Instruct Cargo to not include rustc diagnostics in JSON messages printed, but instead Cargo itself should render the JSON diagnostics coming from rustc. Cargo’s own JSON diagnostics and others coming from rustc are still emitted. Cannot be used with human or short . Manifest Options --manifest-path path Path to the Cargo.toml file. By default, Cargo searches for the Cargo.toml file in the current directory or any parent directory. --ignore-rust-version Ignore rust-version specification in packages. --locked Asserts that the exact same dependencies and versions are used as when the existing Cargo.lock file was originally generated. Cargo will exit with an error when either of the following scenarios arises: The lock file is missing. Cargo attempted to change the lock file due to a different dependency resolution. It may be used in environments where deterministic builds are desired, such as in CI pipelines. --offline Prevents Cargo from accessing the network for any reason. Without this flag, Cargo will stop with an error if it needs to access the network and the network is not available. With this flag, Cargo will attempt to proceed without the network if possible. Beware that this may result in different dependency resolution than online mode. Cargo will restrict itself to crates that are downloaded locally, even if there might be a newer version as indicated in the local copy of the index. See the cargo-fetch(1) command to download dependencies before going offline. May also be specified with the net.offline config value . --frozen Equivalent to specifying both --locked and --offline . --lockfile-path PATH Changes the path of the lockfile from the default ( <workspace_root>/Cargo.lock ) to PATH . PATH must end with Cargo.lock (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock ). Note that providing --lockfile-path will ignore existing lockfile at the default path, and instead will either use the lockfile from PATH , or write a new lockfile into the provided PATH if it doesn’t exist. This flag can be used to run most commands in read-only directories, writing lockfile into the provided PATH . This option is only available on the nightly channel and requires the -Z unstable-options flag to enable (see #14421 ). Common Options + toolchain If Cargo has been installed with rustup, and the first argument to cargo begins with + , it will be interpreted as a rustup toolchain name (such as +stable or +nightly ). See the rustup documentation for more information about how toolchain overrides work. --config KEY=VALUE or PATH Overrides a Cargo configuration value. The argument should be in TOML syntax of KEY=VALUE , or provided as a path to an extra configuration file. This flag may be specified multiple times. See the command-line overrides section for more information. -C PATH Changes the current working directory before executing any specified operations. This affects things like where cargo looks by default for the project manifest ( Cargo.toml ), as well as the directories searched for discovering .cargo/config.toml , for example. This option must appear before the command name, for example cargo -C path/to/my-project build . This option is only available on the nightly channel and requires the -Z unstable-options flag to enable (see #10098 ). -h --help Prints help information. -Z flag Unstable (nightly-only) flags to Cargo. Run cargo -Z help for details. Miscellaneous Options -j N --jobs N Number of parallel jobs to run. May also be specified with the build.jobs config value . Defaults to the number of logical CPUs. If negative, it sets the maximum number of parallel jobs to the number of logical CPUs plus provided value. If a string default is provided, it sets the value back to defaults. Should not be 0. --keep-going Build as many crates in the dependency graph as possible, rather than aborting the build on the first one that fails to build. For example if the current package depends on dependencies fails and works , one of which fails to build, cargo fix -j1 may or may not build the one that succeeds (depending on which one of the two builds Cargo picked to run first), whereas cargo fix -j1 --keep-going would definitely run both builds, even if the one run first fails. ENVIRONMENT See the reference for details on environment variables that Cargo reads. EXIT STATUS 0 : Cargo succeeded. 101 : Cargo failed to complete. EXAMPLES Apply compiler suggestions to the local package: cargo fix Update a package to prepare it for the next edition: cargo fix --edition Apply suggested idioms for the current edition: cargo fix --edition-idioms SEE ALSO cargo(1) , cargo-check(1) | 2026-01-13T09:29:13 |
https://doc.rust-lang.org/cargo/reference/profiles.html#profiles | Profiles - The Cargo Book Keyboard shortcuts Press ← or → to navigate between chapters Press S or / to search in the book Press ? to show this help Press Esc to hide this help Auto Light Rust Coal Navy Ayu The Cargo Book Profiles Profiles provide a way to alter the compiler settings, influencing things like optimizations and debugging symbols. Cargo has 4 built-in profiles: dev , release , test , and bench . The profile is automatically chosen based on which command is being run if a profile is not specified on the command-line. In addition to the built-in profiles, custom user-defined profiles can also be specified. Profile settings can be changed in Cargo.toml with the [profile] table. Within each named profile, individual settings can be changed with key/value pairs like this: [profile.dev] opt-level = 1 # Use slightly better optimizations. overflow-checks = false # Disable integer overflow checks. Cargo only looks at the profile settings in the Cargo.toml manifest at the root of the workspace. Profile settings defined in dependencies will be ignored. Additionally, profiles can be overridden from a config definition. Specifying a profile in a config file or environment variable will override the settings from Cargo.toml . Profile settings The following is a list of settings that can be controlled in a profile. opt-level The opt-level setting controls the -C opt-level flag which controls the level of optimization. Higher optimization levels may produce faster runtime code at the expense of longer compiler times. Higher levels may also change and rearrange the compiled code which may make it harder to use with a debugger. The valid options are: 0 : no optimizations 1 : basic optimizations 2 : some optimizations 3 : all optimizations "s" : optimize for binary size "z" : optimize for binary size, but also turn off loop vectorization. It is recommended to experiment with different levels to find the right balance for your project. There may be surprising results, such as level 3 being slower than 2 , or the "s" and "z" levels not being necessarily smaller. You may also want to reevaluate your settings over time as newer versions of rustc change optimization behavior. See also Profile Guided Optimization for more advanced optimization techniques. debug The debug setting controls the -C debuginfo flag which controls the amount of debug information included in the compiled binary. The valid options are: 0 , false , or "none" : no debug info at all, default for release "line-directives-only" : line info directives only. For the nvptx* targets this enables profiling . For other use cases, line-tables-only is the better, more compatible choice. "line-tables-only" : line tables only. Generates the minimal amount of debug info for backtraces with filename/line number info, but not anything else, i.e. no variable or function parameter info. 1 or "limited" : debug info without type or variable-level information. Generates more detailed module-level info than line-tables-only . 2 , true , or "full" : full debug info, default for dev For more information on what each option does see rustc ’s docs on debuginfo . You may wish to also configure the split-debuginfo option depending on your needs as well. MSRV: 1.71 is required for none , limited , full , line-directives-only , and line-tables-only split-debuginfo The split-debuginfo setting controls the -C split-debuginfo flag which controls whether debug information, if generated, is either placed in the executable itself or adjacent to it. This option is a string and acceptable values are the same as those the compiler accepts . The default value for this option is unpacked on macOS for profiles that have debug information otherwise enabled. Otherwise the default for this option is documented with rustc and is platform-specific. Some options are only available on the nightly channel . The Cargo default may change in the future once more testing has been performed, and support for DWARF is stabilized. Be aware that Cargo and rustc have different defaults for this option. This option exists to allow Cargo to experiment on different combinations of flags thus providing better debugging and developer experience. strip The strip option controls the -C strip flag , which directs rustc to strip either symbols or debuginfo from a binary. This can be enabled like so: [package] # ... [profile.release] strip = "debuginfo" Possible string values of strip are "none" , "debuginfo" , and "symbols" . The default is "none" . You can also configure this option with the boolean values true or false . strip = true is equivalent to strip = "symbols" . strip = false is equivalent to strip = "none" and disables strip completely. debug-assertions The debug-assertions setting controls the -C debug-assertions flag which turns cfg(debug_assertions) conditional compilation on or off. Debug assertions are intended to include runtime validation which is only available in debug/development builds. These may be things that are too expensive or otherwise undesirable in a release build. Debug assertions enables the debug_assert! macro in the standard library. The valid options are: true : enabled false : disabled overflow-checks The overflow-checks setting controls the -C overflow-checks flag which controls the behavior of runtime integer overflow . When overflow-checks are enabled, a panic will occur on overflow. The valid options are: true : enabled false : disabled lto The lto setting controls rustc ’s -C lto , -C linker-plugin-lto , and -C embed-bitcode options, which control LLVM’s link time optimizations . LTO can produce better optimized code, using whole-program analysis, at the cost of longer linking time. The valid options are: true or "fat" : Performs “fat” LTO which attempts to perform optimizations across all crates within the dependency graph. "thin" : Performs “thin” LTO . This is similar to “fat”, but takes substantially less time to run while still achieving performance gains similar to “fat”. false : Performs “thin local LTO” which performs “thin” LTO on the local crate only across its codegen units . No LTO is performed if codegen units is 1 or opt-level is 0. "off" : Disables LTO. See the linker-plugin-lto chapter if you are interested in cross-language LTO. This is not yet supported natively in Cargo, but can be performed via RUSTFLAGS . panic The panic setting controls the -C panic flag which controls which panic strategy to use. The valid options are: "unwind" : Unwind the stack upon panic. "abort" : Terminate the process upon panic. When set to "unwind" , the actual value depends on the default of the target platform. For example, the NVPTX platform does not support unwinding, so it always uses "abort" . Tests, benchmarks, build scripts, and proc macros ignore the panic setting. The rustc test harness currently requires unwind behavior. See the panic-abort-tests unstable flag which enables abort behavior. Additionally, when using the abort strategy and building a test, all of the dependencies will also be forced to build with the unwind strategy. incremental The incremental setting controls the -C incremental flag which controls whether or not incremental compilation is enabled. Incremental compilation causes rustc to save additional information to disk which will be reused when recompiling the crate, improving re-compile times. The additional information is stored in the target directory. The valid options are: true : enabled false : disabled Incremental compilation is only used for workspace members and “path” dependencies. The incremental value can be overridden globally with the CARGO_INCREMENTAL environment variable or the build.incremental config variable. codegen-units The codegen-units setting controls the -C codegen-units flag which controls how many “code generation units” a crate will be split into. More code generation units allows more of a crate to be processed in parallel possibly reducing compile time, but may produce slower code. This option takes an integer greater than 0. The default is 256 for incremental builds, and 16 for non-incremental builds. rpath The rpath setting controls the -C rpath flag which controls whether or not rpath is enabled. Default profiles dev The dev profile is used for normal development and debugging. It is the default for build commands like cargo build , and is used for cargo install --debug . The default settings for the dev profile are: [profile.dev] opt-level = 0 debug = true split-debuginfo = '...' # Platform-specific. strip = "none" debug-assertions = true overflow-checks = true lto = false panic = 'unwind' incremental = true codegen-units = 256 rpath = false release The release profile is intended for optimized artifacts used for releases and in production. This profile is used when the --release flag is used, and is the default for cargo install . The default settings for the release profile are: [profile.release] opt-level = 3 debug = false split-debuginfo = '...' # Platform-specific. strip = "none" debug-assertions = false overflow-checks = false lto = false panic = 'unwind' incremental = false codegen-units = 16 rpath = false test The test profile is the default profile used by cargo test . The test profile inherits the settings from the dev profile. bench The bench profile is the default profile used by cargo bench . The bench profile inherits the settings from the release profile. Build Dependencies To compile quickly, all profiles, by default, do not optimize build dependencies (build scripts, proc macros, and their dependencies), and avoid computing debug info when a build dependency is not used as a runtime dependency. The default settings for build overrides are: [profile.dev.build-override] opt-level = 0 codegen-units = 256 debug = false # when possible [profile.release.build-override] opt-level = 0 codegen-units = 256 However, if errors occur while running build dependencies, turning full debug info on will improve backtraces and debuggability when needed: debug = true Build dependencies otherwise inherit settings from the active profile in use, as described in Profile selection . Custom profiles In addition to the built-in profiles, additional custom profiles can be defined. These may be useful for setting up multiple workflows and build modes. When defining a custom profile, you must specify the inherits key to specify which profile the custom profile inherits settings from when the setting is not specified. For example, let’s say you want to compare a normal release build with a release build with LTO optimizations, you can specify something like the following in Cargo.toml : [profile.release-lto] inherits = "release" lto = true The --profile flag can then be used to choose this custom profile: cargo build --profile release-lto The output for each profile will be placed in a directory of the same name as the profile in the target directory . As in the example above, the output would go into the target/release-lto directory. Profile selection The profile used depends on the command, the command-line flags like --release or --profile , and the package (in the case of overrides ). The default profile if none is specified is: Command Default Profile cargo run , cargo build , cargo check , cargo rustc dev profile cargo test test profile cargo bench bench profile cargo install release profile You can switch to a different profile using the --profile=NAME option which will used the given profile. The --release flag is equivalent to --profile=release . The selected profile applies to all Cargo targets, including library , binary , example , test , and benchmark . The profile for specific packages can be specified with overrides , described below. Overrides Profile settings can be overridden for specific packages and build-time crates. To override the settings for a specific package, use the package table to change the settings for the named package: # The `foo` package will use the -Copt-level=3 flag. [profile.dev.package.foo] opt-level = 3 The package name is actually a Package ID Spec , so you can target individual versions of a package with syntax such as [profile.dev.package."foo:2.1.0"] . To override the settings for all dependencies (but not any workspace member), use the "*" package name: # Set the default for dependencies. [profile.dev.package."*"] opt-level = 2 To override the settings for build scripts, proc macros, and their dependencies, use the build-override table: # Set the settings for build scripts and proc-macros. [profile.dev.build-override] opt-level = 3 Note: When a dependency is both a normal dependency and a build dependency, Cargo will try to only build it once when --target is not specified. When using build-override , the dependency may need to be built twice, once as a normal dependency and once with the overridden build settings. This may increase initial build times. The precedence for which value is used is done in the following order (first match wins): [profile.dev.package.name] — A named package. [profile.dev.package."*"] — For any non-workspace member. [profile.dev.build-override] — Only for build scripts, proc macros, and their dependencies. [profile.dev] — Settings in Cargo.toml . Default values built-in to Cargo. Overrides cannot specify the panic , lto , or rpath settings. Overrides and generics The location where generic code is instantiated will influence the optimization settings used for that generic code. This can cause subtle interactions when using profile overrides to change the optimization level of a specific crate. If you attempt to raise the optimization level of a dependency which defines generic functions, those generic functions may not be optimized when used in your local crate. This is because the code may be generated in the crate where it is instantiated, and thus may use the optimization settings of that crate. For example, nalgebra is a library which defines vectors and matrices making heavy use of generic parameters. If your local code defines concrete nalgebra types like Vector4<f64> and uses their methods, the corresponding nalgebra code will be instantiated and built within your crate. Thus, if you attempt to increase the optimization level of nalgebra using a profile override, it may not result in faster performance. Further complicating the issue, rustc has some optimizations where it will attempt to share monomorphized generics between crates. If the opt-level is 2 or 3, then a crate will not use monomorphized generics from other crates, nor will it export locally defined monomorphized items to be shared with other crates. When experimenting with optimizing dependencies for development, consider trying opt-level 1, which will apply some optimizations while still allowing monomorphized items to be shared. | 2026-01-13T09:29:13 |
https://doc.rust-lang.org/reference/paths.html#grammar-SimplePath | Paths - The Rust Reference Keyboard shortcuts Press ← or → to navigate between chapters Press S or / to search in the book Press ? to show this help Press Esc to hide this help Auto Light Rust Coal Navy Ayu The Rust Reference [paths] Paths [paths .intro] A path is a sequence of one or more path segments separated by :: tokens. Paths are used to refer to items , values, types , macros , and attributes . Two examples of simple paths consisting of only identifier segments: x; x::y::z; Types of paths [paths .simple] Simple paths [paths .simple .syntax] Syntax SimplePath → :: ? SimplePathSegment ( :: SimplePathSegment ) * SimplePathSegment → IDENTIFIER | super | self | crate | $crate Show Railroad SimplePath :: SimplePathSegment :: SimplePathSegment SimplePathSegment IDENTIFIER super self crate $crate [paths .simple .intro] Simple paths are used in visibility markers, attributes , macros , and use items. For example: #![allow(unused)] fn main() { use std::io::{self, Write}; mod m { #[clippy::cyclomatic_complexity = "0"] pub (in super) fn f1() {} } } [paths .expr] Paths in expressions [paths .expr .syntax] Syntax PathInExpression → :: ? PathExprSegment ( :: PathExprSegment ) * PathExprSegment → PathIdentSegment ( :: GenericArgs ) ? PathIdentSegment → IDENTIFIER | super | self | Self | crate | $crate GenericArgs → < > | < ( GenericArg , ) * GenericArg , ? > GenericArg → Lifetime | Type | GenericArgsConst | GenericArgsBinding | GenericArgsBounds GenericArgsConst → BlockExpression | LiteralExpression | - LiteralExpression | SimplePathSegment GenericArgsBinding → IDENTIFIER GenericArgs ? = Type GenericArgsBounds → IDENTIFIER GenericArgs ? : TypeParamBounds Show Railroad PathInExpression :: PathExprSegment :: PathExprSegment PathExprSegment PathIdentSegment :: GenericArgs PathIdentSegment IDENTIFIER super self Self crate $crate GenericArgs < > < GenericArg , GenericArg , > GenericArg Lifetime Type GenericArgsConst GenericArgsBinding GenericArgsBounds GenericArgsConst BlockExpression LiteralExpression - LiteralExpression SimplePathSegment GenericArgsBinding IDENTIFIER GenericArgs = Type GenericArgsBounds IDENTIFIER GenericArgs : TypeParamBounds [paths .expr .intro] Paths in expressions allow for paths with generic arguments to be specified. They are used in various places in expressions and patterns . [paths .expr .turbofish] The :: token is required before the opening < for generic arguments to avoid ambiguity with the less-than operator. This is colloquially known as “turbofish” syntax. #![allow(unused)] fn main() { (0..10).collect::<Vec<_>>(); Vec::<u8>::with_capacity(1024); } [paths .expr .argument-order] The order of generic arguments is restricted to lifetime arguments, then type arguments, then const arguments, then equality constraints. [paths .expr .complex-const-params] Const arguments must be surrounded by braces unless they are a literal , an inferred const , or a single segment path. An inferred const may not be surrounded by braces. #![allow(unused)] fn main() { mod m { pub const C: usize = 1; } const C: usize = m::C; fn f<const N: usize>() -> [u8; N] { [0; N] } let _ = f::<1>(); // Literal. let _: [_; 1] = f::<_>(); // Inferred const. let _: [_; 1] = f::<(((_)))>(); // Inferred const. let _ = f::<C>(); // Single segment path. let _ = f::<{ m::C }>(); // Multi-segment path must be braced. } #![allow(unused)] fn main() { fn f<const N: usize>() -> [u8; N] { [0; _] } let _: [_; 1] = f::<{ _ }>(); // ^ ERROR `_` not allowed here } Note In a generic argument list, an inferred const is parsed as an inferred type but then semantically treated as a separate kind of const generic argument . [paths .expr .impl-trait-params] The synthetic type parameters corresponding to impl Trait types are implicit, and these cannot be explicitly specified. [paths .qualified] Qualified paths [paths .qualified .syntax] Syntax QualifiedPathInExpression → QualifiedPathType ( :: PathExprSegment ) + QualifiedPathType → < Type ( as TypePath ) ? > QualifiedPathInType → QualifiedPathType ( :: TypePathSegment ) + Show Railroad QualifiedPathInExpression QualifiedPathType :: PathExprSegment QualifiedPathType < Type as TypePath > QualifiedPathInType QualifiedPathType :: TypePathSegment [paths .qualified .intro] Fully qualified paths allow for disambiguating the path for trait implementations and for specifying canonical paths . When used in a type specification, it supports using the type syntax specified below. #![allow(unused)] fn main() { struct S; impl S { fn f() { println!("S"); } } trait T1 { fn f() { println!("T1 f"); } } impl T1 for S {} trait T2 { fn f() { println!("T2 f"); } } impl T2 for S {} S::f(); // Calls the inherent impl. <S as T1>::f(); // Calls the T1 trait function. <S as T2>::f(); // Calls the T2 trait function. } [paths .type] Paths in types [paths .type .syntax] Syntax TypePath → :: ? TypePathSegment ( :: TypePathSegment ) * TypePathSegment → PathIdentSegment ( :: ? ( GenericArgs | TypePathFn ) ) ? TypePathFn → ( TypePathFnInputs ? ) ( -> TypeNoBounds ) ? TypePathFnInputs → Type ( , Type ) * , ? Show Railroad TypePath :: TypePathSegment :: TypePathSegment TypePathSegment PathIdentSegment :: GenericArgs TypePathFn TypePathFn ( TypePathFnInputs ) -> TypeNoBounds TypePathFnInputs Type , Type , [paths .type .intro] Type paths are used within type definitions, trait bounds, type parameter bounds, and qualified paths. [paths .type .turbofish] Although the :: token is allowed before the generics arguments, it is not required because there is no ambiguity like there is in PathInExpression . #![allow(unused)] fn main() { mod ops { pub struct Range<T> {f1: T} pub trait Index<T> {} pub struct Example<'a> {f1: &'a i32} } struct S; impl ops::Index<ops::Range<usize>> for S { /*...*/ } fn i<'a>() -> impl Iterator<Item = ops::Example<'a>> { // ... const EXAMPLE: Vec<ops::Example<'static>> = Vec::new(); EXAMPLE.into_iter() } type G = std::boxed::Box<dyn std::ops::FnOnce(isize) -> isize>; } [paths .qualifiers] Path qualifiers Paths can be denoted with various leading qualifiers to change the meaning of how it is resolved. [paths .qualifiers .global-root] :: [paths .qualifiers .global-root .intro] Paths starting with :: are considered to be global paths where the segments of the path start being resolved from a place which differs based on edition. Each identifier in the path must resolve to an item. [paths .qualifiers .global-root .edition2018] 2018 Edition differences In the 2015 Edition, identifiers resolve from the “crate root” ( crate:: in the 2018 edition), which contains a variety of different items, including external crates, default crates such as std or core , and items in the top level of the crate (including use imports). Beginning with the 2018 Edition, paths starting with :: resolve from crates in the extern prelude . That is, they must be followed by the name of a crate. #![allow(unused)] fn main() { pub fn foo() { // In the 2018 edition, this accesses `std` via the extern prelude. // In the 2015 edition, this accesses `std` via the crate root. let now = ::std::time::Instant::now(); println!("{:?}", now); } } // 2015 Edition mod a { pub fn foo() {} } mod b { pub fn foo() { ::a::foo(); // call `a`'s foo function // In Rust 2018, `::a` would be interpreted as the crate `a`. } } fn main() {} [paths .qualifiers .mod-self] self [paths .qualifiers .mod-self .intro] self resolves the path relative to the current module. [paths .qualifiers .mod-self .restriction] self can only be used as the first segment, without a preceding :: . [paths .qualifiers .self-pat] In a method body, a path which consists of a single self segment resolves to the method’s self parameter. fn foo() {} fn bar() { self::foo(); } struct S(bool); impl S { fn baz(self) { self.0; } } fn main() {} [paths .qualifiers .type-self] Self [paths .qualifiers .type-self .intro] Self , with a capital “S”, is used to refer to the current type being implemented or defined. It may be used in the following situations: [paths .qualifiers .type-self .trait] In a trait definition, it refers to the type implementing the trait. [paths .qualifiers .type-self .impl] In an implementation , it refers to the type being implemented. When implementing a tuple or unit struct , it also refers to the constructor in the value namespace . [paths .qualifiers .type-self .type] In the definition of a struct , enumeration , or union , it refers to the type being defined. The definition is not allowed to be infinitely recursive (there must be an indirection). [paths .qualifiers .type-self .scope] The scope of Self behaves similarly to a generic parameter; see the Self scope section for more details. [paths .qualifiers .type-self .allowed-positions] Self can only be used as the first segment, without a preceding :: . [paths .qualifiers .type-self .no-generics] The Self path cannot include generic arguments (as in Self::<i32> ). #![allow(unused)] fn main() { trait T { type Item; const C: i32; // `Self` will be whatever type that implements `T`. fn new() -> Self; // `Self::Item` will be the type alias in the implementation. fn f(&self) -> Self::Item; } struct S; impl T for S { type Item = i32; const C: i32 = 9; fn new() -> Self { // `Self` is the type `S`. S } fn f(&self) -> Self::Item { // `Self::Item` is the type `i32`. Self::C // `Self::C` is the constant value `9`. } } // `Self` is in scope within the generics of a trait definition, // to refer to the type being defined. trait Add<Rhs = Self> { type Output; // `Self` can also reference associated items of the // type being implemented. fn add(self, rhs: Rhs) -> Self::Output; } struct NonEmptyList<T> { head: T, // A struct can reference itself (as long as it is not // infinitely recursive). tail: Option<Box<Self>>, } } [paths .qualifiers .super] super [paths .qualifiers .super .intro] super in a path resolves to the parent module. [paths .qualifiers .super .allowed-positions] It may only be used in leading segments of the path, possibly after an initial self segment. mod a { pub fn foo() {} } mod b { pub fn foo() { super::a::foo(); // call a's foo function } } fn main() {} [paths .qualifiers .super .repetition] super may be repeated several times after the first super or self to refer to ancestor modules. mod a { fn foo() {} mod b { mod c { fn foo() { super::super::foo(); // call a's foo function self::super::super::foo(); // call a's foo function } } } } fn main() {} [paths .qualifiers .crate] crate [paths .qualifiers .crate .intro] crate resolves the path relative to the current crate. [paths .qualifiers .crate .allowed-positions] crate can only be used as the first segment, without a preceding :: . fn foo() {} mod a { fn bar() { crate::foo(); } } fn main() {} [paths .qualifiers .macro-crate] $crate [paths .qualifiers .macro-crate .allowed-positions] $crate is only used within macro transcribers , and can only be used as the first segment, without a preceding :: . [paths .qualifiers .macro-crate .hygiene] $crate will expand to a path to access items from the top level of the crate where the macro is defined, regardless of which crate the macro is invoked. pub fn increment(x: u32) -> u32 { x + 1 } #[macro_export] macro_rules! inc { ($x:expr) => ( $crate::increment($x) ) } fn main() { } [paths .canonical] Canonical paths [paths .canonical .intro] Items defined in a module or implementation have a canonical path that corresponds to where within its crate it is defined. [paths .canonical .alias] All other paths to these items are aliases. [paths .canonical .def] The canonical path is defined as a path prefix appended by the path segment the item itself defines. [paths .canonical .non-canonical] Implementations and use declarations do not have canonical paths, although the items that implementations define do have them. Items defined in block expressions do not have canonical paths. Items defined in a module that does not have a canonical path do not have a canonical path. Associated items defined in an implementation that refers to an item without a canonical path, e.g. as the implementing type, the trait being implemented, a type parameter or bound on a type parameter, do not have canonical paths. [paths .canonical .module-prefix] The path prefix for modules is the canonical path to that module. [paths .canonical .bare-impl-prefix] For bare implementations, it is the canonical path of the item being implemented surrounded by angle ( <> ) brackets. [paths .canonical .trait-impl-prefix] For trait implementations , it is the canonical path of the item being implemented followed by as followed by the canonical path to the trait all surrounded in angle ( <> ) brackets. [paths .canonical .local-canonical-path] The canonical path is only meaningful within a given crate. There is no global namespace across crates; an item’s canonical path merely identifies it within the crate. // Comments show the canonical path of the item. mod a { // crate::a pub struct Struct; // crate::a::Struct pub trait Trait { // crate::a::Trait fn f(&self); // crate::a::Trait::f } impl Trait for Struct { fn f(&self) {} // <crate::a::Struct as crate::a::Trait>::f } impl Struct { fn g(&self) {} // <crate::a::Struct>::g } } mod without { // crate::without fn canonicals() { // crate::without::canonicals struct OtherStruct; // None trait OtherTrait { // None fn g(&self); // None } impl OtherTrait for OtherStruct { fn g(&self) {} // None } impl OtherTrait for crate::a::Struct { fn g(&self) {} // None } impl crate::a::Trait for OtherStruct { fn f(&self) {} // None } } } fn main() {} | 2026-01-13T09:29:13 |
https://vi-vn.facebook.com/recover/initiate/?privacy_mutation_token=eyJ0eXBlIjo1LCJjcmVhdGlvbl90aW1lIjoxNzY4Mjk2MDkzfQ%3D%3D&ars=facebook_login&next=https%3A%2F%2Fl.facebook.com%2Fl.php%3Fu%3Dhttps%253A%252F%252Fwww.instagram.com%252F%26amp%253Bh%3DAT21L5LIblPB6uZ-IbjXcioP8ejSlaAq7HniZxHJmYI-o6L1n76-VW-sAVLwyWXBNG2n_2y0DYxybw7ed-r36wSDm4wd3DrO-QezAGpzTaSSS6_25Sw5M6hXHwk94uNECNvyU1JtXti_Pm1I | Facebook Bạn tạm thời bị chặn Bạn tạm thời bị chặn Có vẻ như bạn đang dùng nhầm tính năng này do sử dụng quá nhanh. Bạn tạm thời đã bị chặn sử dụng nó. Back | 2026-01-13T09:29:13 |
https://zh-cn.facebook.com/login/?next=https%3A%2F%2Fl.facebook.com%2Fl.php%3Fu%3Dhttps%253A%252F%252Fwww.instagram.com%252F%26amp%253Bh%3DAT3JYaROIHDRnGnvxRuIozFF_BGGvvoNi8kVPWnSK0yCW2_Va2rKJWNXZ3PUqk5CKpNtOfbF-WNUpIWc7WVvePlsk9n9z3ptr24Okxk2028tZW0HuZ3QVvGoPKfc7Ts55I89ELD7U7OWf7bu | Facebook Facebook 邮箱或手机号 密码 忘记账户了? 创建新账户 你暂时被禁止使用此功能 你暂时被禁止使用此功能 似乎你过度使用了此功能,因此暂时被阻止,不能继续使用。 Back 中文(简体) 한국어 English (US) Tiếng Việt Bahasa Indonesia ภาษาไทย Español 日本語 Português (Brasil) Français (France) Deutsch 注册 登录 Messenger Facebook Lite 视频 Meta Pay Meta 商店 Meta Quest Ray-Ban Meta Meta AI Meta AI 更多内容 Instagram Threads 选民信息中心 隐私政策 隐私中心 关于 创建广告 创建公共主页 开发者 招聘信息 Cookie Ad Choices 条款 帮助 联系人上传和非用户 设置 动态记录 Meta © 2026 | 2026-01-13T09:29:13 |
https://doc.rust-lang.org/std/convert/trait.Into.html | Into in std::convert - Rust This old browser is unsupported and will most likely display funky things. Into std 1.92.0 (ded5c06cf 2025-12-08) Into Sections Generic Implementations Implementing Into for conversions to external types in old versions of Rust Examples Required Methods into Dyn Compatibility Implementors In std:: convert std :: convert Trait Into Copy item path 1.0.0 (const: unstable ) · Source pub trait Into<T>: Sized { // Required method fn into (self) -> T; } Expand description A value-to-value conversion that consumes the input value. The opposite of From . One should avoid implementing Into and implement From instead. Implementing From automatically provides one with an implementation of Into thanks to the blanket implementation in the standard library. Prefer using Into over From when specifying trait bounds on a generic function to ensure that types that only implement Into can be used as well. Note: This trait must not fail . If the conversion can fail, use TryInto . § Generic Implementations From <T> for U implies Into<U> for T Into is reflexive, which means that Into<T> for T is implemented § Implementing Into for conversions to external types in old versions of Rust Prior to Rust 1.41, if the destination type was not part of the current crate then you couldn’t implement From directly. For example, take this code: struct Wrapper<T>(Vec<T>); impl <T> From<Wrapper<T>> for Vec<T> { fn from(w: Wrapper<T>) -> Vec<T> { w. 0 } } This will fail to compile in older versions of the language because Rust’s orphaning rules used to be a little bit more strict. To bypass this, you could implement Into directly: struct Wrapper<T>(Vec<T>); impl <T> Into<Vec<T>> for Wrapper<T> { fn into( self ) -> Vec<T> { self . 0 } } It is important to understand that Into does not provide a From implementation (as From does with Into ). Therefore, you should always try to implement From and then fall back to Into if From can’t be implemented. § Examples String implements Into < Vec < u8 >> : In order to express that we want a generic function to take all arguments that can be converted to a specified type T , we can use a trait bound of Into <T> . For example: The function is_hello takes all arguments that can be converted into a Vec < u8 > . fn is_hello<T: Into<Vec<u8>>>(s: T) { let bytes = b"hello" .to_vec(); assert_eq! (bytes, s.into()); } let s = "hello" .to_string(); is_hello(s); Required Methods § 1.0.0 · Source fn into (self) -> T Converts this type into the (usually inferred) input type. Dyn Compatibility § This trait is not dyn compatible . In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe. Implementors § 1.0.0 (const: unstable ) · Source § impl<T, U> Into <U> for T where U: From <T>, | 2026-01-13T09:29:13 |
https://doc.rust-lang.org/std/hash/trait.Hash.html | Hash in std::hash - Rust This old browser is unsupported and will most likely display funky things. Hash std 1.92.0 (ded5c06cf 2025-12-08) Hash Sections Implementing Hash Hash and Eq Prefix collisions Portability Required Methods hash Provided Methods hash_slice Dyn Compatibility Implementors In std:: hash std :: hash Trait Hash Copy item path 1.0.0 · Source pub trait Hash { // Required method fn hash <H>(&self, state: &mut H ) where H: Hasher ; // Provided method fn hash_slice <H>(data: &[Self], state: &mut H ) where H: Hasher , Self: Sized { ... } } Expand description A hashable type. Types implementing Hash are able to be hash ed with an instance of Hasher . § Implementing Hash You can derive Hash with #[derive(Hash)] if all fields implement Hash . The resulting hash will be the combination of the values from calling hash on each field. #[derive(Hash)] struct Rustacean { name: String, country: String, } If you need more control over how a value is hashed, you can of course implement the Hash trait yourself: use std::hash::{Hash, Hasher}; struct Person { id: u32, name: String, phone: u64, } impl Hash for Person { fn hash<H: Hasher>( & self , state: &mut H) { self .id.hash(state); self .phone.hash(state); } } § Hash and Eq When implementing both Hash and Eq , it is important that the following property holds: k1 == k2 -> hash(k1) == hash(k2) In other words, if two keys are equal, their hashes must also be equal. HashMap and HashSet both rely on this behavior. Thankfully, you won’t need to worry about upholding this property when deriving both Eq and Hash with #[derive(PartialEq, Eq, Hash)] . Violating this property is a logic error. The behavior resulting from a logic error is not specified, but users of the trait must ensure that such logic errors do not result in undefined behavior. This means that unsafe code must not rely on the correctness of these methods. § Prefix collisions Implementations of hash should ensure that the data they pass to the Hasher are prefix-free. That is, values which are not equal should cause two different sequences of values to be written, and neither of the two sequences should be a prefix of the other. For example, the standard implementation of Hash for &str passes an extra 0xFF byte to the Hasher so that the values ("ab", "c") and ("a", "bc") hash differently. § Portability Due to differences in endianness and type sizes, data fed by Hash to a Hasher should not be considered portable across platforms. Additionally the data passed by most standard library types should not be considered stable between compiler versions. This means tests shouldn’t probe hard-coded hash values or data fed to a Hasher and instead should check consistency with Eq . Serialization formats intended to be portable between platforms or compiler versions should either avoid encoding hashes or only rely on Hash and Hasher implementations that provide additional guarantees. Required Methods § 1.0.0 · Source fn hash <H>(&self, state: &mut H ) where H: Hasher , Feeds this value into the given Hasher . § Examples use std::hash::{DefaultHasher, Hash, Hasher}; let mut hasher = DefaultHasher::new(); 7920 .hash( &mut hasher); println! ( "Hash is {:x}!" , hasher.finish()); Provided Methods § 1.3.0 · Source fn hash_slice <H>(data: &[Self], state: &mut H ) where H: Hasher , Self: Sized , Feeds a slice of this type into the given Hasher . This method is meant as a convenience, but its implementation is also explicitly left unspecified. It isn’t guaranteed to be equivalent to repeated calls of hash and implementations of Hash should keep that in mind and call hash themselves if the slice isn’t treated as a whole unit in the PartialEq implementation. For example, a VecDeque implementation might naïvely call as_slices and then hash_slice on each slice, but this is wrong since the two slices can change with a call to make_contiguous without affecting the PartialEq result. Since these slices aren’t treated as singular units, and instead part of a larger deque, this method cannot be used. § Examples use std::hash::{DefaultHasher, Hash, Hasher}; let mut hasher = DefaultHasher::new(); let numbers = [ 6 , 28 , 496 , 8128 ]; Hash::hash_slice( & numbers, &mut hasher); println! ( "Hash is {:x}!" , hasher.finish()); Dyn Compatibility § This trait is not dyn compatible . In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe. Implementors § Source § impl Hash for AsciiChar 1.0.0 · Source § impl Hash for std::cmp:: Ordering 1.44.0 · Source § impl Hash for Infallible 1.0.0 · Source § impl Hash for ErrorKind 1.7.0 · Source § impl Hash for IpAddr Source § impl Hash for Ipv6MulticastScope 1.0.0 · Source § impl Hash for SocketAddr 1.55.0 · Source § impl Hash for IntErrorKind 1.0.0 · Source § impl Hash for std::sync::atomic:: Ordering 1.0.0 · Source § impl Hash for bool 1.0.0 · Source § impl Hash for char 1.0.0 · Source § impl Hash for i8 1.0.0 · Source § impl Hash for i16 1.0.0 · Source § impl Hash for i32 1.0.0 · Source § impl Hash for i64 1.0.0 · Source § impl Hash for i128 1.0.0 · Source § impl Hash for isize 1.29.0 · Source § impl Hash for ! 1.0.0 · Source § impl Hash for str 1.0.0 · Source § impl Hash for u8 1.0.0 · Source § impl Hash for u16 1.0.0 · Source § impl Hash for u32 1.0.0 · Source § impl Hash for u64 1.0.0 · Source § impl Hash for u128 1.0.0 · Source § impl Hash for () 1.0.0 · Source § impl Hash for usize 1.28.0 · Source § impl Hash for Layout 1.0.0 · Source § impl Hash for TypeId Source § impl Hash for ByteStr Source § impl Hash for ByteString 1.64.0 · Source § impl Hash for CStr 1.64.0 · Source § impl Hash for CString 1.0.0 · Source § impl Hash for OsStr 1.0.0 · Source § impl Hash for OsString 1.0.0 · Source § impl Hash for Error 1.1.0 · Source § impl Hash for FileType 1.33.0 · Source § impl Hash for PhantomPinned 1.0.0 · Source § impl Hash for Ipv4Addr 1.0.0 · Source § impl Hash for Ipv6Addr 1.0.0 · Source § impl Hash for SocketAddrV4 1.0.0 · Source § impl Hash for SocketAddrV6 1.0.0 · Source § impl Hash for RangeFull Source § impl Hash for UCred Available on Unix only. 1.10.0 · Source § impl Hash for Location <'_> 1.0.0 · Source § impl Hash for Path 1.0.0 · Source § impl Hash for PathBuf 1.0.0 · Source § impl Hash for PrefixComponent <'_> Source § impl Hash for Alignment 1.0.0 · Source § impl Hash for String 1.19.0 · Source § impl Hash for ThreadId 1.3.0 · Source § impl Hash for Duration 1.8.0 · Source § impl Hash for Instant 1.8.0 · Source § impl Hash for SystemTime 1.0.0 · Source § impl<'a> Hash for Component <'a> 1.0.0 · Source § impl<'a> Hash for Prefix <'a> Source § impl<'a> Hash for PhantomContravariantLifetime <'a> Source § impl<'a> Hash for PhantomCovariantLifetime <'a> Source § impl<'a> Hash for PhantomInvariantLifetime <'a> 1.0.0 · Source § impl<B> Hash for Cow <'_, B> where B: Hash + ToOwned + ? Sized , 1.55.0 · Source § impl<B, C> Hash for ControlFlow <B, C> where B: Hash , C: Hash , Source § impl<Dyn> Hash for DynMetadata <Dyn> where Dyn: ? Sized , 1.4.0 · Source § impl<F> Hash for F where F: FnPtr , 1.0.0 · Source § impl<Idx> Hash for std::ops:: Range <Idx> where Idx: Hash , 1.0.0 · Source § impl<Idx> Hash for std::ops:: RangeFrom <Idx> where Idx: Hash , 1.26.0 · Source § impl<Idx> Hash for std::ops:: RangeInclusive <Idx> where Idx: Hash , 1.0.0 · Source § impl<Idx> Hash for RangeTo <Idx> where Idx: Hash , 1.26.0 · Source § impl<Idx> Hash for std::ops:: RangeToInclusive <Idx> where Idx: Hash , Source § impl<Idx> Hash for std::range:: Range <Idx> where Idx: Hash , Source § impl<Idx> Hash for std::range:: RangeFrom <Idx> where Idx: Hash , Source § impl<Idx> Hash for std::range:: RangeInclusive <Idx> where Idx: Hash , Source § impl<Idx> Hash for std::range:: RangeToInclusive <Idx> where Idx: Hash , 1.0.0 · Source § impl<K, V, A> Hash for BTreeMap <K, V, A> where K: Hash , V: Hash , A: Allocator + Clone , 1.41.0 · Source § impl<Ptr> Hash for Pin <Ptr> where Ptr: Deref , <Ptr as Deref >:: Target : Hash , 1.17.0 · Source § impl<T> Hash for Bound <T> where T: Hash , 1.0.0 · Source § impl<T> Hash for Option <T> where T: Hash , 1.36.0 · Source § impl<T> Hash for Poll <T> where T: Hash , 1.0.0 · Source § impl<T> Hash for *const T where T: ? Sized , 1.0.0 · Source § impl<T> Hash for *mut T where T: ? Sized , 1.0.0 · Source § impl<T> Hash for &T where T: Hash + ? Sized , 1.0.0 · Source § impl<T> Hash for &mut T where T: Hash + ? Sized , 1.0.0 · Source § impl<T> Hash for [T] where T: Hash , 1.0.0 · Source § impl<T> Hash for (T₁, T₂, …, Tₙ) where T: Hash , This trait is implemented for tuples up to twelve items long. 1.19.0 · Source § impl<T> Hash for Reverse <T> where T: Hash , Source § impl<T> Hash for PhantomContravariant <T> where T: ? Sized , Source § impl<T> Hash for PhantomCovariant <T> where T: ? Sized , 1.0.0 · Source § impl<T> Hash for PhantomData <T> where T: ? Sized , Source § impl<T> Hash for PhantomInvariant <T> where T: ? Sized , 1.21.0 · Source § impl<T> Hash for Discriminant <T> 1.20.0 · Source § impl<T> Hash for ManuallyDrop <T> where T: Hash + ? Sized , 1.28.0 · Source § impl<T> Hash for NonZero <T> where T: ZeroablePrimitive + Hash , 1.74.0 · Source § impl<T> Hash for Saturating <T> where T: Hash , 1.0.0 · Source § impl<T> Hash for Wrapping <T> where T: Hash , 1.25.0 · Source § impl<T> Hash for NonNull <T> where T: ? Sized , Source § impl<T> Hash for Exclusive <T> where T: Sync + Hash + ? Sized , 1.0.0 · Source § impl<T, A> Hash for Box <T, A> where T: Hash + ? Sized , A: Allocator , 1.0.0 · Source § impl<T, A> Hash for BTreeSet <T, A> where T: Hash , A: Allocator + Clone , 1.0.0 · Source § impl<T, A> Hash for LinkedList <T, A> where T: Hash , A: Allocator , 1.0.0 · Source § impl<T, A> Hash for VecDeque <T, A> where T: Hash , A: Allocator , 1.0.0 · Source § impl<T, A> Hash for Rc <T, A> where T: Hash + ? Sized , A: Allocator , Source § impl<T, A> Hash for UniqueRc <T, A> where T: Hash + ? Sized , A: Allocator , 1.0.0 · Source § impl<T, A> Hash for Arc <T, A> where T: Hash + ? Sized , A: Allocator , Source § impl<T, A> Hash for UniqueArc <T, A> where T: Hash + ? Sized , A: Allocator , 1.0.0 · Source § impl<T, A> Hash for Vec <T, A> where T: Hash , A: Allocator , The hash of a vector is the same as that of the corresponding slice, as required by the core::borrow::Borrow implementation. use std::hash::BuildHasher; let b = std::hash::RandomState::new(); let v: Vec<u8> = vec! [ 0xa8 , 0x3c , 0x09 ]; let s: & [u8] = & [ 0xa8 , 0x3c , 0x09 ]; assert_eq! (b.hash_one(v), b.hash_one(s)); 1.0.0 · Source § impl<T, E> Hash for Result <T, E> where T: Hash , E: Hash , 1.0.0 · Source § impl<T, const N: usize > Hash for [T; N] where T: Hash , The hash of an array is the same as that of the corresponding slice, as required by the Borrow implementation. use std::hash::BuildHasher; let b = std::hash::RandomState::new(); let a: [u8; 3 ] = [ 0xa8 , 0x3c , 0x09 ]; let s: & [u8] = & [ 0xa8 , 0x3c , 0x09 ]; assert_eq! (b.hash_one(a), b.hash_one(s)); Source § impl<T, const N: usize > Hash for Simd <T, N> where LaneCount <N>: SupportedLaneCount , T: SimdElement + Hash , Source § impl<Y, R> Hash for CoroutineState <Y, R> where Y: Hash , R: Hash , | 2026-01-13T09:29:13 |
https://zh-cn.facebook.com/login/?next=https%3A%2F%2Fl.facebook.com%2Fl.php%3Fu%3Dhttps%253A%252F%252Fwww.instagram.com%252F%26amp%253Bh%3DAT1ho_VP7aujGp5hB4ABLthmbsEWrryyldymj0vBdjJwyRf7zNOtfd1oG7waETjDOdLBwcZdBo3rgfTtglHDh6uX0PyAMCZgocf5nLGRtfjyQI5DR8xukPL7vIBSBrdeFJ7kQX0NDPsm3Epp | Facebook Facebook 邮箱或手机号 密码 忘记账户了? 创建新账户 你暂时被禁止使用此功能 你暂时被禁止使用此功能 似乎你过度使用了此功能,因此暂时被阻止,不能继续使用。 Back 中文(简体) 한국어 English (US) Tiếng Việt Bahasa Indonesia ภาษาไทย Español 日本語 Português (Brasil) Français (France) Deutsch 注册 登录 Messenger Facebook Lite 视频 Meta Pay Meta 商店 Meta Quest Ray-Ban Meta Meta AI Meta AI 更多内容 Instagram Threads 选民信息中心 隐私政策 隐私中心 关于 创建广告 创建公共主页 开发者 招聘信息 Cookie Ad Choices 条款 帮助 联系人上传和非用户 设置 动态记录 Meta © 2026 | 2026-01-13T09:29:13 |
https://doc.rust-lang.org/std/convert/trait.AsRef.html | AsRef in std::convert - Rust This old browser is unsupported and will most likely display funky things. AsRef std 1.92.0 (ded5c06cf 2025-12-08) AsRef Sections Relation to Borrow Generic Implementations Reflexivity Examples Required Methods as_ref Implementors In std:: convert std :: convert Trait AsRef Copy item path 1.0.0 (const: unstable ) · Source pub trait AsRef<T> where T: ? Sized , { // Required method fn as_ref (&self) -> &T ; } Expand description Used to do a cheap reference-to-reference conversion. This trait is similar to AsMut which is used for converting between mutable references. If you need to do a costly conversion it is better to implement From with type &T or write a custom function. § Relation to Borrow AsRef has the same signature as Borrow , but Borrow is different in a few aspects: Unlike AsRef , Borrow has a blanket impl for any T , and can be used to accept either a reference or a value. (See also note on AsRef ’s reflexibility below.) Borrow also requires that Hash , Eq and Ord for a borrowed value are equivalent to those of the owned value. For this reason, if you want to borrow only a single field of a struct you can implement AsRef , but not Borrow . Note: This trait must not fail . If the conversion can fail, use a dedicated method which returns an Option<T> or a Result<T, E> . § Generic Implementations AsRef auto-dereferences if the inner type is a reference or a mutable reference (e.g.: foo.as_ref() will work the same if foo has type &mut Foo or &&mut Foo ). Note that due to historic reasons, the above currently does not hold generally for all dereferenceable types , e.g. foo.as_ref() will not work the same as Box::new(foo).as_ref() . Instead, many smart pointers provide an as_ref implementation which simply returns a reference to the pointed-to value (but do not perform a cheap reference-to-reference conversion for that value). However, AsRef::as_ref should not be used for the sole purpose of dereferencing; instead ‘ Deref coercion’ can be used: let x = Box::new( 5i32 ); // Avoid this: // let y: &i32 = x.as_ref(); // Better just write: let y: & i32 = & x; Types which implement Deref should consider implementing AsRef<T> as follows: impl <T> AsRef<T> for SomeType where T: ? Sized, <SomeType as Deref>::Target: AsRef<T>, { fn as_ref( & self ) -> & T { self .deref().as_ref() } } § Reflexivity Ideally, AsRef would be reflexive, i.e. there would be an impl<T: ?Sized> AsRef<T> for T with as_ref simply returning its argument unchanged. Such a blanket implementation is currently not provided due to technical restrictions of Rust’s type system (it would be overlapping with another existing blanket implementation for &T where T: AsRef<U> which allows AsRef to auto-dereference, see “Generic Implementations” above). A trivial implementation of AsRef<T> for T must be added explicitly for a particular type T where needed or desired. Note, however, that not all types from std contain such an implementation, and those cannot be added by external code due to orphan rules. § Examples By using trait bounds we can accept arguments of different types as long as they can be converted to the specified type T . For example: By creating a generic function that takes an AsRef<str> we express that we want to accept all references that can be converted to &str as an argument. Since both String and &str implement AsRef<str> we can accept both as input argument. fn is_hello<T: AsRef<str>>(s: T) { assert_eq! ( "hello" , s.as_ref()); } let s = "hello" ; is_hello(s); let s = "hello" .to_string(); is_hello(s); Required Methods § 1.0.0 · Source fn as_ref (&self) -> &T Converts this type into a shared reference of the (usually inferred) input type. Implementors § 1.0.0 (const: unstable ) · Source § impl AsRef < str > for str 1.0.0 · Source § impl AsRef < str > for String Source § impl AsRef < ByteStr > for str Source § impl AsRef < ByteStr > for ByteStr Source § impl AsRef < ByteStr > for ByteString 1.7.0 (const: unstable ) · Source § impl AsRef < CStr > for CStr 1.7.0 · Source § impl AsRef < CStr > for CString 1.0.0 · Source § impl AsRef < OsStr > for Component <'_> 1.0.0 · Source § impl AsRef < OsStr > for str 1.0.0 (const: unstable ) · Source § impl AsRef < OsStr > for OsStr 1.0.0 · Source § impl AsRef < OsStr > for OsString 1.0.0 · Source § impl AsRef < OsStr > for Components <'_> 1.0.0 · Source § impl AsRef < OsStr > for std::path:: Iter <'_> 1.0.0 (const: unstable ) · Source § impl AsRef < OsStr > for Path 1.0.0 · Source § impl AsRef < OsStr > for PathBuf 1.0.0 · Source § impl AsRef < OsStr > for String 1.8.0 · Source § impl AsRef < Path > for Cow <'_, OsStr > 1.25.0 · Source § impl AsRef < Path > for Component <'_> 1.0.0 · Source § impl AsRef < Path > for str 1.0.0 (const: unstable ) · Source § impl AsRef < Path > for OsStr 1.0.0 · Source § impl AsRef < Path > for OsString 1.0.0 · Source § impl AsRef < Path > for Components <'_> 1.0.0 · Source § impl AsRef < Path > for std::path:: Iter <'_> 1.0.0 (const: unstable ) · Source § impl AsRef < Path > for Path 1.0.0 · Source § impl AsRef < Path > for PathBuf 1.0.0 · Source § impl AsRef < Path > for String Source § impl AsRef < LocalWaker > for Waker 1.0.0 (const: unstable ) · Source § impl AsRef <[ u8 ]> for str Source § impl AsRef <[ u8 ]> for ByteStr Source § impl AsRef <[ u8 ]> for ByteString 1.0.0 · Source § impl AsRef <[ u8 ]> for String 1.55.0 · Source § impl<'a> AsRef < str > for std::string:: Drain <'a> 1.55.0 · Source § impl<'a> AsRef <[ u8 ]> for std::string:: Drain <'a> 1.46.0 · Source § impl<'a, T, A> AsRef < [T] > for std::vec:: Drain <'a, T, A> where A: Allocator , 1.0.0 (const: unstable ) · Source § impl<T> AsRef < [T] > for [T] 1.13.0 · Source § impl<T> AsRef < [T] > for std::slice:: Iter <'_, T> 1.53.0 · Source § impl<T> AsRef < [T] > for IterMut <'_, T> 1.0.0 · Source § impl<T> AsRef <T> for Cow <'_, T> where T: ToOwned + ? Sized , Source § impl<T> AsRef <T> for Exclusive <T> where T: Sync + ? Sized , 1.46.0 · Source § impl<T, A> AsRef < [T] > for IntoIter <T, A> where A: Allocator , 1.0.0 · Source § impl<T, A> AsRef < [T] > for Vec <T, A> where A: Allocator , 1.0.0 · Source § impl<T, A> AsRef < Vec <T, A>> for Vec <T, A> where A: Allocator , 1.5.0 · Source § impl<T, A> AsRef <T> for Box <T, A> where A: Allocator , T: ? Sized , 1.5.0 · Source § impl<T, A> AsRef <T> for Rc <T, A> where A: Allocator , T: ? Sized , Source § impl<T, A> AsRef <T> for UniqueRc <T, A> where A: Allocator , T: ? Sized , 1.5.0 · Source § impl<T, A> AsRef <T> for Arc <T, A> where A: Allocator , T: ? Sized , Source § impl<T, A> AsRef <T> for UniqueArc <T, A> where A: Allocator , T: ? Sized , 1.0.0 (const: unstable ) · Source § impl<T, U> AsRef <U> for &T where T: AsRef <U> + ? Sized , U: ? Sized , 1.0.0 (const: unstable ) · Source § impl<T, U> AsRef <U> for &mut T where T: AsRef <U> + ? Sized , U: ? Sized , Source § impl<T, const N: usize > AsRef < [T; N] > for Simd <T, N> where LaneCount <N>: SupportedLaneCount , T: SimdElement , 1.0.0 (const: unstable ) · Source § impl<T, const N: usize > AsRef < [T] > for [T; N] Source § impl<T, const N: usize > AsRef < [T] > for Simd <T, N> where LaneCount <N>: SupportedLaneCount , T: SimdElement , | 2026-01-13T09:29:13 |
https://www.linkedin.com/legal/user-agreement?session_redirect=https%3A%2F%2Fwww%2Elinkedin%2Ecom%2FshareArticle%3Fmini%3Dtrue%26amp%3Burl%3Dhttps%3A%2F%2Fwww%2Eanthropic%2Ecom%2Fnews%2Fdeveloping-computer-use&trk=registration-frontend_join-form-user-agreement | User Agreement | LinkedIn Skip to main content User Agreement Summary of User Agreement Privacy Policy Professional Community Policies Cookie Policy Copyright Policy Regional Info EU Notice California Privacy Disclosure U.S. State Privacy Laws User Agreement Summary of User Agreement Privacy Policy Professional Community Policies Cookie Policy Copyright Policy Regional Info EU Notice California Privacy Disclosure U.S. State Privacy Laws User Agreement Effective on November 3, 2025 Our mission is to connect the world’s professionals to allow them to be more productive and successful. Our services are designed to promote economic opportunity for our members by enabling you and millions of other professionals to meet, exchange ideas, learn, and find opportunities or employees, work, and make decisions in a network of trusted relationships. Table of Contents: Introduction Obligations Rights and Limits Disclaimer and Limit of Liability Termination Governing Law and Dispute Resolution General Terms LinkedIn “Dos and Don’ts” Complaints Regarding Content How To Contact Us Introduction 1.1 Contract When you use our Services you agree to all of these terms. Your use of our Services is also subject to our Cookie Policy and our Privacy Policy, which covers how we collect, use, share, and store your personal information. By creating a LinkedIn account or accessing or using our Services (described below), you are agreeing to enter into a legally binding contract with LinkedIn (even if you are using third party credentials or using our Services on behalf of a company). If you do not agree to this contract (“Contract” or “User Agreement”), do not create an account or access or otherwise use any of our Services. If you wish to terminate this Contract at any time, you can do so by closing your account and no longer accessing or using our Services. As a Visitor or Member of our Services, the collection, use, and sharing of your personal data is subject to our Privacy Policy , our Cookie Policy and other documents referenced in our Privacy Policy , and updates. You acknowledge and have read our Privacy Policy . Services This Contract applies to LinkedIn.com, LinkedIn-branded apps, and other LinkedIn-related sites, apps, communications, and other services that state that they are offered under this Contract (“Services”), including the offsite collection of data for those Services, such as via our ads and the “Apply with LinkedIn” and “Share with LinkedIn” plugins. LinkedIn and other Key Terms You are entering into this Contract with LinkedIn (also referred to as “we” and “us”). Designated Countries . We use the term “Designated Countries” to refer to countries in the European Union (EU), European Economic Area (EEA), and Switzerland. If you reside in the “Designated Countries”, you are entering into this Contract with LinkedIn Ireland Unlimited Company (“LinkedIn Ireland”) and LinkedIn Ireland will be the controller of your personal data provided to, or collected by or for, or processed in connection with our Services. If you reside outside of the “Designated Countries”, you are entering into this Contract with LinkedIn Corporation (“LinkedIn Corp.”) and LinkedIn Corp. will be the controller of (or business responsible for) your personal data provided to, or collected by or for, or processed in connection with our Services. Affiliates . Affiliates are companies controlling, controlled by or under common control with us, including, for example, LinkedIn Ireland, LinkedIn Corporation, LinkedIn Singapore and Microsoft Corporation or any of its subsidiaries (e.g., Github, Inc.). Social Action . Actions that members take on our services such as likes, comments, follows, sharing content. Content . Content includes, for example, feed posts, feedback, comments, profiles, articles (and contributions), group posts, job postings, messages (including InMails), videos, photos, audio, and/or PDFs. 1.2 Members and Visitors This Contract applies to Members and Visitors. When you register and join the LinkedIn Services, you become a “Member”. If you have chosen not to register for our Services, you may access certain features as a “Visitor.” 1.3 Changes We may make changes to this Contract. We may modify this Contract, our Privacy Policy and our Cookie Policy from time to time. If we materially change these terms or if we are legally required to provide notice, we will provide you notice through our Services, or by other means, to provide you the opportunity to review the changes before they become effective. However, we may not always provide prior notice of changes to these terms (1) when those changes are legally required to be implemented with immediate effect, or (2) when those changes relate to a newly launched service or feature. We agree that changes cannot be retroactive. If you object to any of these changes, you may close your account . Your continued use of our Services after we publish or send a notice about our changes to these terms means that you are consenting to the updated terms as of their effective date. 2. Obligations 2.1 Service Eligibility Here are some promises that you make to us in this Contract: You’re eligible to enter into this Contract and you are at least our “Minimum Age.” The Services are not for use by anyone under the age of 16. To use the Services, you agree that: (1) you must be the "Minimum Age" (described below) or older; (2) you will only have one LinkedIn account, which must be in your real name; and (3) you are not already restricted by LinkedIn from using the Services. Creating an account with false information is a violation of our terms, including accounts registered on behalf of others or persons under the age of 16. “Minimum Age” means 16 years old. However, if law requires that you must be older in order for LinkedIn to lawfully provide the Services to you without parental consent (including using your personal data) then the Minimum Age is such older age. Learn More 2.2 Your Account You will keep your password a secret You will not share your account with anyone else and will follow our policies and the law. Members are account holders. You agree to: (1) protect against wrongful access to your account (e.g., use a strong password and keep it confidential); (2) not share or transfer your account or any part of it (e.g., sell or transfer the personal data of others by transferring your connections); and (3) follow the law, our list of Dos and Don’ts (below), and our Professional Community Policies . Learn More You are responsible for anything that happens through your account unless you close it or report misuse. As between you and others (including your employer), your account belongs to you. However, if the Services were purchased by another party for you to use in connection with your work for them (e.g., Recruiter seat or LinkedIn Learning subscription bought by your employer), the party paying for such Service has the right to control access to and get reports on your use of such paid Service; however, they do not have rights to your personal account. 2.3 Payment You’ll honor your payment obligations and you are okay with us storing your payment information. You understand that there may be fees and taxes that are added to our prices. Refunds are subject to our policy, and we may modify our prices and those modified prices will apply prospectively. If you buy any of our paid Services, you agree to pay us the applicable fees and taxes and you agree to the additional terms specific to the paid Services. Failure to pay these fees will result in the termination of your paid Services. Also, you agree that: Your purchase may be subject to foreign exchange fees or differences in prices based on location (e.g., exchange rates). We may store and continue billing your payment method (e.g., credit card), even after it has expired, to avoid interruptions in your paid Services and to use it to pay for other Services you may buy. If your primary payment method fails, we may automatically charge a secondary payment method, if you have provided one. You may update or change your payment method. Learn more If you purchase a subscription, your payment method automatically will be charged at the start of each subscription period for the fees and taxes applicable to that period. To avoid future charges, cancel before the renewal date. Learn how to cancel or suspend your paid subscription Services. We may modify our prices effective prospectively upon reasonable notice to the extent allowed under the law. All of your paid Services are subject to LinkedIn’s refund policy . We may calculate taxes payable by you based on the billing information that you provide us. You can get a copy of your invoice through your LinkedIn account settings under “ Purchase History ”. 2.4 Notices and Messages You’re okay with us providing notices and messages to you through our websites, apps, and contact information. If your contact information is out of date, you may miss out on important notices. You agree that we will provide notices and messages to you in the following ways: (1) within the Services or (2) sent to the contact information you provided us (e.g., email, mobile number, physical address). You agree to keep your contact information up to date. Please review your settings to control and limit the types of messages you receive from us. 2.5 Sharing When you share information on our Services, others can see, copy and use that information. Our Services allow sharing of information (including content) in many ways, such as through your profile, posts, articles, group posts, links to news articles, job postings, messages, and InMails. Depending on the feature and choices you make, information that you share may be seen by other Members, Visitors, or others (on or off of the Services). Where we have made settings available, we will honor the choices you make about who can see content or other information (e.g., message content to your addressees, sharing content only to LinkedIn connections, restricting your profile visibility from search tools, or opting not to notify others of your LinkedIn profile update). For job searching activities, we default to not notifying your connections or the public. So, if you apply for a job through our Services or opt to signal that you are interested in a job, our default is to share it only with the job poster. To the extent that laws allow this, we are not obligated to publish any content or other information on our Services and can remove it with or without notice. 3. Rights and Limits 3.1. Your License to LinkedIn You own all of your original content that you provide to us, but you also grant us a non-exclusive license to it. We’ll honor the choices you make about who gets to see your content, including how it can be used for ads. As between you and LinkedIn, you own your original content that you submit or post to the Services. You grant LinkedIn and our Affiliates the following non-exclusive license to the content and other information you provide (e.g., share, post, upload, and/or otherwise submit) to our Services: A worldwide, transferable and sublicensable right to use, copy, modify, distribute, publicly perform and display, host, and process your content and other information without any further consent, notice and/or compensation to you or others. These rights are limited in the following ways: You can end this license for specific content by deleting such content from the Services, or generally by closing your account, except (a) to the extent you (1) shared it with others as part of the Services and they copied, re-shared it or stored it, (2) we had already sublicensed others prior to your content removal or closing of your account, or (3) we are required by law to retain or share it with others, and (b) for the reasonable time it takes to remove the content you delete from backup and other systems. We will not include your content in advertisements for the products and services of third parties to others without your separate consent (including sponsored content). However, without compensation to you or others, ads may be served near your content and other information, and your social actions may be visible and included with ads, as noted in the Privacy Policy. If you use a Service feature, we may mention that with your name or photo to promote that feature within our Services, subject to your settings. We will honor the audience choices for shared content (e.g., “Connections only”). For example, if you choose to share your post to "Anyone on or off LinkedIn” (or similar): (a) we may make it available off LinkedIn; (b) we may enable others to publicly share onto third-party services (e.g., a Member embedding your post on a third party service); and/or (c) we may enable search tools to make that public content findable though their services. Learn More While we may edit and make format changes to your content (such as translating or transcribing it, modifying the size, layout or file type, and removing or adding labels or metadata), we will take steps to avoid materially modifying the meaning of your expression in content you share with others. Because you own your original content and we only have non-exclusive rights to it, you may choose to make it available to others, including under the terms of a Creative Commons license . You and LinkedIn agree that if content includes personal data, it is subject to our Privacy Policy. You and LinkedIn agree that we may access, store, process, and use any information (including content and/or personal data) that you provide in accordance with the terms of the Privacy Policy and your choices (including settings). By submitting suggestions or other feedback regarding our Services to LinkedIn, you agree that LinkedIn can use and share (but does not have to) such feedback for any purpose without compensation to you. You promise to only provide content and other information that you have the right to share and that your LinkedIn profile will be truthful. You agree to only provide content and other information that does not violate the law or anyone’s rights (including intellectual property rights). You have choices about how much information to provide on your profile but also agree that the profile information you provide will be truthful. LinkedIn may be required by law to remove certain content and other information in certain countries. 3.2 Service Availability We may change or limit the availability of some features, or end any Service. We may change, suspend or discontinue any of our Services. We may also limit the availability of features, content and other information so that they are not available to all Visitors or Members (e.g., by country or by subscription access). We don’t promise to store or show (or keep showing) any information (including content) that you’ve shared. LinkedIn is not a storage service. You agree that we have no obligation to store, maintain or provide you a copy of any content or other information that you or others provide, except to the extent required by applicable law and as noted in our Privacy Policy. 3.3 Other Content, Sites and Apps Your use of others’ content and information posted on our Services, is at your own risk. Others may offer their own products and services through our Services, and we aren’t responsible for those third-party activities. Others’ Content: By using the Services, you may encounter content or other information that might be inaccurate, incomplete, delayed, misleading, illegal, offensive, or otherwise harmful. You agree that we are not responsible for content or other information made available through or within the Services by others, including Members. While we apply automated tools to review much of the content and other information presented in the Services, we cannot always prevent misuse of our Services, and you agree that we are not responsible for any such misuse. You also acknowledge the risk that others may share inaccurate or misleading information about you or your organization, and that you or your organization may be mistakenly associated with content about others, for example, when we let connections and followers know you or your organization were mentioned in the news. Members have choices about this feature . Others’ Products and Services: LinkedIn may help connect you to other Members (e.g., Members using Services Marketplace or our enterprise recruiting, jobs, sales, or marketing products) who offer you opportunities (on behalf of themselves, their organizations, or others) such as offers to become a candidate for employment or other work or offers to purchase products or services. You acknowledge that LinkedIn does not perform these offered services, employ those who perform these services, or provide these offered products. You further acknowledge that LinkedIn does not supervise, direct, control, or monitor Members in the making of these offers, or in their providing you with work, delivering products or performing services, and you agree that (1) LinkedIn is not responsible for these offers, or performance or procurement of them, (2) LinkedIn does not endorse any particular Member’s offers, and (3) LinkedIn is not an agent or employment agency on behalf of any Member offering employment or other work, products or services. With respect to employment or other work, LinkedIn does not make employment or hiring decisions on behalf of Members offering opportunities and does not have such authority from Members or organizations using our products. For Services Marketplace , (a) you must be at least 18 years of age to procure, offer, or perform services, and (b) you represent and warrant that you have all the required licenses and will provide services consistent with the relevant industry standards and our Professional Community Policies . Others’ Events: Similarly, LinkedIn may help you register for and/or attend events organized by Members and connect with other Members who are attendees at such events. You agree that (1) LinkedIn is not responsible for the conduct of any of the Members or other attendees at such events, (2) LinkedIn does not endorse any particular event listed on our Services, (3) LinkedIn does not review and/or vet any of these events or speakers, and (4) you will adhere to the terms and conditions that apply to such events. 3.4 Limits We have the right to limit how you connect and interact on our Services. LinkedIn reserves the right to limit your use of the Services, including the number of your connections and your ability to contact other Members. LinkedIn reserves the right to restrict, suspend, or terminate your account if you breach this Contract or the law or are misusing the Services (e.g., violating any of the Dos and Don’ts or Professional Community Policies ). We can also remove any content or other information you shared if we believe it violates our Professional Community Policies or Dos and Don’ts or otherwise violates this Contract. Learn more about how we moderate content. 3.5 Intellectual Property Rights We’re providing you notice about our intellectual property rights. LinkedIn reserves all of its intellectual property rights in the Services. Trademarks and logos used in connection with the Services are the trademarks of their respective owners. LinkedIn, and “in” logos and other LinkedIn trademarks, service marks, graphics and logos used for our Services are trademarks or registered trademarks of LinkedIn. 3.6 Recommendations and Automated Processing We use data and other information about you to make and order relevant suggestions and to generate content for you and others. Recommendations: We use the data and other information that you provide and that we have about Members and content on the Services to make recommendations for connections, content, ads, and features that may be useful to you. We use that data and other information to recommend and to present information to you in an order that may be more relevant for you. For example, that data and information may be used to recommend jobs to you and you to recruiters and to organize content in your feed in order to optimize your experience and use of the Services. Keeping your profile accurate and up to date helps us to make these recommendations more accurate and relevant. Learn More Generative AI Features: By using the Services, you may interact with features we offer that automate content generation for you. The content that is generated might be inaccurate, incomplete, delayed, misleading or not suitable for your purposes. Please review and edit such content before sharing with others. Like all content you share on our Services, you are responsible for ensuring it complies with our Professional Community Policies , including not sharing misleading information. The Services may include content automatically generated and shared using tools offered by LinkedIn or others off LinkedIn. Like all content and other information on our Services, regardless of whether it's labeled as created by “AI”, be sure to carefully review before relying on it. 4. Disclaimer and Limit of Liability 4.1 No Warranty This is our disclaimer of legal liability for the quality, safety, or reliability of our Services. LINKEDIN AND ITS AFFILIATES MAKE NO REPRESENTATION OR WARRANTY ABOUT THE SERVICES, INCLUDING ANY REPRESENTATION THAT THE SERVICES WILL BE UNINTERRUPTED OR ERROR-FREE, AND PROVIDE THE SERVICES (INCLUDING CONTENT, OUTPUT AND INFORMATION) ON AN “AS IS” AND “AS AVAILABLE” BASIS. TO THE FULLEST EXTENT PERMITTED UNDER APPLICABLE LAW, LINKEDIN AND ITS AFFILIATES DISCLAIM ANY IMPLIED OR STATUTORY WARRANTY, INCLUDING ANY IMPLIED WARRANTY OF TITLE, ACCURACY, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. If you plan to use content, output and information for any reason, it is your responsibility to verify its accuracy and fitness for your purposes, because any content, output and information on the service may not reflect accurate, complete, or current information. 4.2 Exclusion of Liability These are the limits of legal liability we may have to you. TO THE FULLEST EXTENT PERMITTED BY LAW (AND UNLESS LINKEDIN HAS ENTERED INTO A SEPARATE WRITTEN AGREEMENT THAT OVERRIDES THIS CONTRACT), LINKEDIN AND ITS AFFILIATES, WILL NOT BE LIABLE IN CONNECTION WITH THIS CONTRACT FOR LOST PROFITS OR LOST BUSINESS OPPORTUNITIES, REPUTATION (E.G., OFFENSIVE OR DEFAMATORY STATEMENTS), LOSS OF DATA (E.G., DOWN TIME OR LOSS, USE OF, OR CHANGES TO, YOUR INFORMATION OR CONTENT) OR ANY INDIRECT, INCIDENTAL, CONSEQUENTIAL, SPECIAL OR PUNITIVE DAMAGES. LINKEDIN AND ITS AFFILIATES WILL NOT BE LIABLE TO YOU IN CONNECTION WITH THIS CONTRACT FOR ANY AMOUNT THAT EXCEEDS (A) THE TOTAL FEES PAID OR PAYABLE BY YOU TO LINKEDIN FOR THE SERVICES DURING THE TERM OF THIS CONTRACT, IF ANY, OR (B) US $1000. 4.3 Basis of the Bargain; Exclusions The limitations of liability in this Section 4 are part of the basis of the bargain between you and LinkedIn and shall apply to all claims of liability (e.g., warranty, tort, negligence, contract and law) even if LinkedIn or its affiliates has been told of the possibility of any such damage, and even if these remedies fail their essential purpose. THESE LIMITATIONS OF LIABILITY DO NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY OR FOR FRAUD, GROSS NEGLIGENCE OR INTENTIONAL MISCONDUCT, OR IN CASES OF NEGLIGENCE, WHERE A MATERIAL OBLIGATION HAS BEEN BREACHED. A MATERIAL OBLIGATION BEING AN OBLIGATION WHICH FORMS A PREREQUISITE TO OUR DELIVERY OF SERVICES AND ON WHICH YOU MAY REASONABLY RELY, BUT ONLY TO THE EXTENT THAT THE DAMAGES WERE DIRECTLY CAUSED BY THE BREACH AND WERE FORESEEABLE UPON CONCLUSION OF THIS CONTRACT AND TO THE EXTENT THAT THEY ARE TYPICAL IN THE CONTEXT OF THIS CONTRACT. 5. Termination We can each end this Contract, but some rights and obligations survive. Both you and LinkedIn may terminate this Contract at any time with notice to the other. On termination, you lose the right to access or use the Services. The following shall survive termination: Our rights to use and disclose your feedback; Section 3 (subject to 3.1.1); Sections 4, 6, 7, and 8.2 of this Contract; and Any amounts owed by either party prior to termination remain owed after termination. You can visit our Help Center to learn about how to close your account 6. Governing Law and Dispute Resolution In the unlikely event we end up in a legal dispute, depending on where you live, you and LinkedIn agree to resolve it in California courts using California law, Dublin, Ireland courts using Irish law, or as otherwise provided in this section. If you live in the Designated Countries, the laws of Ireland govern all claims related to LinkedIn's provision of the Services, but this shall not deprive you of the mandatory consumer protections under the law of the country to which we direct your Services where you have habitual residence. With respect to jurisdiction, you and LinkedIn agree to choose the courts of the country to which we direct your Services where you have habitual residence for all disputes arising out of or relating to this User Agreement, or in the alternative, you may choose the responsible court in Ireland. If you are a business user within the scope of Article 6(12) of the EU Digital Markets Act (“DMA”) and have a dispute arising out of or in connection with Article 6(12) of the DMA, you may also utilize the alternative dispute resolution mechanism available in the Help Center . For others outside of Designated Countries, including those who live outside of the United States: You and LinkedIn agree that the laws of the State of California, U.S.A., excluding its conflict of laws rules, shall exclusively govern any dispute relating to this Contract and/or the Services. You and LinkedIn both agree that all claims and disputes can be litigated only in the federal or state courts in Santa Clara County, California, USA, and you and LinkedIn each agree to personal jurisdiction in those courts. You may have additional rights of redress and appeal for some decisions made by LinkedIn that impact you. 7. General Terms Here are some important details about the Contract. If a court with authority over this Contract finds any part of it unenforceable, you and we agree that the court should modify the terms to make that part enforceable while still achieving its intent. If the court cannot do that, you and we agree to ask the court to remove that unenforceable part and still enforce the rest of this Contract. This Contract (including additional terms that may be provided by us when you engage with a feature of the Services) is the only agreement between us regarding the Services and supersedes all prior agreements for the Services. If we don't act to enforce a breach of this Contract, that does not mean that LinkedIn has waived its right to enforce this Contract. You may not assign or transfer this Contract (or your membership or use of Services) to anyone without our consent. However, you agree that LinkedIn may assign this Contract to its affiliates or a party that buys it without your consent. There are no third-party beneficiaries to this Contract. You agree that the only way to provide us legal notice is at the addresses provided in Section 10. 8. LinkedIn “Dos and Don’ts” LinkedIn is a community of professionals. This list of “Dos and Don’ts” along with our Professional Community Policies limits what you can and cannot do on our Services, unless otherwise explicitly permitted by LinkedIn in a separate writing (e.g., through a research agreement). 8.1. Dos You agree that you will: Comply with all applicable laws, including, without limitation, privacy laws, intellectual property laws, anti-spam laws, export control laws, laws governing the content shared, and other applicable laws and regulatory requirements; Provide accurate contact and identity information to us and keep it updated; Use your real name on your profile; and Use the Services in a professional manner. 8.2. Don’ts You agree that you will not : Create a false identity on LinkedIn, misrepresent your identity, create a Member profile for anyone other than yourself (a real person), or use or attempt to use another’s account (such as sharing log-in credentials or copying cookies); Develop, support or use software, devices, scripts, robots or any other means or processes (such as crawlers, browser plugins and add-ons or any other technology) to scrape or copy the Services, including profiles and other data from the Services; Override any security feature or bypass or circumvent any access controls or use limits of the Services (such as search results, profiles, or videos); Copy, use, display or distribute any information (including content) obtained from the Services, whether directly or through third parties (such as search tools or data aggregators or brokers), without the consent of the content owner (such as LinkedIn for content it owns); Disclose information that you do not have the consent to disclose (such as confidential information of others (including your employer); Violate the intellectual property rights of others, including copyrights, patents, trademarks, trade secrets or other proprietary rights. For example, do not copy or distribute (except through the available sharing functionality) the posts or other content of others without their permission, which they may give by posting under a Creative Commons license; Violate the intellectual property or other rights of LinkedIn, including, without limitation, (i) copying or distributing our learning videos or other materials, (ii) copying or distributing our technology, unless it is released under open source licenses; or (iii) using the word “LinkedIn” or our logos in any business name, email, or URL except as provided in the Brand Guidelines ; Post (or otherwise share) anything that contains software viruses, worms, or any other harmful code; Reverse engineer, decompile, disassemble, decipher or otherwise attempt to derive the source code for the Services or any related technology that is not open source; Imply or state that you are affiliated with or endorsed by LinkedIn without our express consent (e.g., representing yourself as an accredited LinkedIn trainer); Rent, lease, loan, trade, sell/re-sell or otherwise monetize the Services or related data or access to the same, without LinkedIn’s consent; Deep-link to our Services for any purpose other than to promote your profile or a Group on our Services, without LinkedIn’s consent; Use bots or other unauthorized automated methods to access the Services, add or download contacts, send or redirect messages, create, comment on, like, share, or re-share posts, or otherwise drive inauthentic engagement; Engage in “framing”, “mirroring”, or otherwise simulating the appearance or function of the Services; Overlay or otherwise modify the Services or their appearance (such as by inserting elements into the Services or removing, covering, or obscuring an advertisement included on the Services); Interfere with the operation of, or place an unreasonable load on, the Services (e.g., spam, denial of service attack, viruses, manipulating algorithms); Violate the Professional Community Policies , certain third party terms where applicable, or any additional terms concerning a specific Service that are provided when you sign up for or start using such Service; Use our Services to do anything that is unlawful, misleading, discriminatory, fraudulent or deceitful (e.g. manipulated media that wrongfully depicts a person saying or doing something they did not say or do); and/or Misuse our reporting or appeals process, including by submitting duplicative, fraudulent or unfounded reports, complaints or appeals. 9. Complaints Regarding Content Contact information for complaints about content provided by our Members. We ask that you report content and other information that you believe violates your rights (including intellectual property rights), our Professional Community Policies or otherwise violates this Contract or the law. To the extent we can under law, we may remove or restrict access to content, features, services, or information, including if we believe that it’s reasonably necessary to avoid harm to LinkedIn or others, violates the law or is reasonably necessary to prevent misuse of our Services. We reserve the right to take action against serious violations of this Contract, including by implementing account restrictions for significant violations. We respect the intellectual property rights of others. We require that information shared by Members be accurate and not in violation of the intellectual property rights or other rights of third parties. We provide a policy and process for complaints concerning content shared, and/or trademarks used, by our Members. 10. How To Contact Us Our Contact information. Our Help Center also provides information about our Services. For general inquiries, you may contact us online . For legal notices or service of process, you may write us at these addresses . LinkedIn © 2026 About Accessibility User Agreement Privacy Policy Cookie Policy Copyright Policy Brand Policy Guest Controls Community Guidelines العربية (Arabic) বাংলা (Bangla) Čeština (Czech) Dansk (Danish) Deutsch (German) Ελληνικά (Greek) English (English) Español (Spanish) فارسی (Persian) Suomi (Finnish) Français (French) हिंदी (Hindi) Magyar (Hungarian) Bahasa Indonesia (Indonesian) Italiano (Italian) עברית (Hebrew) 日本語 (Japanese) 한국어 (Korean) मराठी (Marathi) Bahasa Malaysia (Malay) Nederlands (Dutch) Norsk (Norwegian) ਪੰਜਾਬੀ (Punjabi) Polski (Polish) Português (Portuguese) Română (Romanian) Русский (Russian) Svenska (Swedish) తెలుగు (Telugu) ภาษาไทย (Thai) Tagalog (Tagalog) Türkçe (Turkish) Українська (Ukrainian) Tiếng Việt (Vietnamese) 简体中文 (Chinese (Simplified)) 正體中文 (Chinese (Traditional)) Language | 2026-01-13T09:29:13 |
https://id-id.facebook.com/login/?next=https%3A%2F%2Fl.facebook.com%2Fl.php%3Fu%3Dhttps%253A%252F%252Fwww.instagram.com%252F%26amp%253Bh%3DAT1ho_VP7aujGp5hB4ABLthmbsEWrryyldymj0vBdjJwyRf7zNOtfd1oG7waETjDOdLBwcZdBo3rgfTtglHDh6uX0PyAMCZgocf5nLGRtfjyQI5DR8xukPL7vIBSBrdeFJ7kQX0NDPsm3Epp | Facebook Facebook Email atau telepon Kata Sandi Lupa akun? Buat Akun Baru Anda Diblokir Sementara Anda Diblokir Sementara Sepertinya Anda menyalahgunakan fitur ini dengan menggunakannya terlalu cepat. Anda dilarang menggunakan fitur ini untuk sementara. Back Bahasa Indonesia 한국어 English (US) Tiếng Việt ภาษาไทย Español 中文(简体) 日本語 Português (Brasil) Français (France) Deutsch Daftar Masuk Messenger Facebook Lite Video Meta Pay Meta Store Meta Quest Ray-Ban Meta Meta AI Konten Meta AI lainnya Instagram Threads Pusat Informasi Pemilu Kebijakan Privasi Pusat Privasi Tentang Buat Iklan Buat Halaman Developer Karier Cookie Pilihan Iklan Ketentuan Bantuan Pengunggahan Kontak & Non-Pengguna Pengaturan Log aktivitas Meta © 2026 | 2026-01-13T09:29:13 |
https://www.facebook.com/login/?next=https%3A%2F%2Fl.facebook.com%2Fl.php%3Fu%3Dhttps%253A%252F%252Fwww.instagram.com%252F%26amp%253Bh%3DAT2n2ad5edoxiZfbpoMEkNGCapqvjk3Zha8c1DS-IfhWMQRD-QXdRlQEcCYCl1RRAYHR0Mx37s1OKzcyqjS_88yFX-L67y4s2hGhnwpT3j1OIUkQ_EplDVcwoVuogpB-iRktRQbugSbxt_WX | Facebook Facebook 이메일 또는 휴대폰 비밀번호 계정을 잊으셨나요? 새 계정 만들기 일시적으로 차단됨 일시적으로 차단됨 회원님의 이 기능 사용 속도가 너무 빠른 것 같습니다. 이 기능 사용에서 일시적으로 차단되었습니다. Back 한국어 English (US) Tiếng Việt Bahasa Indonesia ภาษาไทย Español 中文(简体) 日本語 Português (Brasil) Français (France) Deutsch 가입하기 로그인 Messenger Facebook Lite 동영상 Meta Pay Meta 스토어 Meta Quest Ray-Ban Meta Meta AI Meta AI 콘텐츠 더 보기 Instagram Threads 투표 정보 센터 개인정보처리방침 개인정보 보호 센터 정보 광고 만들기 페이지 만들기 개발자 채용 정보 쿠키 AdChoices 이용 약관 고객 센터 연락처 업로드 및 비사용자 설정 활동 로그 Meta © 2026 | 2026-01-13T09:29:13 |
https://telegram.org/apps#apps-para-computadora | Telegram Applications English Bahasa Indonesia Bahasa Melayu Deutsch Español Français Italiano Nederlands O‘zbek Polski Português (Brasil) Türkçe Беларуская Русский Українська Қазақша العربية فارسی 한국어 Twitter Home FAQ Apps API Moderation Telegram Applications Telegram apps are open source and support reproducible builds . Anyone can independently verify that Telegram apps you download from App Store or Google Play were built using the exact same code that we publish. Mobile apps Telegram for Android Telegram for iPhone and iPad Desktop apps Telegram for Windows/Mac/Linux Telegram for macOS Web apps Telegram WebA Telegram WebK Telegram Database Library (TDLib) TDLib – a cross-platform client designed to facilitate creating custom apps on the Telegram platform. Telegram X for Android – a slick experimental Telegram client based on TDLib. Unofficial apps Unigram, a client optimized for Windows (based on TDLib ) Telegram CLI for Linux MadelineProto Source code This code allows security researchers to fully evaluate our end-to-end encryption implementation . It is also possible to independently verify that Telegram apps available on Google Play and App Store are built using the same code that we publish on GitHub. Telegram Database Library Cross-platform library for building custom Telegram apps, see TDLib for details. Licensed under Boost 1.0 . GitHub » Telegram for Android Official Android App, see Google Play Market page for full description. Licensed under GNU GPL v. 2 or later . GitHub » Download APK File » Telegram for iOS Licensed under GNU GPL v. 2 or later . GitHub » Telegram for macOS Native macOS client. Licensed under GNU GPL v. 2 . GitHub » Telegram for Web browsers Telegram Web, Version K . Mac, Windows, Linux, Mobile. Licensed under GNU GPL v. 3 . GitHub » Telegram Web, Version A . Mac, Windows, Linux, Mobile. Licensed under GNU GPL v. 3 . GitHub » Legacy JavaScript client . Mac, Windows, Linux. Licensed under GNU GPL v. 3 . GitHub » Telegram React JavaScript client for browsers. Mac, Windows, Linux. Licensed under GNU GPL v. 3 . GitHub » Telegram Desktop Qt-based desktop client. Mac, Windows, Linux. Licensed under GNU GPL v. 3 . GitHub » Telegram for WP Licensed under GNU GPL v. 2 or later . GitHub » Telegram X for Android Alternative Telegram client for Android based on TDLib. Licensed under GPL v.3.0 GitHub » Unofficial apps Telegram CLI (Unofficial) Linux Command-line interface for Telegram. Licensed under GNU GPL v. 2 . GitHub » Unigram (Unofficial) A Telegram client optimized for Windows. Licensed under GNU GPL v. 3 or later . GitHub » MadelineProto (Unofficial) A PHP MTProto Telegram client. Licensed under GNU AGPL v. 3 . GitHub » Bug Bounty Program Telegram welcomes developers and the security research community to audit its services, code and protocol seeking vulnerabilities or security-related issues. Learn more about our Bug Bounty Program here . Telegram Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed. About FAQ Privacy Press Mobile Apps iPhone/iPad Android Mobile Web Desktop Apps PC/Mac/Linux macOS Web-browser Platform API Translations Instant View About Blog Press Moderation | 2026-01-13T09:29:13 |
https://docs.rs/byteorder/1.0.0/byteorder/enum.LittleEndian.html | byteorder::LittleEndian - Rust Docs.rs byteorder-1.0.0 byteorder 1.0.0 Docs.rs crate page Unlicense / MIT Links Homepage Repository crates.io Source Owners BurntSushi Dependencies quickcheck ^0.4 normal rand ^0.3 normal Versions Go to latest version Platform i686-apple-darwin i686-pc-windows-gnu i686-unknown-linux-gnu x86_64-apple-darwin x86_64-pc-windows-gnu x86_64-unknown-linux-gnu Feature flags docs.rs About docs.rs Badges Builds Metadata Shorthand URLs Download Rustdoc JSON Build queue Privacy policy Rust Rust website The Book Standard Library API Reference Rust by Example The Cargo Guide Clippy Documentation This old browser is unsupported and will most likely display funky things. Enum LittleEndian Trait Implementations byteorder Enum byteorder :: LittleEndian [ − ] [src] pub enum LittleEndian {} Defines little-endian serialization. Note that this type has no value constructor. It is used purely at the type level. Trait Implementations impl Clone for LittleEndian [src] fn clone (&self) -> LittleEndian Returns a copy of the value. Read more fn clone_from (&mut self, source: &Self) 1.0.0 Performs copy-assignment from source . Read more impl Copy for LittleEndian [src] impl Debug for LittleEndian [src] fn fmt (&self, __arg_0: &mut Formatter ) -> Result Formats the value using the given formatter. impl Eq for LittleEndian [src] impl Hash for LittleEndian [src] fn hash <__H: Hasher >(&self, __arg_0: &mut __H) Feeds this value into the given [ Hasher ]. Read more fn hash_slice <H>(data: &[Self] , state: &mut H) where H: Hasher , 1.3.0 Feeds a slice of this type into the given [ Hasher ]. Read more impl Ord for LittleEndian [src] fn cmp (&self, __arg_0: & LittleEndian ) -> Ordering This method returns an Ordering between self and other . Read more impl PartialEq for LittleEndian [src] fn eq (&self, __arg_0: & LittleEndian ) -> bool This method tests for self and other values to be equal, and is used by == . Read more fn ne (&self, other: &Rhs) -> bool 1.0.0 This method tests for != . impl PartialOrd for LittleEndian [src] fn partial_cmp (&self, __arg_0: & LittleEndian ) -> Option < Ordering > This method returns an ordering between self and other values if one exists. Read more fn lt (&self, other: &Rhs) -> bool 1.0.0 This method tests less than (for self and other ) and is used by the < operator. Read more fn le (&self, other: &Rhs) -> bool 1.0.0 This method tests less than or equal to (for self and other ) and is used by the <= operator. Read more fn gt (&self, other: &Rhs) -> bool 1.0.0 This method tests greater than (for self and other ) and is used by the > operator. Read more fn ge (&self, other: &Rhs) -> bool 1.0.0 This method tests greater than or equal to (for self and other ) and is used by the >= operator. Read more impl Default for LittleEndian [src] fn default () -> LittleEndian Returns the "default value" for a type. Read more impl ByteOrder for LittleEndian [src] fn read_u16 (buf: &[ u8 ] ) -> u16 Reads an unsigned 16 bit integer from buf . Read more fn read_u32 (buf: &[ u8 ] ) -> u32 Reads an unsigned 32 bit integer from buf . Read more fn read_u64 (buf: &[ u8 ] ) -> u64 Reads an unsigned 64 bit integer from buf . Read more fn read_uint (buf: &[ u8 ] , nbytes: usize ) -> u64 Reads an unsigned n-bytes integer from buf . Read more fn write_u16 (buf: &mut [ u8 ] , n: u16 ) Writes an unsigned 16 bit integer n to buf . Read more fn write_u32 (buf: &mut [ u8 ] , n: u32 ) Writes an unsigned 32 bit integer n to buf . Read more fn write_u64 (buf: &mut [ u8 ] , n: u64 ) Writes an unsigned 64 bit integer n to buf . Read more fn write_uint (buf: &mut [ u8 ] , n: u64 , nbytes: usize ) Writes an unsigned integer n to buf using only nbytes . Read more fn read_i16 (buf: &[ u8 ] ) -> i16 Reads a signed 16 bit integer from buf . Read more fn read_i32 (buf: &[ u8 ] ) -> i32 Reads a signed 32 bit integer from buf . Read more fn read_i64 (buf: &[ u8 ] ) -> i64 Reads a signed 64 bit integer from buf . Read more fn read_int (buf: &[ u8 ] , nbytes: usize ) -> i64 Reads a signed n-bytes integer from buf . Read more fn read_f32 (buf: &[ u8 ] ) -> f32 Reads a IEEE754 single-precision (4 bytes) floating point number. Read more fn read_f64 (buf: &[ u8 ] ) -> f64 Reads a IEEE754 double-precision (8 bytes) floating point number. Read more fn write_i16 (buf: &mut [ u8 ] , n: i16 ) Writes a signed 16 bit integer n to buf . Read more fn write_i32 (buf: &mut [ u8 ] , n: i32 ) Writes a signed 32 bit integer n to buf . Read more fn write_i64 (buf: &mut [ u8 ] , n: i64 ) Writes a signed 64 bit integer n to buf . Read more fn write_int (buf: &mut [ u8 ] , n: i64 , nbytes: usize ) Writes a signed integer n to buf using only nbytes . Read more fn write_f32 (buf: &mut [ u8 ] , n: f32 ) Writes a IEEE754 single-precision (4 bytes) floating point number. Read more fn write_f64 (buf: &mut [ u8 ] , n: f64 ) Writes a IEEE754 double-precision (8 bytes) floating point number. Read more Help Keyboard Shortcuts ? Show this help dialog S Focus the search field ⇤ Move up in search results ⇥ Move down in search results ⏎ Go to active search result + Collapse/expand all sections Search Tricks Prefix searches with a type followed by a colon (e.g. fn: ) to restrict the search to a given type. Accepted types are: fn , mod , struct , enum , trait , type , macro , and const . Search functions by type signature (e.g. vec -> usize or * -> vec ) | 2026-01-13T09:29:13 |
https://doc.rust-lang.org/cargo/commands/cargo-rustc.html | cargo rustc - The Cargo Book Keyboard shortcuts Press ← or → to navigate between chapters Press S or / to search in the book Press ? to show this help Press Esc to hide this help Auto Light Rust Coal Navy Ayu The Cargo Book cargo-rustc(1) NAME cargo-rustc — Compile the current package, and pass extra options to the compiler SYNOPSIS cargo rustc [ options ] [ -- args ] DESCRIPTION The specified target for the current package (or package specified by -p if provided) will be compiled along with all of its dependencies. The specified args will all be passed to the final compiler invocation, not any of the dependencies. Note that the compiler will still unconditionally receive arguments such as -L , --extern , and --crate-type , and the specified args will simply be added to the compiler invocation. See https://doc.rust-lang.org/rustc/index.html for documentation on rustc flags. This command requires that only one target is being compiled when additional arguments are provided. If more than one target is available for the current package the filters of --lib , --bin , etc, must be used to select which target is compiled. To pass flags to all compiler processes spawned by Cargo, use the RUSTFLAGS environment variable or the build.rustflags config value . OPTIONS Package Selection By default, the package in the current working directory is selected. The -p flag can be used to choose a different package in a workspace. -p spec --package spec The package to build. See cargo-pkgid(1) for the SPEC format. Target Selection When no target selection options are given, cargo rustc will build all binary and library targets of the selected package. Binary targets are automatically built if there is an integration test or benchmark being selected to build. This allows an integration test to execute the binary to exercise and test its behavior. The CARGO_BIN_EXE_<name> environment variable is set when the integration test is built so that it can use the env macro to locate the executable. Passing target selection flags will build only the specified targets. Note that --bin , --example , --test and --bench flags also support common Unix glob patterns like * , ? and [] . However, to avoid your shell accidentally expanding glob patterns before Cargo handles them, you must use single quotes or double quotes around each glob pattern. --lib Build the package’s library. --bin name … Build the specified binary. This flag may be specified multiple times and supports common Unix glob patterns. --bins Build all binary targets. --example name … Build the specified example. This flag may be specified multiple times and supports common Unix glob patterns. --examples Build all example targets. --test name … Build the specified integration test. This flag may be specified multiple times and supports common Unix glob patterns. --tests Build all targets that have the test = true manifest flag set. By default this includes the library and binaries built as unittests, and integration tests. Be aware that this will also build any required dependencies, so the lib target may be built twice (once as a unittest, and once as a dependency for binaries, integration tests, etc.). Targets may be enabled or disabled by setting the test flag in the manifest settings for the target. --bench name … Build the specified benchmark. This flag may be specified multiple times and supports common Unix glob patterns. --benches Build all targets that have the bench = true manifest flag set. By default this includes the library and binaries built as benchmarks, and bench targets. Be aware that this will also build any required dependencies, so the lib target may be built twice (once as a benchmark, and once as a dependency for binaries, benchmarks, etc.). Targets may be enabled or disabled by setting the bench flag in the manifest settings for the target. --all-targets Build all targets. This is equivalent to specifying --lib --bins --tests --benches --examples . Feature Selection The feature flags allow you to control which features are enabled. When no feature options are given, the default feature is activated for every selected package. See the features documentation for more details. -F features --features features Space or comma separated list of features to activate. Features of workspace members may be enabled with package-name/feature-name syntax. This flag may be specified multiple times, which enables all specified features. --all-features Activate all available features of all selected packages. --no-default-features Do not activate the default feature of the selected packages. Compilation Options --target triple Build for the specified target architecture. Flag may be specified multiple times. The default is the host architecture. The general format of the triple is <arch><sub>-<vendor>-<sys>-<abi> . Possible values: Any supported target in rustc --print target-list . "host-tuple" , which will internally be substituted by the host’s target. This can be particularly useful if you’re cross-compiling some crates, and don’t want to specify your host’s machine as a target (for instance, an xtask in a shared project that may be worked on by many hosts). A path to a custom target specification. See Custom Target Lookup Path for more information. This may also be specified with the build.target config value . Note that specifying this flag makes Cargo run in a different mode where the target artifacts are placed in a separate directory. See the build cache documentation for more details. -r --release Build optimized artifacts with the release profile. See also the --profile option for choosing a specific profile by name. --profile name Build with the given profile. The rustc subcommand will treat the following named profiles with special behaviors: check — Builds in the same way as the cargo-check(1) command with the dev profile. test — Builds in the same way as the cargo-test(1) command, enabling building in test mode which will enable tests and enable the test cfg option. See rustc tests for more detail. bench — Builds in the same was as the cargo-bench(1) command, similar to the test profile. See the reference for more details on profiles. --timings= fmts Output information how long each compilation takes, and track concurrency information over time. Accepts an optional comma-separated list of output formats; --timings without an argument will default to --timings=html . Specifying an output format (rather than the default) is unstable and requires -Zunstable-options . Valid output formats: html (unstable, requires -Zunstable-options ): Write a human-readable file cargo-timing.html to the target/cargo-timings directory with a report of the compilation. Also write a report to the same directory with a timestamp in the filename if you want to look at older runs. HTML output is suitable for human consumption only, and does not provide machine-readable timing data. json (unstable, requires -Zunstable-options ): Emit machine-readable JSON information about timing information. --crate-type crate-type Build for the given crate type. This flag accepts a comma-separated list of 1 or more crate types, of which the allowed values are the same as crate-type field in the manifest for configuring a Cargo target. See crate-type field for possible values. If the manifest contains a list, and --crate-type is provided, the command-line argument value will override what is in the manifest. This flag only works when building a lib or example library target. Output Options --target-dir directory Directory for all generated artifacts and intermediate files. May also be specified with the CARGO_TARGET_DIR environment variable, or the build.target-dir config value . Defaults to target in the root of the workspace. Display Options -v --verbose Use verbose output. May be specified twice for “very verbose” output which includes extra output such as dependency warnings and build script output. May also be specified with the term.verbose config value . -q --quiet Do not print cargo log messages. May also be specified with the term.quiet config value . --color when Control when colored output is used. Valid values: auto (default): Automatically detect if color support is available on the terminal. always : Always display colors. never : Never display colors. May also be specified with the term.color config value . --message-format fmt The output format for diagnostic messages. Can be specified multiple times and consists of comma-separated values. Valid values: human (default): Display in a human-readable text format. Conflicts with short and json . short : Emit shorter, human-readable text messages. Conflicts with human and json . json : Emit JSON messages to stdout. See the reference for more details. Conflicts with human and short . json-diagnostic-short : Ensure the rendered field of JSON messages contains the “short” rendering from rustc. Cannot be used with human or short . json-diagnostic-rendered-ansi : Ensure the rendered field of JSON messages contains embedded ANSI color codes for respecting rustc’s default color scheme. Cannot be used with human or short . json-render-diagnostics : Instruct Cargo to not include rustc diagnostics in JSON messages printed, but instead Cargo itself should render the JSON diagnostics coming from rustc. Cargo’s own JSON diagnostics and others coming from rustc are still emitted. Cannot be used with human or short . Manifest Options --manifest-path path Path to the Cargo.toml file. By default, Cargo searches for the Cargo.toml file in the current directory or any parent directory. --ignore-rust-version Ignore rust-version specification in packages. --locked Asserts that the exact same dependencies and versions are used as when the existing Cargo.lock file was originally generated. Cargo will exit with an error when either of the following scenarios arises: The lock file is missing. Cargo attempted to change the lock file due to a different dependency resolution. It may be used in environments where deterministic builds are desired, such as in CI pipelines. --offline Prevents Cargo from accessing the network for any reason. Without this flag, Cargo will stop with an error if it needs to access the network and the network is not available. With this flag, Cargo will attempt to proceed without the network if possible. Beware that this may result in different dependency resolution than online mode. Cargo will restrict itself to crates that are downloaded locally, even if there might be a newer version as indicated in the local copy of the index. See the cargo-fetch(1) command to download dependencies before going offline. May also be specified with the net.offline config value . --frozen Equivalent to specifying both --locked and --offline . --lockfile-path PATH Changes the path of the lockfile from the default ( <workspace_root>/Cargo.lock ) to PATH . PATH must end with Cargo.lock (e.g. --lockfile-path /tmp/temporary-lockfile/Cargo.lock ). Note that providing --lockfile-path will ignore existing lockfile at the default path, and instead will either use the lockfile from PATH , or write a new lockfile into the provided PATH if it doesn’t exist. This flag can be used to run most commands in read-only directories, writing lockfile into the provided PATH . This option is only available on the nightly channel and requires the -Z unstable-options flag to enable (see #14421 ). Common Options + toolchain If Cargo has been installed with rustup, and the first argument to cargo begins with + , it will be interpreted as a rustup toolchain name (such as +stable or +nightly ). See the rustup documentation for more information about how toolchain overrides work. --config KEY=VALUE or PATH Overrides a Cargo configuration value. The argument should be in TOML syntax of KEY=VALUE , or provided as a path to an extra configuration file. This flag may be specified multiple times. See the command-line overrides section for more information. -C PATH Changes the current working directory before executing any specified operations. This affects things like where cargo looks by default for the project manifest ( Cargo.toml ), as well as the directories searched for discovering .cargo/config.toml , for example. This option must appear before the command name, for example cargo -C path/to/my-project build . This option is only available on the nightly channel and requires the -Z unstable-options flag to enable (see #10098 ). -h --help Prints help information. -Z flag Unstable (nightly-only) flags to Cargo. Run cargo -Z help for details. Miscellaneous Options -j N --jobs N Number of parallel jobs to run. May also be specified with the build.jobs config value . Defaults to the number of logical CPUs. If negative, it sets the maximum number of parallel jobs to the number of logical CPUs plus provided value. If a string default is provided, it sets the value back to defaults. Should not be 0. --keep-going Build as many crates in the dependency graph as possible, rather than aborting the build on the first one that fails to build. For example if the current package depends on dependencies fails and works , one of which fails to build, cargo rustc -j1 may or may not build the one that succeeds (depending on which one of the two builds Cargo picked to run first), whereas cargo rustc -j1 --keep-going would definitely run both builds, even if the one run first fails. --future-incompat-report Displays a future-incompat report for any future-incompatible warnings produced during execution of this command See cargo-report(1) ENVIRONMENT See the reference for details on environment variables that Cargo reads. EXIT STATUS 0 : Cargo succeeded. 101 : Cargo failed to complete. EXAMPLES Check if your package (not including dependencies) uses unsafe code: cargo rustc --lib -- -D unsafe-code Try an experimental flag on the nightly compiler, such as this which prints the size of every type: cargo rustc --lib -- -Z print-type-sizes Override crate-type field in Cargo.toml with command-line option: cargo rustc --lib --crate-type lib,cdylib SEE ALSO cargo(1) , cargo-build(1) , rustc(1) | 2026-01-13T09:29:13 |
https://doc.rust-lang.org/std/convert/trait.AsMut.html | AsMut in std::convert - Rust This old browser is unsupported and will most likely display funky things. AsMut std 1.92.0 (ded5c06cf 2025-12-08) AsMut Sections Generic Implementations Reflexivity Examples Required Methods as_mut Implementors In std:: convert std :: convert Trait AsMut Copy item path 1.0.0 (const: unstable ) · Source pub trait AsMut<T> where T: ? Sized , { // Required method fn as_mut (&mut self) -> &mut T ; } Expand description Used to do a cheap mutable-to-mutable reference conversion. This trait is similar to AsRef but used for converting between mutable references. If you need to do a costly conversion it is better to implement From with type &mut T or write a custom function. Note: This trait must not fail . If the conversion can fail, use a dedicated method which returns an Option<T> or a Result<T, E> . § Generic Implementations AsMut auto-dereferences if the inner type is a mutable reference (e.g.: foo.as_mut() will work the same if foo has type &mut Foo or &mut &mut Foo ). Note that due to historic reasons, the above currently does not hold generally for all mutably dereferenceable types , e.g. foo.as_mut() will not work the same as Box::new(foo).as_mut() . Instead, many smart pointers provide an as_mut implementation which simply returns a reference to the pointed-to value (but do not perform a cheap reference-to-reference conversion for that value). However, AsMut::as_mut should not be used for the sole purpose of mutable dereferencing; instead ‘ Deref coercion’ can be used: let mut x = Box::new( 5i32 ); // Avoid this: // let y: &mut i32 = x.as_mut(); // Better just write: let y: &mut i32 = &mut x; Types which implement DerefMut should consider to add an implementation of AsMut<T> as follows: impl <T> AsMut<T> for SomeType where <SomeType as Deref>::Target: AsMut<T>, { fn as_mut( &mut self ) -> &mut T { self .deref_mut().as_mut() } } § Reflexivity Ideally, AsMut would be reflexive, i.e. there would be an impl<T: ?Sized> AsMut<T> for T with as_mut simply returning its argument unchanged. Such a blanket implementation is currently not provided due to technical restrictions of Rust’s type system (it would be overlapping with another existing blanket implementation for &mut T where T: AsMut<U> which allows AsMut to auto-dereference, see “Generic Implementations” above). A trivial implementation of AsMut<T> for T must be added explicitly for a particular type T where needed or desired. Note, however, that not all types from std contain such an implementation, and those cannot be added by external code due to orphan rules. § Examples Using AsMut as trait bound for a generic function, we can accept all mutable references that can be converted to type &mut T . Unlike dereference , which has a single target type , there can be multiple implementations of AsMut for a type. In particular, Vec<T> implements both AsMut<Vec<T>> and AsMut<[T]> . In the following, the example functions caesar and null_terminate provide a generic interface which work with any type that can be converted by cheap mutable-to-mutable conversion into a byte slice ( [u8] ) or byte vector ( Vec<u8> ), respectively. struct Document { info: String, content: Vec<u8>, } impl <T: ? Sized> AsMut<T> for Document where Vec<u8>: AsMut<T>, { fn as_mut( &mut self ) -> &mut T { self .content.as_mut() } } fn caesar<T: AsMut<[u8]>>(data: &mut T, key: u8) { for byte in data.as_mut() { * byte = byte.wrapping_add(key); } } fn null_terminate<T: AsMut<Vec<u8>>>(data: &mut T) { // Using a non-generic inner function, which contains most of the // functionality, helps to minimize monomorphization overhead. fn doit(data: &mut Vec<u8>) { let len = data.len(); if len == 0 || data[len- 1 ] != 0 { data.push( 0 ); } } doit(data.as_mut()); } fn main() { let mut v: Vec<u8> = vec! [ 1 , 2 , 3 ]; caesar( &mut v, 5 ); assert_eq! (v, [ 6 , 7 , 8 ]); null_terminate( &mut v); assert_eq! (v, [ 6 , 7 , 8 , 0 ]); let mut doc = Document { info: String::from( "Example" ), content: vec! [ 17 , 19 , 8 ], }; caesar( &mut doc, 1 ); assert_eq! (doc.content, [ 18 , 20 , 9 ]); null_terminate( &mut doc); assert_eq! (doc.content, [ 18 , 20 , 9 , 0 ]); } Note, however, that APIs don’t need to be generic. In many cases taking a &mut [u8] or &mut Vec<u8> , for example, is the better choice (callers need to pass the correct type then). Required Methods § 1.0.0 · Source fn as_mut (&mut self) -> &mut T Converts this type into a mutable reference of the (usually inferred) input type. Implementors § 1.51.0 (const: unstable ) · Source § impl AsMut < str > for str 1.43.0 · Source § impl AsMut < str > for String Source § impl AsMut < ByteStr > for ByteString Source § impl AsMut <[ u8 ]> for ByteStr Source § impl AsMut <[ u8 ]> for ByteString 1.0.0 (const: unstable ) · Source § impl<T> AsMut < [T] > for [T] 1.5.0 · Source § impl<T, A> AsMut < [T] > for Vec <T, A> where A: Allocator , 1.5.0 · Source § impl<T, A> AsMut < Vec <T, A>> for Vec <T, A> where A: Allocator , 1.5.0 · Source § impl<T, A> AsMut <T> for Box <T, A> where A: Allocator , T: ? Sized , Source § impl<T, A> AsMut <T> for UniqueRc <T, A> where A: Allocator , T: ? Sized , Source § impl<T, A> AsMut <T> for UniqueArc <T, A> where A: Allocator , T: ? Sized , 1.0.0 (const: unstable ) · Source § impl<T, U> AsMut <U> for &mut T where T: AsMut <U> + ? Sized , U: ? Sized , Source § impl<T, const N: usize > AsMut < [T; N] > for Simd <T, N> where LaneCount <N>: SupportedLaneCount , T: SimdElement , 1.0.0 (const: unstable ) · Source § impl<T, const N: usize > AsMut < [T] > for [T; N] Source § impl<T, const N: usize > AsMut < [T] > for Simd <T, N> where LaneCount <N>: SupportedLaneCount , T: SimdElement , | 2026-01-13T09:29:13 |
https://l.facebook.com/l.php?u=https%3A%2F%2Fwww.instagram.com%2F&h=AT06lzqPvdCLuvdooEcBWuEyS0b9PGSQf9zoUYM5UDMvD5yACtSqTgn2SMi9c_gMk1rR2snrnryPHiRsN8yrf5_J9YlrJdnPdXDASJH-VOg9zhhOGP9JsyC-i0P-buICJj-86V2l3fw9LVoC | Facebook Facebook 이메일 또는 휴대폰 비밀번호 계정을 잊으셨나요? 새 계정 만들기 일시적으로 차단됨 일시적으로 차단됨 회원님의 이 기능 사용 속도가 너무 빠른 것 같습니다. 이 기능 사용에서 일시적으로 차단되었습니다. Back 한국어 English (US) Tiếng Việt Bahasa Indonesia ภาษาไทย Español 中文(简体) 日本語 Português (Brasil) Français (France) Deutsch 가입하기 로그인 Messenger Facebook Lite 동영상 Meta Pay Meta 스토어 Meta Quest Ray-Ban Meta Meta AI Meta AI 콘텐츠 더 보기 Instagram Threads 투표 정보 센터 개인정보처리방침 개인정보 보호 센터 정보 광고 만들기 페이지 만들기 개발자 채용 정보 쿠키 AdChoices 이용 약관 고객 센터 연락처 업로드 및 비사용자 설정 활동 로그 Meta © 2026 | 2026-01-13T09:29:13 |
https://zh-cn.facebook.com/login/?next=https%3A%2F%2Fl.facebook.com%2Fl.php%3Fu%3Dhttps%253A%252F%252Fwww.instagram.com%252F%26amp%253Bh%3DAT01G6_nw6Bh-5sCbp2-aSr0g4Qn7kzux3KaClq4B-Ydqu_2cilx63HukRJNrpVSfO5KTOnvI2cAQAO9cOP5vcEy6U8cteIXFwQYm9A31sMi4P1LSY6nof6oJFyCIthvYsIp7MuPsMmVpsdU | Facebook Facebook 邮箱或手机号 密码 忘记账户了? 创建新账户 你暂时被禁止使用此功能 你暂时被禁止使用此功能 似乎你过度使用了此功能,因此暂时被阻止,不能继续使用。 Back 中文(简体) 한국어 English (US) Tiếng Việt Bahasa Indonesia ภาษาไทย Español 日本語 Português (Brasil) Français (France) Deutsch 注册 登录 Messenger Facebook Lite 视频 Meta Pay Meta 商店 Meta Quest Ray-Ban Meta Meta AI Meta AI 更多内容 Instagram Threads 选民信息中心 隐私政策 隐私中心 关于 创建广告 创建公共主页 开发者 招聘信息 Cookie Ad Choices 条款 帮助 联系人上传和非用户 设置 动态记录 Meta © 2026 | 2026-01-13T09:29:13 |
https://l.facebook.com/l.php?u=https%3A%2F%2Fwww.instagram.com%2F&h=AT1T95w4gi8tqpSqRvGGgrGOkiUQyy29Ywi57Me1nTXzVTpKvS1cskC48qutNYyurKYT2pKI7Lhpl_QU3_xUYTaeMm5AWjDuLv4_nslvb17EALEd6Yz1bM_OFlnT4voiM3WOE_L6GAvefrWx | Facebook Facebook 이메일 또는 휴대폰 비밀번호 계정을 잊으셨나요? 새 계정 만들기 일시적으로 차단됨 일시적으로 차단됨 회원님의 이 기능 사용 속도가 너무 빠른 것 같습니다. 이 기능 사용에서 일시적으로 차단되었습니다. Back 한국어 English (US) Tiếng Việt Bahasa Indonesia ภาษาไทย Español 中文(简体) 日本語 Português (Brasil) Français (France) Deutsch 가입하기 로그인 Messenger Facebook Lite 동영상 Meta Pay Meta 스토어 Meta Quest Ray-Ban Meta Meta AI Meta AI 콘텐츠 더 보기 Instagram Threads 투표 정보 센터 개인정보처리방침 개인정보 보호 센터 정보 광고 만들기 페이지 만들기 개발자 채용 정보 쿠키 AdChoices 이용 약관 고객 센터 연락처 업로드 및 비사용자 설정 활동 로그 Meta © 2026 | 2026-01-13T09:29:13 |
https://www.mkdocs.org/about/license/ | License - MkDocs MkDocs Home Getting Started User Guide User Guide Installation Writing Your Docs Choosing Your Theme Customizing Your Theme Localizing Your Theme Configuration Command Line Interface Deploying Your Docs Developer Guide Developer Guide Themes Translations Plugins API Reference About Release Notes Contributing License Search Previous Next Edit on GitHub License Included projects MkDocs License (BSD) License The legal stuff. Included projects Themes used under license from the ReadTheDocs projects. ReadTheDocs theme - View license . Many thanks to the authors and contributors of those wonderful projects. MkDocs License (BSD) Copyright © 2014, Tom Christie. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Copyright © 2014 Tom Christie , Maintained by the MkDocs Team . Documentation built with MkDocs . Search × Close From here you can search these documents. Enter your search terms below. Keyboard Shortcuts × Close Keys Action ? Open this help n Next page p Previous page s Search | 2026-01-13T09:29:13 |
https://www.facebook.com/login/?next=https%3A%2F%2Fl.facebook.com%2Fl.php%3Fu%3Dhttps%253A%252F%252Fwww.instagram.com%252F%26amp%253Bh%3DAT01G6_nw6Bh-5sCbp2-aSr0g4Qn7kzux3KaClq4B-Ydqu_2cilx63HukRJNrpVSfO5KTOnvI2cAQAO9cOP5vcEy6U8cteIXFwQYm9A31sMi4P1LSY6nof6oJFyCIthvYsIp7MuPsMmVpsdU | Facebook Facebook 이메일 또는 휴대폰 비밀번호 계정을 잊으셨나요? 새 계정 만들기 일시적으로 차단됨 일시적으로 차단됨 회원님의 이 기능 사용 속도가 너무 빠른 것 같습니다. 이 기능 사용에서 일시적으로 차단되었습니다. Back 한국어 English (US) Tiếng Việt Bahasa Indonesia ภาษาไทย Español 中文(简体) 日本語 Português (Brasil) Français (France) Deutsch 가입하기 로그인 Messenger Facebook Lite 동영상 Meta Pay Meta 스토어 Meta Quest Ray-Ban Meta Meta AI Meta AI 콘텐츠 더 보기 Instagram Threads 투표 정보 센터 개인정보처리방침 개인정보 보호 센터 정보 광고 만들기 페이지 만들기 개발자 채용 정보 쿠키 AdChoices 이용 약관 고객 센터 연락처 업로드 및 비사용자 설정 활동 로그 Meta © 2026 | 2026-01-13T09:29:13 |
https://es-la.facebook.com/login/?next=https%3A%2F%2Fl.facebook.com%2Fl.php%3Fu%3Dhttps%253A%252F%252Fwww.instagram.com%252F%26amp%253Bh%3DAT1ho_VP7aujGp5hB4ABLthmbsEWrryyldymj0vBdjJwyRf7zNOtfd1oG7waETjDOdLBwcZdBo3rgfTtglHDh6uX0PyAMCZgocf5nLGRtfjyQI5DR8xukPL7vIBSBrdeFJ7kQX0NDPsm3Epp | Facebook Facebook Correo o teléfono Contraseña ¿Olvidaste tu cuenta? Crear cuenta nueva Se te bloqueó temporalmente Se te bloqueó temporalmente Parece que hiciste un uso indebido de esta función al ir muy rápido. Se te bloqueó su uso temporalmente. Back Español 한국어 English (US) Tiếng Việt Bahasa Indonesia ภาษาไทย 中文(简体) 日本語 Português (Brasil) Français (France) Deutsch Registrarte Iniciar sesión Messenger Facebook Lite Video Meta Pay Tienda de Meta Meta Quest Ray-Ban Meta Meta AI Más contenido de Meta AI Instagram Threads Centro de información de votación Política de privacidad Centro de privacidad Información Crear anuncio Crear página Desarrolladores Empleo Cookies Opciones de anuncios Condiciones Ayuda Importación de contactos y no usuarios Configuración Registro de actividad Meta © 2026 | 2026-01-13T09:29:13 |
https://doc.rust-lang.org/std/cmp/trait.PartialOrd.html | PartialOrd in std::cmp - Rust This old browser is unsupported and will most likely display funky things. PartialOrd std 1.92.0 (ded5c06cf 2025-12-08) Partial Ord Sections Cross-crate considerations Corollaries Strict and non-strict partial orders Derivable How can I implement PartialOrd ? Examples of incorrect PartialOrd implementations Examples Required Methods partial_cmp Provided Methods ge gt le lt Implementors In std:: cmp std :: cmp Trait Partial Ord Copy item path 1.0.0 (const: unstable ) · Source pub trait PartialOrd<Rhs = Self>: PartialEq <Rhs> where Rhs: ? Sized , { // Required method fn partial_cmp (&self, other: &Rhs ) -> Option < Ordering >; // Provided methods fn lt (&self, other: &Rhs ) -> bool { ... } fn le (&self, other: &Rhs ) -> bool { ... } fn gt (&self, other: &Rhs ) -> bool { ... } fn ge (&self, other: &Rhs ) -> bool { ... } } Expand description Trait for types that form a partial order . The lt , le , gt , and ge methods of this trait can be called using the < , <= , > , and >= operators, respectively. This trait should only contain the comparison logic for a type if one plans on only implementing PartialOrd but not Ord . Otherwise the comparison logic should be in Ord and this trait implemented with Some(self.cmp(other)) . The methods of this trait must be consistent with each other and with those of PartialEq . The following conditions must hold: a == b if and only if partial_cmp(a, b) == Some(Equal) . a < b if and only if partial_cmp(a, b) == Some(Less) a > b if and only if partial_cmp(a, b) == Some(Greater) a <= b if and only if a < b || a == b a >= b if and only if a > b || a == b a != b if and only if !(a == b) . Conditions 2–5 above are ensured by the default implementation. Condition 6 is already ensured by PartialEq . If Ord is also implemented for Self and Rhs , it must also be consistent with partial_cmp (see the documentation of that trait for the exact requirements). It’s easy to accidentally make them disagree by deriving some of the traits and manually implementing others. The comparison relations must satisfy the following conditions (for all a , b , c of type A , B , C ): Transitivity : if A: PartialOrd<B> and B: PartialOrd<C> and A: PartialOrd<C> , then a < b and b < c implies a < c . The same must hold for both == and > . This must also work for longer chains, such as when A: PartialOrd<B> , B: PartialOrd<C> , C: PartialOrd<D> , and A: PartialOrd<D> all exist. Duality : if A: PartialOrd<B> and B: PartialOrd<A> , then a < b if and only if b > a . Note that the B: PartialOrd<A> (dual) and A: PartialOrd<C> (transitive) impls are not forced to exist, but these requirements apply whenever they do exist. Violating these requirements is a logic error. The behavior resulting from a logic error is not specified, but users of the trait must ensure that such logic errors do not result in undefined behavior. This means that unsafe code must not rely on the correctness of these methods. § Cross-crate considerations Upholding the requirements stated above can become tricky when one crate implements PartialOrd for a type of another crate (i.e., to allow comparing one of its own types with a type from the standard library). The recommendation is to never implement this trait for a foreign type. In other words, such a crate should do impl PartialOrd<ForeignType> for LocalType , but it should not do impl PartialOrd<LocalType> for ForeignType . This avoids the problem of transitive chains that criss-cross crate boundaries: for all local types T , you may assume that no other crate will add impl s that allow comparing T < U . In other words, if other crates add impl s that allow building longer transitive chains U1 < ... < T < V1 < ... , then all the types that appear to the right of T must be types that the crate defining T already knows about. This rules out transitive chains where downstream crates can add new impl s that “stitch together” comparisons of foreign types in ways that violate transitivity. Not having such foreign impl s also avoids forward compatibility issues where one crate adding more PartialOrd implementations can cause build failures in downstream crates. § Corollaries The following corollaries follow from the above requirements: irreflexivity of < and > : !(a < a) , !(a > a) transitivity of > : if a > b and b > c then a > c duality of partial_cmp : partial_cmp(a, b) == partial_cmp(b, a).map(Ordering::reverse) § Strict and non-strict partial orders The < and > operators behave according to a strict partial order. However, <= and >= do not behave according to a non-strict partial order. That is because mathematically, a non-strict partial order would require reflexivity, i.e. a <= a would need to be true for every a . This isn’t always the case for types that implement PartialOrd , for example: let a = f64::sqrt(- 1.0 ); assert_eq! (a <= a, false ); § Derivable This trait can be used with #[derive] . When derive d on structs, it will produce a lexicographic ordering based on the top-to-bottom declaration order of the struct’s members. When derive d on enums, variants are primarily ordered by their discriminants. Secondarily, they are ordered by their fields. By default, the discriminant is smallest for variants at the top, and largest for variants at the bottom. Here’s an example: #[derive(PartialEq, PartialOrd)] enum E { Top, Bottom, } assert! (E::Top < E::Bottom); However, manually setting the discriminants can override this default behavior: #[derive(PartialEq, PartialOrd)] enum E { Top = 2 , Bottom = 1 , } assert! (E::Bottom < E::Top); § How can I implement PartialOrd ? PartialOrd only requires implementation of the partial_cmp method, with the others generated from default implementations. However it remains possible to implement the others separately for types which do not have a total order. For example, for floating point numbers, NaN < 0 == false and NaN >= 0 == false (cf. IEEE 754-2008 section 5.11). PartialOrd requires your type to be PartialEq . If your type is Ord , you can implement partial_cmp by using cmp : use std::cmp::Ordering; struct Person { id: u32, name: String, height: u32, } impl PartialOrd for Person { fn partial_cmp( & self , other: & Self ) -> Option <Ordering> { Some ( self .cmp(other)) } } impl Ord for Person { fn cmp( & self , other: & Self ) -> Ordering { self .height.cmp( & other.height) } } impl PartialEq for Person { fn eq( & self , other: & Self ) -> bool { self .height == other.height } } impl Eq for Person {} You may also find it useful to use partial_cmp on your type’s fields. Here is an example of Person types who have a floating-point height field that is the only field to be used for sorting: use std::cmp::Ordering; struct Person { id: u32, name: String, height: f64, } impl PartialOrd for Person { fn partial_cmp( & self , other: & Self ) -> Option <Ordering> { self .height.partial_cmp( & other.height) } } impl PartialEq for Person { fn eq( & self , other: & Self ) -> bool { self .height == other.height } } § Examples of incorrect PartialOrd implementations use std::cmp::Ordering; #[derive(PartialEq, Debug)] struct Character { health: u32, experience: u32, } impl PartialOrd for Character { fn partial_cmp( & self , other: & Self ) -> Option <Ordering> { Some ( self .health.cmp( & other.health)) } } let a = Character { health: 10 , experience: 5 , }; let b = Character { health: 10 , experience: 77 , }; // Mistake: `PartialEq` and `PartialOrd` disagree with each other. assert_eq! (a.partial_cmp( & b).unwrap(), Ordering::Equal); // a == b according to `PartialOrd`. assert_ne! (a, b); // a != b according to `PartialEq`. § Examples let x: u32 = 0 ; let y: u32 = 1 ; assert_eq! (x < y, true ); assert_eq! (x.lt( & y), true ); Required Methods § 1.0.0 · Source fn partial_cmp (&self, other: &Rhs ) -> Option < Ordering > This method returns an ordering between self and other values if one exists. § Examples use std::cmp::Ordering; let result = 1.0 .partial_cmp( & 2.0 ); assert_eq! (result, Some (Ordering::Less)); let result = 1.0 .partial_cmp( & 1.0 ); assert_eq! (result, Some (Ordering::Equal)); let result = 2.0 .partial_cmp( & 1.0 ); assert_eq! (result, Some (Ordering::Greater)); When comparison is impossible: let result = f64::NAN.partial_cmp( & 1.0 ); assert_eq! (result, None ); Provided Methods § 1.0.0 · Source fn lt (&self, other: &Rhs ) -> bool Tests less than (for self and other ) and is used by the < operator. § Examples assert_eq! ( 1.0 < 1.0 , false ); assert_eq! ( 1.0 < 2.0 , true ); assert_eq! ( 2.0 < 1.0 , false ); 1.0.0 · Source fn le (&self, other: &Rhs ) -> bool Tests less than or equal to (for self and other ) and is used by the <= operator. § Examples assert_eq! ( 1.0 <= 1.0 , true ); assert_eq! ( 1.0 <= 2.0 , true ); assert_eq! ( 2.0 <= 1.0 , false ); 1.0.0 · Source fn gt (&self, other: &Rhs ) -> bool Tests greater than (for self and other ) and is used by the > operator. § Examples assert_eq! ( 1.0 > 1.0 , false ); assert_eq! ( 1.0 > 2.0 , false ); assert_eq! ( 2.0 > 1.0 , true ); 1.0.0 · Source fn ge (&self, other: &Rhs ) -> bool Tests greater than or equal to (for self and other ) and is used by the >= operator. § Examples assert_eq! ( 1.0 >= 1.0 , true ); assert_eq! ( 1.0 >= 2.0 , false ); assert_eq! ( 2.0 >= 1.0 , true ); Implementors § Source § impl PartialOrd for AsciiChar 1.34.0 (const: unstable ) · Source § impl PartialOrd for Infallible 1.0.0 · Source § impl PartialOrd for ErrorKind 1.7.0 · Source § impl PartialOrd for IpAddr 1.0.0 · Source § impl PartialOrd for SocketAddr 1.0.0 (const: unstable ) · Source § impl PartialOrd for Ordering 1.0.0 (const: unstable ) · Source § impl PartialOrd for bool 1.0.0 (const: unstable ) · Source § impl PartialOrd for char 1.0.0 (const: unstable ) · Source § impl PartialOrd for f16 1.0.0 (const: unstable ) · Source § impl PartialOrd for f32 1.0.0 (const: unstable ) · Source § impl PartialOrd for f64 1.0.0 (const: unstable ) · Source § impl PartialOrd for f128 1.0.0 (const: unstable ) · Source § impl PartialOrd for i8 1.0.0 (const: unstable ) · Source § impl PartialOrd for i16 1.0.0 (const: unstable ) · Source § impl PartialOrd for i32 1.0.0 (const: unstable ) · Source § impl PartialOrd for i64 1.0.0 (const: unstable ) · Source § impl PartialOrd for i128 1.0.0 (const: unstable ) · Source § impl PartialOrd for isize Source § impl PartialOrd for ! 1.0.0 · Source § impl PartialOrd for str Implements comparison operations on strings. Strings are compared lexicographically by their byte values. This compares Unicode code points based on their positions in the code charts. This is not necessarily the same as “alphabetical” order, which varies by language and locale. Comparing strings according to culturally-accepted standards requires locale-specific data that is outside the scope of the str type. 1.0.0 (const: unstable ) · Source § impl PartialOrd for u8 1.0.0 (const: unstable ) · Source § impl PartialOrd for u16 1.0.0 (const: unstable ) · Source § impl PartialOrd for u32 1.0.0 (const: unstable ) · Source § impl PartialOrd for u64 1.0.0 (const: unstable ) · Source § impl PartialOrd for u128 1.0.0 (const: unstable ) · Source § impl PartialOrd for () 1.0.0 (const: unstable ) · Source § impl PartialOrd for usize 1.27.0 · Source § impl PartialOrd for CpuidResult 1.0.0 · Source § impl PartialOrd for TypeId Source § impl PartialOrd for ByteStr Source § impl PartialOrd for ByteString 1.0.0 · Source § impl PartialOrd for CStr 1.64.0 · Source § impl PartialOrd for CString 1.0.0 · Source § impl PartialOrd for OsStr 1.0.0 · Source § impl PartialOrd for OsString 1.0.0 · Source § impl PartialOrd for Error 1.33.0 · Source § impl PartialOrd for PhantomPinned 1.0.0 · Source § impl PartialOrd for Ipv4Addr 1.0.0 · Source § impl PartialOrd for Ipv6Addr 1.0.0 · Source § impl PartialOrd for SocketAddrV4 1.0.0 · Source § impl PartialOrd for SocketAddrV6 1.10.0 · Source § impl PartialOrd for Location <'_> 1.0.0 · Source § impl PartialOrd for Path 1.0.0 · Source § impl PartialOrd for PathBuf Source § impl PartialOrd for Alignment 1.0.0 · Source § impl PartialOrd for String 1.3.0 · Source § impl PartialOrd for Duration 1.8.0 · Source § impl PartialOrd for Instant 1.8.0 · Source § impl PartialOrd for SystemTime 1.16.0 · Source § impl PartialOrd < IpAddr > for Ipv4Addr 1.16.0 · Source § impl PartialOrd < IpAddr > for Ipv6Addr 1.0.0 · Source § impl PartialOrd < str > for OsStr 1.0.0 · Source § impl PartialOrd < str > for OsString 1.8.0 · Source § impl PartialOrd < OsStr > for Path 1.8.0 · Source § impl PartialOrd < OsStr > for PathBuf 1.8.0 · Source § impl PartialOrd < OsString > for Path 1.8.0 · Source § impl PartialOrd < OsString > for PathBuf 1.16.0 · Source § impl PartialOrd < Ipv4Addr > for IpAddr 1.16.0 · Source § impl PartialOrd < Ipv6Addr > for IpAddr 1.8.0 · Source § impl PartialOrd < Path > for OsStr 1.8.0 · Source § impl PartialOrd < Path > for OsString 1.8.0 · Source § impl PartialOrd < Path > for PathBuf 1.8.0 · Source § impl PartialOrd < PathBuf > for OsStr 1.8.0 · Source § impl PartialOrd < PathBuf > for OsString 1.8.0 · Source § impl PartialOrd < PathBuf > for Path 1.0.0 · Source § impl<'a> PartialOrd for Component <'a> 1.0.0 · Source § impl<'a> PartialOrd for Prefix <'a> Source § impl<'a> PartialOrd for PhantomContravariantLifetime <'a> Source § impl<'a> PartialOrd for PhantomCovariantLifetime <'a> Source § impl<'a> PartialOrd for PhantomInvariantLifetime <'a> 1.0.0 · Source § impl<'a> PartialOrd for Components <'a> 1.0.0 · Source § impl<'a> PartialOrd for PrefixComponent <'a> Source § impl<'a> PartialOrd <&'a ByteStr > for Cow <'a, str > Source § impl<'a> PartialOrd <&'a ByteStr > for Cow <'a, ByteStr > Source § impl<'a> PartialOrd <&'a ByteStr > for Cow <'a, [ u8 ]> 1.8.0 · Source § impl<'a> PartialOrd <&'a OsStr > for Path 1.8.0 · Source § impl<'a> PartialOrd <&'a OsStr > for PathBuf 1.8.0 · Source § impl<'a> PartialOrd <&'a Path > for OsStr 1.8.0 · Source § impl<'a> PartialOrd <&'a Path > for OsString 1.8.0 · Source § impl<'a> PartialOrd <&'a Path > for PathBuf Source § impl<'a> PartialOrd <& ByteStr > for ByteString Source § impl<'a> PartialOrd < Cow <'_, str >> for ByteString Source § impl<'a> PartialOrd < Cow <'_, ByteStr >> for ByteString Source § impl<'a> PartialOrd < Cow <'_, [ u8 ]>> for ByteString Source § impl<'a> PartialOrd < Cow <'a, str >> for &'a ByteStr Source § impl<'a> PartialOrd < Cow <'a, ByteStr >> for &'a ByteStr 1.8.0 · Source § impl<'a> PartialOrd < Cow <'a, OsStr >> for Path 1.8.0 · Source § impl<'a> PartialOrd < Cow <'a, OsStr >> for PathBuf 1.8.0 · Source § impl<'a> PartialOrd < Cow <'a, Path >> for OsStr 1.8.0 · Source § impl<'a> PartialOrd < Cow <'a, Path >> for OsString 1.8.0 · Source § impl<'a> PartialOrd < Cow <'a, Path >> for Path 1.8.0 · Source § impl<'a> PartialOrd < Cow <'a, Path >> for PathBuf Source § impl<'a> PartialOrd < Cow <'a, [ u8 ]>> for &'a ByteStr Source § impl<'a> PartialOrd < ByteStr > for ByteString Source § impl<'a> PartialOrd < ByteString > for & ByteStr Source § impl<'a> PartialOrd < ByteString > for Cow <'_, str > Source § impl<'a> PartialOrd < ByteString > for Cow <'_, ByteStr > Source § impl<'a> PartialOrd < ByteString > for Cow <'_, [ u8 ]> Source § impl<'a> PartialOrd < ByteString > for ByteStr 1.8.0 · Source § impl<'a> PartialOrd < OsStr > for &'a Path 1.8.0 · Source § impl<'a> PartialOrd < OsStr > for Cow <'a, Path > 1.8.0 · Source § impl<'a> PartialOrd < OsString > for &'a Path 1.8.0 · Source § impl<'a> PartialOrd < OsString > for Cow <'a, Path > 1.8.0 · Source § impl<'a> PartialOrd < Path > for &'a OsStr 1.8.0 · Source § impl<'a> PartialOrd < Path > for Cow <'a, OsStr > 1.8.0 · Source § impl<'a> PartialOrd < Path > for Cow <'a, Path > 1.8.0 · Source § impl<'a> PartialOrd < PathBuf > for &'a OsStr 1.8.0 · Source § impl<'a> PartialOrd < PathBuf > for &'a Path 1.8.0 · Source § impl<'a> PartialOrd < PathBuf > for Cow <'a, OsStr > 1.8.0 · Source § impl<'a> PartialOrd < PathBuf > for Cow <'a, Path > 1.8.0 · Source § impl<'a, 'b> PartialOrd <&'a OsStr > for OsString 1.8.0 · Source § impl<'a, 'b> PartialOrd <&'a Path > for Cow <'b, OsStr > 1.8.0 · Source § impl<'a, 'b> PartialOrd <&'b OsStr > for Cow <'a, OsStr > 1.8.0 · Source § impl<'a, 'b> PartialOrd <&'b OsStr > for Cow <'a, Path > 1.8.0 · Source § impl<'a, 'b> PartialOrd <&'b Path > for Cow <'a, Path > 1.8.0 · Source § impl<'a, 'b> PartialOrd < Cow <'a, OsStr >> for &'b OsStr 1.8.0 · Source § impl<'a, 'b> PartialOrd < Cow <'a, OsStr >> for OsStr 1.8.0 · Source § impl<'a, 'b> PartialOrd < Cow <'a, OsStr >> for OsString 1.8.0 · Source § impl<'a, 'b> PartialOrd < Cow <'a, Path >> for &'b OsStr 1.8.0 · Source § impl<'a, 'b> PartialOrd < Cow <'a, Path >> for &'b Path 1.8.0 · Source § impl<'a, 'b> PartialOrd < Cow <'b, OsStr >> for &'a Path 1.8.0 · Source § impl<'a, 'b> PartialOrd < OsStr > for Cow <'a, OsStr > 1.8.0 · Source § impl<'a, 'b> PartialOrd < OsStr > for OsString 1.8.0 · Source § impl<'a, 'b> PartialOrd < OsString > for &'a OsStr 1.8.0 · Source § impl<'a, 'b> PartialOrd < OsString > for Cow <'a, OsStr > 1.8.0 · Source § impl<'a, 'b> PartialOrd < OsString > for OsStr 1.0.0 · Source § impl<'a, B> PartialOrd for Cow <'a, B> where B: PartialOrd + ToOwned + ? Sized , 1.0.0 (const: unstable ) · Source § impl<A, B> PartialOrd < &B > for &A where A: PartialOrd <B> + ? Sized , B: ? Sized , 1.0.0 (const: unstable ) · Source § impl<A, B> PartialOrd < &mut B > for &mut A where A: PartialOrd <B> + ? Sized , B: ? Sized , Source § impl<Dyn> PartialOrd for DynMetadata <Dyn> where Dyn: ? Sized , 1.4.0 · Source § impl<F> PartialOrd for F where F: FnPtr , 1.0.0 · Source § impl<K, V, A> PartialOrd for BTreeMap <K, V, A> where K: PartialOrd , V: PartialOrd , A: Allocator + Clone , 1.41.0 · Source § impl<Ptr, Q> PartialOrd < Pin <Q>> for Pin <Ptr> where Ptr: Deref , Q: Deref , <Ptr as Deref >:: Target : PartialOrd <<Q as Deref >:: Target >, 1.0.0 (const: unstable ) · Source § impl<T> PartialOrd for Option <T> where T: PartialOrd , 1.36.0 · Source § impl<T> PartialOrd for Poll <T> where T: PartialOrd , 1.0.0 · Source § impl<T> PartialOrd for *const T where T: ? Sized , Pointer comparison is by address, as produced by the [ <*const T>::addr ](pointer::addr) method. 1.0.0 · Source § impl<T> PartialOrd for *mut T where T: ? Sized , Pointer comparison is by address, as produced by the <*mut T>::addr method. 1.0.0 · Source § impl<T> PartialOrd for [T] where T: PartialOrd , Implements comparison of slices lexicographically . 1.0.0 (const: unstable ) · Source § impl<T> PartialOrd for (T₁, T₂, …, Tₙ) where T: PartialOrd , This trait is implemented for tuples up to twelve items long. 1.10.0 · Source § impl<T> PartialOrd for Cell <T> where T: PartialOrd + Copy , 1.10.0 · Source § impl<T> PartialOrd for RefCell <T> where T: PartialOrd + ? Sized , Source § impl<T> PartialOrd for PhantomContravariant <T> where T: ? Sized , Source § impl<T> PartialOrd for PhantomCovariant <T> where T: ? Sized , 1.0.0 · Source § impl<T> PartialOrd for PhantomData <T> where T: ? Sized , Source § impl<T> PartialOrd for PhantomInvariant <T> where T: ? Sized , 1.20.0 · Source § impl<T> PartialOrd for ManuallyDrop <T> where T: PartialOrd + ? Sized , 1.28.0 (const: unstable ) · Source § impl<T> PartialOrd for NonZero <T> where T: ZeroablePrimitive + PartialOrd , 1.74.0 · Source § impl<T> PartialOrd for Saturating <T> where T: PartialOrd , 1.0.0 · Source § impl<T> PartialOrd for Wrapping <T> where T: PartialOrd , 1.25.0 · Source § impl<T> PartialOrd for NonNull <T> where T: ? Sized , 1.19.0 (const: unstable ) · Source § impl<T> PartialOrd for Reverse <T> where T: PartialOrd , 1.0.0 · Source § impl<T, A1, A2> PartialOrd < Vec <T, A2>> for Vec <T, A1> where T: PartialOrd , A1: Allocator , A2: Allocator , Implements comparison of vectors, lexicographically . 1.0.0 · Source § impl<T, A> PartialOrd for Box <T, A> where T: PartialOrd + ? Sized , A: Allocator , 1.0.0 · Source § impl<T, A> PartialOrd for BTreeSet <T, A> where T: PartialOrd , A: Allocator + Clone , 1.0.0 · Source § impl<T, A> PartialOrd for LinkedList <T, A> where T: PartialOrd , A: Allocator , 1.0.0 · Source § impl<T, A> PartialOrd for VecDeque <T, A> where T: PartialOrd , A: Allocator , 1.0.0 · Source § impl<T, A> PartialOrd for Rc <T, A> where T: PartialOrd + ? Sized , A: Allocator , Source § impl<T, A> PartialOrd for UniqueRc <T, A> where T: PartialOrd + ? Sized , A: Allocator , 1.0.0 · Source § impl<T, A> PartialOrd for Arc <T, A> where T: PartialOrd + ? Sized , A: Allocator , Source § impl<T, A> PartialOrd for UniqueArc <T, A> where T: PartialOrd + ? Sized , A: Allocator , 1.0.0 (const: unstable ) · Source § impl<T, E> PartialOrd for Result <T, E> where T: PartialOrd , E: PartialOrd , Source § impl<T, U> PartialOrd < Exclusive <U>> for Exclusive <T> where T: Sync + PartialOrd <U> + ? Sized , U: Sync + ? Sized , 1.0.0 · Source § impl<T, const N: usize > PartialOrd for [T; N] where T: PartialOrd , Implements comparison of arrays lexicographically . Source § impl<T, const N: usize > PartialOrd for Mask <T, N> where T: MaskElement + PartialOrd , LaneCount <N>: SupportedLaneCount , Source § impl<T, const N: usize > PartialOrd for Simd <T, N> where LaneCount <N>: SupportedLaneCount , T: SimdElement + PartialOrd , Lexicographic order. For the SIMD elementwise minimum and maximum, use simd_min and simd_max instead. Source § impl<Y, R> PartialOrd for CoroutineState <Y, R> where Y: PartialOrd , R: PartialOrd , | 2026-01-13T09:29:13 |
https://www.facebook.com/login/?next=https%3A%2F%2Fl.facebook.com%2Fl.php%3Fu%3Dhttps%253A%252F%252Fwww.instagram.com%252F%26amp%253Bh%3DAT2n2ad5edoxiZfbpoMEkNGCapqvjk3Zha8c1DS-IfhWMQRD-QXdRlQEcCYCl1RRAYHR0Mx37s1OKzcyqjS_88yFX-L67y4s2hGhnwpT3j1OIUkQ_EplDVcwoVuogpB-iRktRQbugSbxt_WX | Facebook Facebook 이메일 또는 휴대폰 비밀번호 계정을 잊으셨나요? 새 계정 만들기 일시적으로 차단됨 일시적으로 차단됨 회원님의 이 기능 사용 속도가 너무 빠른 것 같습니다. 이 기능 사용에서 일시적으로 차단되었습니다. Back 한국어 English (US) Tiếng Việt Bahasa Indonesia ภาษาไทย Español 中文(简体) 日本語 Português (Brasil) Français (France) Deutsch 가입하기 로그인 Messenger Facebook Lite 동영상 Meta Pay Meta 스토어 Meta Quest Ray-Ban Meta Meta AI Meta AI 콘텐츠 더 보기 Instagram Threads 투표 정보 센터 개인정보처리방침 개인정보 보호 센터 정보 광고 만들기 페이지 만들기 개발자 채용 정보 쿠키 AdChoices 이용 약관 고객 센터 연락처 업로드 및 비사용자 설정 활동 로그 Meta © 2026 | 2026-01-13T09:29:13 |
https://zh-cn.facebook.com/login/?privacy_mutation_token=eyJ0eXBlIjowLCJjcmVhdGlvbl90aW1lIjoxNzY4Mjk2MDkzLCJjYWxsc2l0ZV9pZCI6MjY5NTQ4NDUzMDcyMDk1MX0%3D | Facebook Facebook 邮箱或手机号 密码 忘记账户了? 创建新账户 你暂时被禁止使用此功能 你暂时被禁止使用此功能 似乎你过度使用了此功能,因此暂时被阻止,不能继续使用。 Back 中文(简体) 한국어 English (US) Tiếng Việt Bahasa Indonesia ภาษาไทย Español 日本語 Português (Brasil) Français (France) Deutsch 注册 登录 Messenger Facebook Lite 视频 Meta Pay Meta 商店 Meta Quest Ray-Ban Meta Meta AI Meta AI 更多内容 Instagram Threads 选民信息中心 隐私政策 隐私中心 关于 创建广告 创建公共主页 开发者 招聘信息 Cookie Ad Choices 条款 帮助 联系人上传和非用户 设置 动态记录 Meta © 2026 | 2026-01-13T09:29:13 |
https://l.facebook.com/l.php?u=https%3A%2F%2Fwww.instagram.com%2F&h=AT1p0CVorLUm8bbgJkeqUSiiYbWEwuGGrcXFfqTPeApag_NNIuZFOdcJ5ACAIszcJm7k2t4gbpOWjk5izy49d6-KLuxshTcirj_2iNgo9S0xsuRw0tMtHtR9gwFOJeBr3VuNZv58EqqCOepEl8YqghjWJUN_uA | Facebook Facebook 이메일 또는 휴대폰 비밀번호 계정을 잊으셨나요? 새 계정 만들기 일시적으로 차단됨 일시적으로 차단됨 회원님의 이 기능 사용 속도가 너무 빠른 것 같습니다. 이 기능 사용에서 일시적으로 차단되었습니다. Back 한국어 English (US) Tiếng Việt Bahasa Indonesia ภาษาไทย Español 中文(简体) 日本語 Português (Brasil) Français (France) Deutsch 가입하기 로그인 Messenger Facebook Lite 동영상 Meta Pay Meta 스토어 Meta Quest Ray-Ban Meta Meta AI Meta AI 콘텐츠 더 보기 Instagram Threads 투표 정보 센터 개인정보처리방침 개인정보 보호 센터 정보 광고 만들기 페이지 만들기 개발자 채용 정보 쿠키 AdChoices 이용 약관 고객 센터 연락처 업로드 및 비사용자 설정 활동 로그 Meta © 2026 | 2026-01-13T09:29:13 |
https://l.facebook.com/l.php?u=https%3A%2F%2Fwww.instagram.com%2F&h=AT2Tf7ZXHHeVsM7cbSNetAmd2MQ6no84q_SM4lJ07_FfPGVgjqmRQfgUbbGaljR-wQsINS1IrDQhSWVwJSvwAViSHNWqeXQE8hhSIR1gay2V706d_DFkSdlg49nes_kztLjzhfSmvd82AsPY | Facebook Facebook 이메일 또는 휴대폰 비밀번호 계정을 잊으셨나요? 새 계정 만들기 일시적으로 차단됨 일시적으로 차단됨 회원님의 이 기능 사용 속도가 너무 빠른 것 같습니다. 이 기능 사용에서 일시적으로 차단되었습니다. Back 한국어 English (US) Tiếng Việt Bahasa Indonesia ภาษาไทย Español 中文(简体) 日本語 Português (Brasil) Français (France) Deutsch 가입하기 로그인 Messenger Facebook Lite 동영상 Meta Pay Meta 스토어 Meta Quest Ray-Ban Meta Meta AI Meta AI 콘텐츠 더 보기 Instagram Threads 투표 정보 센터 개인정보처리방침 개인정보 보호 센터 정보 광고 만들기 페이지 만들기 개발자 채용 정보 쿠키 AdChoices 이용 약관 고객 센터 연락처 업로드 및 비사용자 설정 활동 로그 Meta © 2026 | 2026-01-13T09:29:13 |
https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.collect | Iterator in std::iter - Rust This old browser is unsupported and will most likely display funky things. Iterator std 1.92.0 (ded5c06cf 2025-12-08) Iterator Required Associated Types Item Required Methods next Provided Methods advance_by all any array_chunks by_ref chain cloned cmp cmp_by collect collect_into copied count cycle enumerate eq eq_by filter filter_map find find_map flat_map flatten fold for_each fuse ge gt inspect intersperse intersperse_with is_partitioned is_sorted is_sorted_by is_sorted_by_key last le lt map map_while map_windows max max_by max_by_key min min_by min_by_key ne next_chunk nth partial_cmp partial_cmp_by partition partition_in_place peekable position product reduce rev rposition scan size_hint skip skip_while step_by sum take take_while try_collect try_find try_fold try_for_each try_reduce unzip zip Implementors In std:: iter std :: iter Trait Iterator Copy item path 1.0.0 · Source pub trait Iterator { type Item ; Show 76 methods // Required method fn next (&mut self) -> Option <Self:: Item >; // Provided methods fn next_chunk <const N: usize >( &mut self, ) -> Result <[Self:: Item ; N ], IntoIter <Self:: Item , N>> where Self: Sized { ... } fn size_hint (&self) -> ( usize , Option < usize >) { ... } fn count (self) -> usize where Self: Sized { ... } fn last (self) -> Option <Self:: Item > where Self: Sized { ... } fn advance_by (&mut self, n: usize ) -> Result < () , NonZero < usize >> { ... } fn nth (&mut self, n: usize ) -> Option <Self:: Item > { ... } fn step_by (self, step: usize ) -> StepBy <Self> ⓘ where Self: Sized { ... } fn chain <U>(self, other: U) -> Chain <Self, <U as IntoIterator >:: IntoIter > ⓘ where Self: Sized , U: IntoIterator <Item = Self:: Item > { ... } fn zip <U>(self, other: U) -> Zip <Self, <U as IntoIterator >:: IntoIter > ⓘ where Self: Sized , U: IntoIterator { ... } fn intersperse (self, separator: Self:: Item ) -> Intersperse <Self> ⓘ where Self: Sized , Self:: Item : Clone { ... } fn intersperse_with <G>(self, separator: G) -> IntersperseWith <Self, G> ⓘ where Self: Sized , G: FnMut () -> Self:: Item { ... } fn map <B, F>(self, f: F) -> Map <Self, F> ⓘ where Self: Sized , F: FnMut (Self:: Item ) -> B { ... } fn for_each <F>(self, f: F) where Self: Sized , F: FnMut (Self:: Item ) { ... } fn filter <P>(self, predicate: P) -> Filter <Self, P> ⓘ where Self: Sized , P: FnMut (&Self:: Item ) -> bool { ... } fn filter_map <B, F>(self, f: F) -> FilterMap <Self, F> ⓘ where Self: Sized , F: FnMut (Self:: Item ) -> Option <B> { ... } fn enumerate (self) -> Enumerate <Self> ⓘ where Self: Sized { ... } fn peekable (self) -> Peekable <Self> ⓘ where Self: Sized { ... } fn skip_while <P>(self, predicate: P) -> SkipWhile <Self, P> ⓘ where Self: Sized , P: FnMut (&Self:: Item ) -> bool { ... } fn take_while <P>(self, predicate: P) -> TakeWhile <Self, P> ⓘ where Self: Sized , P: FnMut (&Self:: Item ) -> bool { ... } fn map_while <B, P>(self, predicate: P) -> MapWhile <Self, P> ⓘ where Self: Sized , P: FnMut (Self:: Item ) -> Option <B> { ... } fn skip (self, n: usize ) -> Skip <Self> ⓘ where Self: Sized { ... } fn take (self, n: usize ) -> Take <Self> ⓘ where Self: Sized { ... } fn scan <St, B, F>(self, initial_state: St, f: F) -> Scan <Self, St, F> ⓘ where Self: Sized , F: FnMut ( &mut St , Self:: Item ) -> Option <B> { ... } fn flat_map <U, F>(self, f: F) -> FlatMap <Self, U, F> ⓘ where Self: Sized , U: IntoIterator , F: FnMut (Self:: Item ) -> U { ... } fn flatten (self) -> Flatten <Self> ⓘ where Self: Sized , Self:: Item : IntoIterator { ... } fn map_windows <F, R, const N: usize >(self, f: F) -> MapWindows <Self, F, N> ⓘ where Self: Sized , F: FnMut (&[Self:: Item ; N ]) -> R { ... } fn fuse (self) -> Fuse <Self> ⓘ where Self: Sized { ... } fn inspect <F>(self, f: F) -> Inspect <Self, F> ⓘ where Self: Sized , F: FnMut (&Self:: Item ) { ... } fn by_ref (&mut self) -> &mut Self where Self: Sized { ... } fn collect <B>(self) -> B where B: FromIterator <Self:: Item >, Self: Sized { ... } fn try_collect <B>( &mut self, ) -> <<Self:: Item as Try >:: Residual as Residual <B>>:: TryType where Self: Sized , Self:: Item : Try , <Self:: Item as Try >:: Residual : Residual <B>, B: FromIterator <<Self:: Item as Try >:: Output > { ... } fn collect_into <E>(self, collection: &mut E ) -> &mut E where E: Extend <Self:: Item >, Self: Sized { ... } fn partition <B, F>(self, f: F) -> (B, B) where Self: Sized , B: Default + Extend <Self:: Item >, F: FnMut (&Self:: Item ) -> bool { ... } fn partition_in_place <'a, T, P>(self, predicate: P) -> usize where T: 'a, Self: Sized + DoubleEndedIterator <Item = &'a mut T >, P: FnMut ( &T ) -> bool { ... } fn is_partitioned <P>(self, predicate: P) -> bool where Self: Sized , P: FnMut (Self:: Item ) -> bool { ... } fn try_fold <B, F, R>(&mut self, init: B, f: F) -> R where Self: Sized , F: FnMut (B, Self:: Item ) -> R, R: Try <Output = B> { ... } fn try_for_each <F, R>(&mut self, f: F) -> R where Self: Sized , F: FnMut (Self:: Item ) -> R, R: Try <Output = () > { ... } fn fold <B, F>(self, init: B, f: F) -> B where Self: Sized , F: FnMut (B, Self:: Item ) -> B { ... } fn reduce <F>(self, f: F) -> Option <Self:: Item > where Self: Sized , F: FnMut (Self:: Item , Self:: Item ) -> Self:: Item { ... } fn try_reduce <R>( &mut self, f: impl FnMut (Self:: Item , Self:: Item ) -> R, ) -> <<R as Try >:: Residual as Residual < Option <<R as Try >:: Output >>>:: TryType where Self: Sized , R: Try <Output = Self:: Item >, <R as Try >:: Residual : Residual < Option <Self:: Item >> { ... } fn all <F>(&mut self, f: F) -> bool where Self: Sized , F: FnMut (Self:: Item ) -> bool { ... } fn any <F>(&mut self, f: F) -> bool where Self: Sized , F: FnMut (Self:: Item ) -> bool { ... } fn find <P>(&mut self, predicate: P) -> Option <Self:: Item > where Self: Sized , P: FnMut (&Self:: Item ) -> bool { ... } fn find_map <B, F>(&mut self, f: F) -> Option <B> where Self: Sized , F: FnMut (Self:: Item ) -> Option <B> { ... } fn try_find <R>( &mut self, f: impl FnMut (&Self:: Item ) -> R, ) -> <<R as Try >:: Residual as Residual < Option <Self:: Item >>>:: TryType where Self: Sized , R: Try <Output = bool >, <R as Try >:: Residual : Residual < Option <Self:: Item >> { ... } fn position <P>(&mut self, predicate: P) -> Option < usize > where Self: Sized , P: FnMut (Self:: Item ) -> bool { ... } fn rposition <P>(&mut self, predicate: P) -> Option < usize > where P: FnMut (Self:: Item ) -> bool , Self: Sized + ExactSizeIterator + DoubleEndedIterator { ... } fn max (self) -> Option <Self:: Item > where Self: Sized , Self:: Item : Ord { ... } fn min (self) -> Option <Self:: Item > where Self: Sized , Self:: Item : Ord { ... } fn max_by_key <B, F>(self, f: F) -> Option <Self:: Item > where B: Ord , Self: Sized , F: FnMut (&Self:: Item ) -> B { ... } fn max_by <F>(self, compare: F) -> Option <Self:: Item > where Self: Sized , F: FnMut (&Self:: Item , &Self:: Item ) -> Ordering { ... } fn min_by_key <B, F>(self, f: F) -> Option <Self:: Item > where B: Ord , Self: Sized , F: FnMut (&Self:: Item ) -> B { ... } fn min_by <F>(self, compare: F) -> Option <Self:: Item > where Self: Sized , F: FnMut (&Self:: Item , &Self:: Item ) -> Ordering { ... } fn rev (self) -> Rev <Self> ⓘ where Self: Sized + DoubleEndedIterator { ... } fn unzip <A, B, FromA, FromB>(self) -> (FromA, FromB) where FromA: Default + Extend <A>, FromB: Default + Extend <B>, Self: Sized + Iterator <Item = (A, B) > { ... } fn copied <'a, T>(self) -> Copied <Self> ⓘ where T: Copy + 'a, Self: Sized + Iterator <Item = &'a T > { ... } fn cloned <'a, T>(self) -> Cloned <Self> ⓘ where T: Clone + 'a, Self: Sized + Iterator <Item = &'a T > { ... } fn cycle (self) -> Cycle <Self> ⓘ where Self: Sized + Clone { ... } fn array_chunks <const N: usize >(self) -> ArrayChunks <Self, N> ⓘ where Self: Sized { ... } fn sum <S>(self) -> S where Self: Sized , S: Sum <Self:: Item > { ... } fn product <P>(self) -> P where Self: Sized , P: Product <Self:: Item > { ... } fn cmp <I>(self, other: I) -> Ordering where I: IntoIterator <Item = Self:: Item >, Self:: Item : Ord , Self: Sized { ... } fn cmp_by <I, F>(self, other: I, cmp: F) -> Ordering where Self: Sized , I: IntoIterator , F: FnMut (Self:: Item , <I as IntoIterator >:: Item ) -> Ordering { ... } fn partial_cmp <I>(self, other: I) -> Option < Ordering > where I: IntoIterator , Self:: Item : PartialOrd <<I as IntoIterator >:: Item >, Self: Sized { ... } fn partial_cmp_by <I, F>(self, other: I, partial_cmp: F) -> Option < Ordering > where Self: Sized , I: IntoIterator , F: FnMut (Self:: Item , <I as IntoIterator >:: Item ) -> Option < Ordering > { ... } fn eq <I>(self, other: I) -> bool where I: IntoIterator , Self:: Item : PartialEq <<I as IntoIterator >:: Item >, Self: Sized { ... } fn eq_by <I, F>(self, other: I, eq: F) -> bool where Self: Sized , I: IntoIterator , F: FnMut (Self:: Item , <I as IntoIterator >:: Item ) -> bool { ... } fn ne <I>(self, other: I) -> bool where I: IntoIterator , Self:: Item : PartialEq <<I as IntoIterator >:: Item >, Self: Sized { ... } fn lt <I>(self, other: I) -> bool where I: IntoIterator , Self:: Item : PartialOrd <<I as IntoIterator >:: Item >, Self: Sized { ... } fn le <I>(self, other: I) -> bool where I: IntoIterator , Self:: Item : PartialOrd <<I as IntoIterator >:: Item >, Self: Sized { ... } fn gt <I>(self, other: I) -> bool where I: IntoIterator , Self:: Item : PartialOrd <<I as IntoIterator >:: Item >, Self: Sized { ... } fn ge <I>(self, other: I) -> bool where I: IntoIterator , Self:: Item : PartialOrd <<I as IntoIterator >:: Item >, Self: Sized { ... } fn is_sorted (self) -> bool where Self: Sized , Self:: Item : PartialOrd { ... } fn is_sorted_by <F>(self, compare: F) -> bool where Self: Sized , F: FnMut (&Self:: Item , &Self:: Item ) -> bool { ... } fn is_sorted_by_key <F, K>(self, f: F) -> bool where Self: Sized , F: FnMut (Self:: Item ) -> K, K: PartialOrd { ... } } Expand description A trait for dealing with iterators. This is the main iterator trait. For more about the concept of iterators generally, please see the module-level documentation . In particular, you may want to know how to implement Iterator . Required Associated Types § 1.0.0 · Source type Item The type of the elements being iterated over. Required Methods § 1.0.0 · Source fn next (&mut self) -> Option <Self:: Item > Advances the iterator and returns the next value. Returns None when iteration is finished. Individual iterator implementations may choose to resume iteration, and so calling next() again may or may not eventually start returning Some(Item) again at some point. § Examples let a = [ 1 , 2 , 3 ]; let mut iter = a.into_iter(); // A call to next() returns the next value... assert_eq! ( Some ( 1 ), iter.next()); assert_eq! ( Some ( 2 ), iter.next()); assert_eq! ( Some ( 3 ), iter.next()); // ... and then None once it's over. assert_eq! ( None , iter.next()); // More calls may or may not return `None`. Here, they always will. assert_eq! ( None , iter.next()); assert_eq! ( None , iter.next()); Provided Methods § Source fn next_chunk <const N: usize >( &mut self, ) -> Result <[Self:: Item ; N ], IntoIter <Self:: Item , N>> where Self: Sized , 🔬 This is a nightly-only experimental API. ( iter_next_chunk #98326 ) Advances the iterator and returns an array containing the next N values. If there are not enough elements to fill the array then Err is returned containing an iterator over the remaining elements. § Examples Basic usage: #![feature(iter_next_chunk)] let mut iter = "lorem" .chars(); assert_eq! (iter.next_chunk().unwrap(), [ 'l' , 'o' ]); // N is inferred as 2 assert_eq! (iter.next_chunk().unwrap(), [ 'r' , 'e' , 'm' ]); // N is inferred as 3 assert_eq! (iter.next_chunk::< 4 >().unwrap_err().as_slice(), & []); // N is explicitly 4 Split a string and get the first three items. #![feature(iter_next_chunk)] let quote = "not all those who wander are lost" ; let [first, second, third] = quote.split_whitespace().next_chunk().unwrap(); assert_eq! (first, "not" ); assert_eq! (second, "all" ); assert_eq! (third, "those" ); 1.0.0 · Source fn size_hint (&self) -> ( usize , Option < usize >) Returns the bounds on the remaining length of the iterator. Specifically, size_hint() returns a tuple where the first element is the lower bound, and the second element is the upper bound. The second half of the tuple that is returned is an Option < usize > . A None here means that either there is no known upper bound, or the upper bound is larger than usize . § Implementation notes It is not enforced that an iterator implementation yields the declared number of elements. A buggy iterator may yield less than the lower bound or more than the upper bound of elements. size_hint() is primarily intended to be used for optimizations such as reserving space for the elements of the iterator, but must not be trusted to e.g., omit bounds checks in unsafe code. An incorrect implementation of size_hint() should not lead to memory safety violations. That said, the implementation should provide a correct estimation, because otherwise it would be a violation of the trait’s protocol. The default implementation returns (0, None ) which is correct for any iterator. § Examples Basic usage: let a = [ 1 , 2 , 3 ]; let mut iter = a.iter(); assert_eq! (( 3 , Some ( 3 )), iter.size_hint()); let _ = iter.next(); assert_eq! (( 2 , Some ( 2 )), iter.size_hint()); A more complex example: // The even numbers in the range of zero to nine. let iter = ( 0 .. 10 ).filter(|x| x % 2 == 0 ); // We might iterate from zero to ten times. Knowing that it's five // exactly wouldn't be possible without executing filter(). assert_eq! (( 0 , Some ( 10 )), iter.size_hint()); // Let's add five more numbers with chain() let iter = ( 0 .. 10 ).filter(|x| x % 2 == 0 ).chain( 15 .. 20 ); // now both bounds are increased by five assert_eq! (( 5 , Some ( 15 )), iter.size_hint()); Returning None for an upper bound: // an infinite iterator has no upper bound // and the maximum possible lower bound let iter = 0 ..; assert_eq! ((usize::MAX, None ), iter.size_hint()); 1.0.0 · Source fn count (self) -> usize where Self: Sized , Consumes the iterator, counting the number of iterations and returning it. This method will call next repeatedly until None is encountered, returning the number of times it saw Some . Note that next has to be called at least once even if the iterator does not have any elements. § Overflow Behavior The method does no guarding against overflows, so counting elements of an iterator with more than usize::MAX elements either produces the wrong result or panics. If overflow checks are enabled, a panic is guaranteed. § Panics This function might panic if the iterator has more than usize::MAX elements. § Examples let a = [ 1 , 2 , 3 ]; assert_eq! (a.iter().count(), 3 ); let a = [ 1 , 2 , 3 , 4 , 5 ]; assert_eq! (a.iter().count(), 5 ); 1.0.0 · Source fn last (self) -> Option <Self:: Item > where Self: Sized , Consumes the iterator, returning the last element. This method will evaluate the iterator until it returns None . While doing so, it keeps track of the current element. After None is returned, last() will then return the last element it saw. § Examples let a = [ 1 , 2 , 3 ]; assert_eq! (a.into_iter().last(), Some ( 3 )); let a = [ 1 , 2 , 3 , 4 , 5 ]; assert_eq! (a.into_iter().last(), Some ( 5 )); Source fn advance_by (&mut self, n: usize ) -> Result < () , NonZero < usize >> 🔬 This is a nightly-only experimental API. ( iter_advance_by #77404 ) Advances the iterator by n elements. This method will eagerly skip n elements by calling next up to n times until None is encountered. advance_by(n) will return Ok(()) if the iterator successfully advances by n elements, or a Err(NonZero<usize>) with value k if None is encountered, where k is remaining number of steps that could not be advanced because the iterator ran out. If self is empty and n is non-zero, then this returns Err(n) . Otherwise, k is always less than n . Calling advance_by(0) can do meaningful work, for example Flatten can advance its outer iterator until it finds an inner iterator that is not empty, which then often allows it to return a more accurate size_hint() than in its initial state. § Examples #![feature(iter_advance_by)] use std::num::NonZero; let a = [ 1 , 2 , 3 , 4 ]; let mut iter = a.into_iter(); assert_eq! (iter.advance_by( 2 ), Ok (())); assert_eq! (iter.next(), Some ( 3 )); assert_eq! (iter.advance_by( 0 ), Ok (())); assert_eq! (iter.advance_by( 100 ), Err (NonZero::new( 99 ).unwrap())); // only `4` was skipped 1.0.0 · Source fn nth (&mut self, n: usize ) -> Option <Self:: Item > Returns the n th element of the iterator. Like most indexing operations, the count starts from zero, so nth(0) returns the first value, nth(1) the second, and so on. Note that all preceding elements, as well as the returned element, will be consumed from the iterator. That means that the preceding elements will be discarded, and also that calling nth(0) multiple times on the same iterator will return different elements. nth() will return None if n is greater than or equal to the length of the iterator. § Examples Basic usage: let a = [ 1 , 2 , 3 ]; assert_eq! (a.into_iter().nth( 1 ), Some ( 2 )); Calling nth() multiple times doesn’t rewind the iterator: let a = [ 1 , 2 , 3 ]; let mut iter = a.into_iter(); assert_eq! (iter.nth( 1 ), Some ( 2 )); assert_eq! (iter.nth( 1 ), None ); Returning None if there are less than n + 1 elements: let a = [ 1 , 2 , 3 ]; assert_eq! (a.into_iter().nth( 10 ), None ); 1.28.0 · Source fn step_by (self, step: usize ) -> StepBy <Self> ⓘ where Self: Sized , Creates an iterator starting at the same point, but stepping by the given amount at each iteration. Note 1: The first element of the iterator will always be returned, regardless of the step given. Note 2: The time at which ignored elements are pulled is not fixed. StepBy behaves like the sequence self.next() , self.nth(step-1) , self.nth(step-1) , …, but is also free to behave like the sequence advance_n_and_return_first(&mut self, step) , advance_n_and_return_first(&mut self, step) , … Which way is used may change for some iterators for performance reasons. The second way will advance the iterator earlier and may consume more items. advance_n_and_return_first is the equivalent of: fn advance_n_and_return_first<I>(iter: &mut I, n: usize) -> Option <I::Item> where I: Iterator, { let next = iter.next(); if n > 1 { iter.nth(n - 2 ); } next } § Panics The method will panic if the given step is 0 . § Examples let a = [ 0 , 1 , 2 , 3 , 4 , 5 ]; let mut iter = a.into_iter().step_by( 2 ); assert_eq! (iter.next(), Some ( 0 )); assert_eq! (iter.next(), Some ( 2 )); assert_eq! (iter.next(), Some ( 4 )); assert_eq! (iter.next(), None ); 1.0.0 · Source fn chain <U>(self, other: U) -> Chain <Self, <U as IntoIterator >:: IntoIter > ⓘ where Self: Sized , U: IntoIterator <Item = Self:: Item >, Takes two iterators and creates a new iterator over both in sequence. chain() will return a new iterator which will first iterate over values from the first iterator and then over values from the second iterator. In other words, it links two iterators together, in a chain. 🔗 once is commonly used to adapt a single value into a chain of other kinds of iteration. § Examples Basic usage: let s1 = "abc" .chars(); let s2 = "def" .chars(); let mut iter = s1.chain(s2); assert_eq! (iter.next(), Some ( 'a' )); assert_eq! (iter.next(), Some ( 'b' )); assert_eq! (iter.next(), Some ( 'c' )); assert_eq! (iter.next(), Some ( 'd' )); assert_eq! (iter.next(), Some ( 'e' )); assert_eq! (iter.next(), Some ( 'f' )); assert_eq! (iter.next(), None ); Since the argument to chain() uses IntoIterator , we can pass anything that can be converted into an Iterator , not just an Iterator itself. For example, arrays ( [T] ) implement IntoIterator , and so can be passed to chain() directly: let a1 = [ 1 , 2 , 3 ]; let a2 = [ 4 , 5 , 6 ]; let mut iter = a1.into_iter().chain(a2); assert_eq! (iter.next(), Some ( 1 )); assert_eq! (iter.next(), Some ( 2 )); assert_eq! (iter.next(), Some ( 3 )); assert_eq! (iter.next(), Some ( 4 )); assert_eq! (iter.next(), Some ( 5 )); assert_eq! (iter.next(), Some ( 6 )); assert_eq! (iter.next(), None ); If you work with Windows API, you may wish to convert OsStr to Vec<u16> : #[cfg(windows)] fn os_str_to_utf16(s: & std::ffi::OsStr) -> Vec<u16> { use std::os::windows::ffi::OsStrExt; s.encode_wide().chain(std::iter::once( 0 )).collect() } 1.0.0 · Source fn zip <U>(self, other: U) -> Zip <Self, <U as IntoIterator >:: IntoIter > ⓘ where Self: Sized , U: IntoIterator , ‘Zips up’ two iterators into a single iterator of pairs. zip() returns a new iterator that will iterate over two other iterators, returning a tuple where the first element comes from the first iterator, and the second element comes from the second iterator. In other words, it zips two iterators together, into a single one. If either iterator returns None , next from the zipped iterator will return None . If the zipped iterator has no more elements to return then each further attempt to advance it will first try to advance the first iterator at most one time and if it still yielded an item try to advance the second iterator at most one time. To ‘undo’ the result of zipping up two iterators, see unzip . § Examples Basic usage: let s1 = "abc" .chars(); let s2 = "def" .chars(); let mut iter = s1.zip(s2); assert_eq! (iter.next(), Some (( 'a' , 'd' ))); assert_eq! (iter.next(), Some (( 'b' , 'e' ))); assert_eq! (iter.next(), Some (( 'c' , 'f' ))); assert_eq! (iter.next(), None ); Since the argument to zip() uses IntoIterator , we can pass anything that can be converted into an Iterator , not just an Iterator itself. For example, arrays ( [T] ) implement IntoIterator , and so can be passed to zip() directly: let a1 = [ 1 , 2 , 3 ]; let a2 = [ 4 , 5 , 6 ]; let mut iter = a1.into_iter().zip(a2); assert_eq! (iter.next(), Some (( 1 , 4 ))); assert_eq! (iter.next(), Some (( 2 , 5 ))); assert_eq! (iter.next(), Some (( 3 , 6 ))); assert_eq! (iter.next(), None ); zip() is often used to zip an infinite iterator to a finite one. This works because the finite iterator will eventually return None , ending the zipper. Zipping with (0..) can look a lot like enumerate : let enumerate: Vec< _ > = "foo" .chars().enumerate().collect(); let zipper: Vec< _ > = ( 0 ..).zip( "foo" .chars()).collect(); assert_eq! (( 0 , 'f' ), enumerate[ 0 ]); assert_eq! (( 0 , 'f' ), zipper[ 0 ]); assert_eq! (( 1 , 'o' ), enumerate[ 1 ]); assert_eq! (( 1 , 'o' ), zipper[ 1 ]); assert_eq! (( 2 , 'o' ), enumerate[ 2 ]); assert_eq! (( 2 , 'o' ), zipper[ 2 ]); If both iterators have roughly equivalent syntax, it may be more readable to use zip : use std::iter::zip; let a = [ 1 , 2 , 3 ]; let b = [ 2 , 3 , 4 ]; let mut zipped = zip( a.into_iter().map(|x| x * 2 ).skip( 1 ), b.into_iter().map(|x| x * 2 ).skip( 1 ), ); assert_eq! (zipped.next(), Some (( 4 , 6 ))); assert_eq! (zipped.next(), Some (( 6 , 8 ))); assert_eq! (zipped.next(), None ); compared to: let mut zipped = a .into_iter() .map(|x| x * 2 ) .skip( 1 ) .zip(b.into_iter().map(|x| x * 2 ).skip( 1 )); Source fn intersperse (self, separator: Self:: Item ) -> Intersperse <Self> ⓘ where Self: Sized , Self:: Item : Clone , 🔬 This is a nightly-only experimental API. ( iter_intersperse #79524 ) Creates a new iterator which places a copy of separator between adjacent items of the original iterator. In case separator does not implement Clone or needs to be computed every time, use intersperse_with . § Examples Basic usage: #![feature(iter_intersperse)] let mut a = [ 0 , 1 , 2 ].into_iter().intersperse( 100 ); assert_eq! (a.next(), Some ( 0 )); // The first element from `a`. assert_eq! (a.next(), Some ( 100 )); // The separator. assert_eq! (a.next(), Some ( 1 )); // The next element from `a`. assert_eq! (a.next(), Some ( 100 )); // The separator. assert_eq! (a.next(), Some ( 2 )); // The last element from `a`. assert_eq! (a.next(), None ); // The iterator is finished. intersperse can be very useful to join an iterator’s items using a common element: #![feature(iter_intersperse)] let words = [ "Hello" , "World" , "!" ]; let hello: String = words.into_iter().intersperse( " " ).collect(); assert_eq! (hello, "Hello World !" ); Source fn intersperse_with <G>(self, separator: G) -> IntersperseWith <Self, G> ⓘ where Self: Sized , G: FnMut () -> Self:: Item , 🔬 This is a nightly-only experimental API. ( iter_intersperse #79524 ) Creates a new iterator which places an item generated by separator between adjacent items of the original iterator. The closure will be called exactly once each time an item is placed between two adjacent items from the underlying iterator; specifically, the closure is not called if the underlying iterator yields less than two items and after the last item is yielded. If the iterator’s item implements Clone , it may be easier to use intersperse . § Examples Basic usage: #![feature(iter_intersperse)] #[derive(PartialEq, Debug)] struct NotClone(usize); let v = [NotClone( 0 ), NotClone( 1 ), NotClone( 2 )]; let mut it = v.into_iter().intersperse_with(|| NotClone( 99 )); assert_eq! (it.next(), Some (NotClone( 0 ))); // The first element from `v`. assert_eq! (it.next(), Some (NotClone( 99 ))); // The separator. assert_eq! (it.next(), Some (NotClone( 1 ))); // The next element from `v`. assert_eq! (it.next(), Some (NotClone( 99 ))); // The separator. assert_eq! (it.next(), Some (NotClone( 2 ))); // The last element from `v`. assert_eq! (it.next(), None ); // The iterator is finished. intersperse_with can be used in situations where the separator needs to be computed: #![feature(iter_intersperse)] let src = [ "Hello" , "to" , "all" , "people" , "!!" ].iter().copied(); // The closure mutably borrows its context to generate an item. let mut happy_emojis = [ " ❤️ " , " 😀 " ].into_iter(); let separator = || happy_emojis.next().unwrap_or( " 🦀 " ); let result = src.intersperse_with(separator).collect::<String>(); assert_eq! (result, "Hello ❤️ to 😀 all 🦀 people 🦀 !!" ); 1.0.0 · Source fn map <B, F>(self, f: F) -> Map <Self, F> ⓘ where Self: Sized , F: FnMut (Self:: Item ) -> B, Takes a closure and creates an iterator which calls that closure on each element. map() transforms one iterator into another, by means of its argument: something that implements FnMut . It produces a new iterator which calls this closure on each element of the original iterator. If you are good at thinking in types, you can think of map() like this: If you have an iterator that gives you elements of some type A , and you want an iterator of some other type B , you can use map() , passing a closure that takes an A and returns a B . map() is conceptually similar to a for loop. However, as map() is lazy, it is best used when you’re already working with other iterators. If you’re doing some sort of looping for a side effect, it’s considered more idiomatic to use for than map() . § Examples Basic usage: let a = [ 1 , 2 , 3 ]; let mut iter = a.iter().map(|x| 2 * x); assert_eq! (iter.next(), Some ( 2 )); assert_eq! (iter.next(), Some ( 4 )); assert_eq! (iter.next(), Some ( 6 )); assert_eq! (iter.next(), None ); If you’re doing some sort of side effect, prefer for to map() : // don't do this: ( 0 .. 5 ).map(|x| println! ( "{x}" )); // it won't even execute, as it is lazy. Rust will warn you about this. // Instead, use a for-loop: for x in 0 .. 5 { println! ( "{x}" ); } 1.21.0 · Source fn for_each <F>(self, f: F) where Self: Sized , F: FnMut (Self:: Item ), Calls a closure on each element of an iterator. This is equivalent to using a for loop on the iterator, although break and continue are not possible from a closure. It’s generally more idiomatic to use a for loop, but for_each may be more legible when processing items at the end of longer iterator chains. In some cases for_each may also be faster than a loop, because it will use internal iteration on adapters like Chain . § Examples Basic usage: use std::sync::mpsc::channel; let (tx, rx) = channel(); ( 0 .. 5 ).map(|x| x * 2 + 1 ) .for_each( move |x| tx.send(x).unwrap()); let v: Vec< _ > = rx.iter().collect(); assert_eq! (v, vec! [ 1 , 3 , 5 , 7 , 9 ]); For such a small example, a for loop may be cleaner, but for_each might be preferable to keep a functional style with longer iterators: ( 0 .. 5 ).flat_map(|x| (x * 100 )..(x * 110 )) .enumerate() .filter(| & (i, x)| (i + x) % 3 == 0 ) .for_each(|(i, x)| println! ( "{i}:{x}" )); 1.0.0 · Source fn filter <P>(self, predicate: P) -> Filter <Self, P> ⓘ where Self: Sized , P: FnMut (&Self:: Item ) -> bool , Creates an iterator which uses a closure to determine if an element should be yielded. Given an element the closure must return true or false . The returned iterator will yield only the elements for which the closure returns true . § Examples Basic usage: let a = [ 0i32 , 1 , 2 ]; let mut iter = a.into_iter().filter(|x| x.is_positive()); assert_eq! (iter.next(), Some ( 1 )); assert_eq! (iter.next(), Some ( 2 )); assert_eq! (iter.next(), None ); Because the closure passed to filter() takes a reference, and many iterators iterate over references, this leads to a possibly confusing situation, where the type of the closure is a double reference: let s = & [ 0 , 1 , 2 ]; let mut iter = s.iter().filter(|x| ** x > 1 ); // needs two *s! assert_eq! (iter.next(), Some ( & 2 )); assert_eq! (iter.next(), None ); It’s common to instead use destructuring on the argument to strip away one: let s = & [ 0 , 1 , 2 ]; let mut iter = s.iter().filter(| & x| * x > 1 ); // both & and * assert_eq! (iter.next(), Some ( & 2 )); assert_eq! (iter.next(), None ); or both: let s = & [ 0 , 1 , 2 ]; let mut iter = s.iter().filter(|&&x| x > 1 ); // two &s assert_eq! (iter.next(), Some ( & 2 )); assert_eq! (iter.next(), None ); of these layers. Note that iter.filter(f).next() is equivalent to iter.find(f) . 1.0.0 · Source fn filter_map <B, F>(self, f: F) -> FilterMap <Self, F> ⓘ where Self: Sized , F: FnMut (Self:: Item ) -> Option <B>, Creates an iterator that both filters and maps. The returned iterator yields only the value s for which the supplied closure returns Some(value) . filter_map can be used to make chains of filter and map more concise. The example below shows how a map().filter().map() can be shortened to a single call to filter_map . § Examples Basic usage: let a = [ "1" , "two" , "NaN" , "four" , "5" ]; let mut iter = a.iter().filter_map(|s| s.parse().ok()); assert_eq! (iter.next(), Some ( 1 )); assert_eq! (iter.next(), Some ( 5 )); assert_eq! (iter.next(), None ); Here’s the same example, but with filter and map : let a = [ "1" , "two" , "NaN" , "four" , "5" ]; let mut iter = a.iter().map(|s| s.parse()).filter(|s| s.is_ok()).map(|s| s.unwrap()); assert_eq! (iter.next(), Some ( 1 )); assert_eq! (iter.next(), Some ( 5 )); assert_eq! (iter.next(), None ); 1.0.0 · Source fn enumerate (self) -> Enumerate <Self> ⓘ where Self: Sized , Creates an iterator which gives the current iteration count as well as the next value. The iterator returned yields pairs (i, val) , where i is the current index of iteration and val is the value returned by the iterator. enumerate() keeps its count as a usize . If you want to count by a different sized integer, the zip function provides similar functionality. § Overflow Behavior The method does no guarding against overflows, so enumerating more than usize::MAX elements either produces the wrong result or panics. If overflow checks are enabled, a panic is guaranteed. § Panics The returned iterator might panic if the to-be-returned index would overflow a usize . § Examples let a = [ 'a' , 'b' , 'c' ]; let mut iter = a.into_iter().enumerate(); assert_eq! (iter.next(), Some (( 0 , 'a' ))); assert_eq! (iter.next(), Some (( 1 , 'b' ))); assert_eq! (iter.next(), Some (( 2 , 'c' ))); assert_eq! (iter.next(), None ); 1.0.0 · Source fn peekable (self) -> Peekable <Self> ⓘ where Self: Sized , Creates an iterator which can use the peek and peek_mut methods to look at the next element of the iterator without consuming it. See their documentation for more information. Note that the underlying iterator is still advanced when peek or peek_mut are called for the first time: In order to retrieve the next element, next is called on the underlying iterator, hence any side effects (i.e. anything other than fetching the next value) of the next method will occur. § Examples Basic usage: let xs = [ 1 , 2 , 3 ]; let mut iter = xs.into_iter().peekable(); // peek() lets us see into the future assert_eq! (iter.peek(), Some ( & 1 )); assert_eq! (iter.next(), Some ( 1 )); assert_eq! (iter.next(), Some ( 2 )); // we can peek() multiple times, the iterator won't advance assert_eq! (iter.peek(), Some ( & 3 )); assert_eq! (iter.peek(), Some ( & 3 )); assert_eq! (iter.next(), Some ( 3 )); // after the iterator is finished, so is peek() assert_eq! (iter.peek(), None ); assert_eq! (iter.next(), None ); Using peek_mut to mutate the next item without advancing the iterator: let xs = [ 1 , 2 , 3 ]; let mut iter = xs.into_iter().peekable(); // `peek_mut()` lets us see into the future assert_eq! (iter.peek_mut(), Some ( &mut 1 )); assert_eq! (iter.peek_mut(), Some ( &mut 1 )); assert_eq! (iter.next(), Some ( 1 )); if let Some (p) = iter.peek_mut() { assert_eq! ( * p, 2 ); // put a value into the iterator * p = 1000 ; } // The value reappears as the iterator continues assert_eq! (iter.collect::<Vec< _ >>(), vec! [ 1000 , 3 ]); 1.0.0 · Source fn skip_while <P>(self, predicate: P) -> SkipWhile <Self, P> ⓘ where Self: Sized , P: FnMut (&Self:: Item ) -> bool , Creates an iterator that skip s elements based on a predicate. skip_while() takes a closure as an argument. It will call this closure on each element of the iterator, and ignore elements until it returns false . After false is returned, skip_while() ’s job is over, and the rest of the elements are yielded. § Examples Basic usage: let a = [- 1i32 , 0 , 1 ]; let mut iter = a.into_iter().skip_while(|x| x.is_negative()); assert_eq! (iter.next(), Some ( 0 )); assert_eq! (iter.next(), Some ( 1 )); assert_eq! (iter.next(), None ); Because the closure passed to skip_while() takes a reference, and many iterators iterate over references, this leads to a possibly confusing situation, where the type of the closure argument is a double reference: let s = & [- 1 , 0 , 1 ]; let mut iter = s.iter().skip_while(|x| ** x < 0 ); // need two *s! assert_eq! (iter.next(), Some ( & 0 )); assert_eq! (iter.next(), Some ( & 1 )); assert_eq! (iter.next(), None ); Stopping after an initial false : let a = [- 1 , 0 , 1 , - 2 ]; let mut iter = a.into_iter().skip_while(| & x| x < 0 ); assert_eq! (iter.next(), Some ( 0 )); assert_eq! (iter.next(), Some ( 1 )); // while this would have been false, since we already got a false, // skip_while() isn't used any more assert_eq! (iter.next(), Some (- 2 )); assert_eq! (iter.next(), None ); 1.0.0 · Source fn take_while <P>(self, predicate: P) -> TakeWhile <Self, P> ⓘ where Self: Sized , P: FnMut (&Self:: Item ) -> bool , Creates an iterator that yields elements based on a predicate. take_while() takes a closure as an argument. It will call this closure on each element of the iterator, and yield elements while it returns true . After false is returned, take_while() ’s job is over, and the rest of the elements are ignored. § Examples Basic usage: let a = [- 1i32 , 0 , 1 ]; let mut iter = a.into_iter().take_while(|x| x.is_negative()); assert_eq! (iter.next(), Some (- 1 )); assert_eq! (iter.next(), None ); Because the closure passed to take_while() takes a reference, and many iterators iterate over references, this leads to a possibly confusing situation, where the type of the closure is a double reference: let s = & [- 1 , 0 , 1 ]; let mut iter = s.iter().take_while(|x| ** x < 0 ); // need two *s! assert_eq! (iter.next(), Some ( & - 1 )); assert_eq! (iter.next(), None ); Stopping after an initial false : let a = [- 1 , 0 , 1 , - 2 ]; let mut iter = a.into_iter().take_while(| & x| x < 0 ); assert_eq! (iter.next(), Some (- 1 )); // We have more elements that are less than zero, but since we already // got a false, take_while() ignores the remaining elements. assert_eq! (iter.next(), None ); Because take_while() needs to look at the value in order to see if it should be included or not, consuming iterators will see that it is removed: let a = [ 1 , 2 , 3 , 4 ]; let mut iter = a.into_iter(); let result: Vec<i32> = iter.by_ref().take_while(| & n| n != 3 ).collect(); assert_eq! (result, [ 1 , 2 ]); let result: Vec<i32> = iter.collect(); assert_eq! (result, [ 4 ]); The 3 is no longer there, because it was consumed in order to see if the iteration should stop, but wasn’t placed back into the iterator. 1.57.0 · Source fn map_while <B, P>(self, predicate: P) -> MapWhile <Self, P> ⓘ where Self: Sized , P: FnMut (Self:: Item ) -> Option <B>, Creates an iterator that both yields elements based on a predicate and maps. map_while() takes a closure as an argument. It will call this closure on each element of the iterator, and yield elements while it returns Some(_) . § Examples Basic usage: let a = [- 1i32 , 4 , 0 , 1 ]; let mut iter = a.into_iter().map_while(|x| 16i32 .checked_div(x)); assert_eq! (iter.next(), Some (- 16 )); assert_eq! (iter.next(), Some ( 4 )); assert_eq! (iter.next(), None ); Here’s the same example, but with take_while and map : let a = [- 1i32 , 4 , 0 , 1 ]; let mut iter = a.into_iter() .map(|x| 16i32 .checked_div(x)) .take_while(|x| x.is_some()) .map(|x| x.unwrap()); assert_eq! (iter.next(), Some (- 16 )); assert_eq! (iter.next(), Some ( 4 )); assert_eq! (iter.next(), None ); Stopping after an initial None : let a = [ 0 , 1 , 2 , - 3 , 4 , 5 , - 6 ]; let iter = a.into_iter().map_while(|x| u32::try_from(x).ok()); let vec: Vec< _ > = iter.collect(); // We have more elements that could fit in u32 (such as 4, 5), but `map_while` returned `None` for `-3` // (as the `predicate` returned `None`) and `collect` stops at the first `None` encountered. assert_eq! (vec, [ 0 , 1 , 2 ]); Because map_while() needs to look at the value in order to see if it should be included or not, consuming iterators will see that it is removed: let a = [ 1 , 2 , - 3 , 4 ]; let mut iter = a.into_iter(); let result: Vec<u32> = iter.by_ref() .map_while(|n| u32::try_from(n).ok()) .collect(); assert_eq! (result, [ 1 , 2 ]); let result: Vec<i32> = iter.collect(); assert_eq! (result, [ 4 ]); The -3 is no longer there, because it was consumed in order to see if the iteration should stop, but wasn’t placed back into the iterator. Note that unlike take_while this iterator is not fused. It is also not specified what this iterator returns after the first None is returned. If you need a fused iterator, use fuse . 1.0.0 · Source fn skip (self, n: usize ) -> Skip <Self> ⓘ where Self: Sized , Creates an iterator that skips the first n elements. skip(n) skips elements until n elements are skipped or the end of the iterator is reached (whichever happens first). After that, all the remaining elements are yielded. In particular, if the original iterator is too short, then the returned iterator is empty. Rather than overriding this method directly, instead override the nth method. § Examples let a = [ 1 , 2 , 3 ]; let mut iter = a.into_iter().skip( 2 ); assert_eq! (iter.next(), Some ( 3 )); assert_eq! (iter.next(), None ); 1.0.0 · Source fn take (self, n: usize ) -> Take <Self> ⓘ where Self: Sized , Creates an iterator that yields the first n elements, or fewer if the underlying iterator ends sooner. take(n) yields elements until n elements are yielded or the end of the iterator is reached (whichever happens first). The returned iterator is a prefix of length n if the original iterator contains at least n elements, otherwise it contains all of the (fewer than n ) elements of the original iterator. § Examples Basic usage: let a = [ 1 , 2 , 3 ]; let mut iter = a.into_iter().take( 2 ); assert_eq! (iter.next(), Some ( 1 )); assert_eq! (iter.next(), Some ( 2 )); assert_eq! (iter.next(), None ); take() is often used with an infinite iterator, to make it finite: let mut iter = ( 0 ..).take( 3 ); assert_eq! (iter.next(), Some ( 0 )); assert_eq! (iter.next(), Some ( 1 )); assert_eq! (iter.next(), Some ( 2 )); assert_eq! (iter.next(), None ); If less than n elements are available, take will limit itself to the size of the underlying iterator: let v = [ 1 , 2 ]; let mut iter = v.into_iter().take( 5 ); assert_eq! (iter.next(), Some ( 1 )); assert_eq! (iter.next(), Some ( 2 )); assert_eq! (iter.next(), None ); Use by_ref to take from the iterator without consuming it, and then continue using the original iterator: let mut words = [ "hello" , "world" , "of" , "Rust" ].into_iter(); // Take the first two words. let hello_world: Vec< _ > = words.by_ref().take( 2 ).collect(); assert_eq! (hello_world, vec! [ "hello" , "world" ]); // Collect the rest of the words. // We can only do this because we used `by_ref` earlier. let of_rust: Vec< _ > = words.collect(); assert_eq! (of_rust, vec! [ "of" , "Rust" ]); 1.0.0 · Source fn scan <St, B, F>(self, initial_state: St, f: F) -> Scan <Self, St, F> ⓘ where Self: Sized , F: FnMut ( &mut St , Self:: Item ) -> Option <B>, An iterator adapter which, like fold , holds internal state, but unlike fold , produces a new iterator. scan() takes two arguments: an initial value which seeds the internal state, and a closure with two arguments, the first being a mutable reference to the internal state and the second an iterator element. The closure can assign to the internal state to share state between iterations. On iteration, the closure will be applied to each element of the iterator and the return value from the closure, an Option , is returned by the next method. Thus the closure can return Some(value) to yield value , or None to end the iteration. § Examples let a = [ 1 , 2 , 3 , 4 ]; let mut iter = a.into_iter().scan( 1 , |state, x| { // each iteration, we'll multiply the state by the element ... * state = * state * x; // ... and terminate if the state exceeds 6 if * state > 6 { return None ; } // ... else yield the negation of the state Some (- * state) }); assert_eq! (iter.next(), Some (- 1 )); assert_eq! (iter.next(), Some (- 2 )); assert_eq! (iter.next(), Some (- 6 )); assert_eq! (iter.next(), None ); 1.0.0 · Source fn flat_map <U, F>(self, f: F) -> FlatMap <Self, U, F> ⓘ where Self: Sized , U: IntoIterator , F: FnMut (Self:: Item ) -> U, Creates an iterator that works like map, but flattens nested structure. The map adapter is very useful, but only when the closure argument produces values. If it produces an iterator instead, there’s an extra layer of indirection. flat_map() will remove this extra layer on its own. You can think of flat_map(f) as the semantic equivalent of map ping, and then flatten ing as in map(f).flatten() . Another way of thinking about flat_map() : map ’s closure returns one item for each element, and flat_map() ’s closure returns an iterator for each element. § Examples let words = [ "alpha" , "beta" , "gamma" ]; // chars() returns an iterator let merged: String = words.iter() .flat_map(|s| s.chars()) .collect(); assert_eq! (merged, "alphabetagamma" ); 1.29.0 · Source fn flatten (self) -> Flatten <Self> ⓘ where Self: Sized , Self:: Item : IntoIterator , Creates an iterator that flattens nested structure. This is useful when you have an iterator of iterators or an iterator of things that can be turned into iterators and you want to remove one level of indirection. § Examples Basic usage: let data = vec! [ vec! [ 1 , 2 , 3 , 4 ], vec! [ 5 , 6 ]]; let flattened: Vec< _ > = data.into_iter().flatten().collect(); assert_eq! (flattened, [ 1 , 2 , 3 , 4 , 5 , 6 ]); Mapping and then flattening: let words = [ "alpha" , "beta" , "gamma" ]; // chars() returns an iterator let merged: String = words.iter() .map(|s| s.chars()) .flatten() .collect(); assert_eq! (merged, "alphabetagamma" ); You can also rewrite this in terms of flat_map() , which is preferable in this case since it conveys intent more clearly: let words = [ "alpha" , "beta" , "gamma" ]; // chars() returns an iterator let merged: String = words.iter() .flat_map(|s| s.chars()) .collect(); assert_eq! (merged, "alphabetagamma" ); Flattening works on any IntoIterator type, including Option and Result : let options = vec! [ Some ( 123 ), Some ( 321 ), None , Some ( 231 )]; let flattened_options: Vec< _ > = options.into_iter().flatten().collect(); assert_eq! (flattened_options, [ 123 , 321 , 231 ]); let results = vec! [ Ok ( 123 ), Ok ( 321 ), Err ( 456 ), Ok ( 231 )]; let flattened_results: Vec< _ > = results.into_iter().flatten().collect(); assert_eq! (flattened_results, [ 123 , 321 , 231 ]); Flattening only removes one level of nesting at a time: let d3 = [[[ 1 , 2 ], [ 3 , 4 ]], [[ 5 , 6 ], [ 7 , 8 ]]]; let d2: Vec< _ > = d3.into_iter().flatten().collect(); assert_eq! (d2, [[ 1 , 2 ], [ 3 , 4 ], [ 5 , 6 ], [ 7 , 8 ]]); let d1: Vec< _ > = d3.into_iter().flatten().flatten().collect(); assert_eq! (d1, [ 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 ]); Here we see that flatten() does not perform a “deep” flatten. Instead, only one level of nesting is removed. That is, if you flatten() a three-dimensional array, the result will be two-dimensional and not one-dimensional. To get a one-dimensional structure, you have to flatten() again. Source fn map_windows <F, R, const N: usize >(self, f: F) -> MapWindows <Self, F, N> ⓘ where Self: Sized , F: FnMut (&[Self:: Item ; N ]) -> R, 🔬 This is a nightly-only experimental API. ( iter_map_windows #87155 ) Calls the given function f for each contiguous window of size N over self and returns an iterator over the outputs of f . Like slice::windows() , the windows during mapping overlap as well. In the following example, the closure is called three times with the arguments &['a', 'b'] , &['b', 'c'] and &['c', 'd'] respectively. #![feature(iter_map_windows)] let strings = "abcd" .chars() .map_windows(|[x, y]| format! ( "{}+{}" , x, y)) .collect::<Vec<String>>(); assert_eq! (strings, vec! [ "a+b" , "b+c" , "c+d" ]); Note that the const parameter N is usually inferred by the destructured argument in the closure. The returned iterator yields 𝑘 − N + 1 items (where 𝑘 is the number of items yielded by self ). If 𝑘 is less than N , this method yields an empty iterator. The returned iterator implements FusedIterator , because once self returns None , even if it returns a Some(T) again in the next iterations, we cannot put it into a contiguous array buffer, and thus the returned iterator should be fused. § Panics Panics if N is zero. This check will most probably get changed to a compile time error before this method gets stabilized. ⓘ #![feature(iter_map_windows)] let iter = std::iter::repeat( 0 ).map_windows(| & []| ()); § Examples Building the sums of neighboring numbers. #![feature(iter_map_windows)] let mut it = [ 1 , 3 , 8 , 1 ].iter().map_windows(| & [a, b]| a + b); assert_eq! (it.next(), Some ( 4 )); // 1 + 3 assert_eq! (it.next(), Some ( 11 )); // 3 + 8 assert_eq! (it.next(), Some ( 9 )); // 8 + 1 assert_eq! (it.next(), None ); Since the elements in the following example implement Copy , we can just copy the array and get an iterator over the windows. #![feature(iter_map_windows)] let mut it = "ferris" .chars().map_windows(|w: &a | 2026-01-13T09:29:13 |
https://id-id.facebook.com/reg/?entry_point=login&amp%3Bnext=https%3A%2F%2Fwww.facebook.com%2Fshare_channel%2F%3Ftype%3Dreshare%26link%3Dhttps%253A%252F%252Fdev.to%252Ftauri%252Ftauri-10-release-candidate-53jk%26app_id%3D966242223397117%26source_surface%3Dexternal_reshare%26display%26hashtag | Facebook Facebook Email atau telepon Kata Sandi Lupa akun? Buat Akun Baru Anda Diblokir Sementara Anda Diblokir Sementara Sepertinya Anda menyalahgunakan fitur ini dengan menggunakannya terlalu cepat. Anda dilarang menggunakan fitur ini untuk sementara. Back Bahasa Indonesia 한국어 English (US) Tiếng Việt ภาษาไทย Español 中文(简体) 日本語 Português (Brasil) Français (France) Deutsch Daftar Masuk Messenger Facebook Lite Video Meta Pay Meta Store Meta Quest Ray-Ban Meta Meta AI Konten Meta AI lainnya Instagram Threads Pusat Informasi Pemilu Kebijakan Privasi Pusat Privasi Tentang Buat Iklan Buat Halaman Developer Karier Cookie Pilihan Iklan Ketentuan Bantuan Pengunggahan Kontak & Non-Pengguna Pengaturan Log aktivitas Meta © 2026 | 2026-01-13T09:29:13 |
https://vi-vn.facebook.com/reg/?entry_point=login&amp%3Bnext=https%3A%2F%2Fwww.facebook.com%2Fshare_channel%2F%3Ftype%3Dreshare%26link%3Dhttps%253A%252F%252Fdev.to%252Ftauri%252Ftauri-10-release-candidate-53jk%26app_id%3D966242223397117%26source_surface%3Dexternal_reshare%26display%26hashtag | Facebook Facebook Email hoặc điện thoại Mật khẩu Bạn quên tài khoản ư? Tạo tài khoản mới Bạn tạm thời bị chặn Bạn tạm thời bị chặn Có vẻ như bạn đang dùng nhầm tính năng này do sử dụng quá nhanh. Bạn tạm thời đã bị chặn sử dụng nó. Back Tiếng Việt 한국어 English (US) Bahasa Indonesia ภาษาไทย Español 中文(简体) 日本語 Português (Brasil) Français (France) Deutsch Đăng ký Đăng nhập Messenger Facebook Lite Video Meta Pay Cửa hàng trên Meta Meta Quest Ray-Ban Meta Meta AI Nội dung khác do Meta AI tạo Instagram Threads Trung tâm thông tin bỏ phiếu Chính sách quyền riêng tư Trung tâm quyền riêng tư Giới thiệu Tạo quảng cáo Tạo Trang Nhà phát triển Tuyển dụng Cookie Lựa chọn quảng cáo Điều khoản Trợ giúp Tải thông tin liên hệ lên & đối tượng không phải người dùng Cài đặt Nhật ký hoạt động Meta © 2026 | 2026-01-13T09:29:13 |
https://creativecommons.org/licenses/by/4.0/legalcode.id | Lisensi Lengkap - Atribusi 4.0 Internasional - Creative Commons Skip to content Creative Commons Menu Who We Are What We Do Licenses and Tools Blog Support Us Languages available Bahasa Indonesia Basque dansk Deutsch eesti English español français frysk Hrvatski italiano latviešu Lietuviškai Māori Nederlands norsk polski Português Română Slovensky Slovenščina suomi svenska Türkçe česky Ελληνικά Русский Українська العربيّة 日本語 简体中文 繁體中文 한국어 Search Donate Explore CC Global Network Join a global community working to strengthen the Commons Certificate Become an expert in creating and engaging with openly licensed materials Global Summit Attend our annual event, promoting the power of open licensing Chooser Get help choosing the appropriate license for your work Search Portal Find engines to search openly licensed material for creative and educational reuse Open Source Help us build products that maximize creativity and innovation Help us protect the commons. Make a tax deductible gift to fund our work. Donate today! Atribusi 4.0 Internasional CC BY 4.0 Lisensi Lengkap Atribusi 4.0 Internasional Bagian 1 – Definisi. Bagian 2 – Ruang Lingkup. Bagian 3 – Ketentuan Lisensi. Bagian 4 – Hak Basis Data Sui Generis. Bagian 5 – Pernyataan Jaminan dan Batasan Tanggung Jawab. Bagian 6 – Jangka Waktu dan Penghentian. Bagian 7 – Syarat dan Ketentuan Lain. Bagian 8 – Interpretasi. Canonical URL https://creativecommons.org/licenses/by/4.0/ Other formats Plain Text RDF/XML See the deed Versi 4.0 • See the errata page for any corrections and the date of change About the license and Creative Commons Creative Commons Corporation ("Creative Commons") bukanlah suatu firma hukum dan tidak memberikan layanan hukum. Distribusi lisensi publik Creative Commons tidak mengisyaratkan hubungan layaknya pengacara-klien maupun jenis hubungan lainnya. Creative Commons menyediakan lisensi dan informasi terkait berdasarkan ketentuan "apa adanya ( as-is )". Creative Commons tidak memberikan jaminan atas lisensi ini, setiap materi berlisensi di bawah syarat dan ketentuan lisensi, atau setiap informasi yang terkait. Creative Commons menolak semua tanggung jawab atas kerugian yang muncul karena penggunaannya. Menggunakan Lisensi Publik Creative Commons Lisensi publik Creative Commons memberikan rangkaian syarat dan ketentuan standar yang dapat digunakan oleh pencipta dan pemegang Hak-hak Serupa untuk menyebarluaskan ciptaan asli dan materi berhak cipta lainnya serta Hak-hak Serupa lainnya yang ditentukan dalam lisensi publik di bawah ini. Bagian pertimbangan di bawah ini hanya merupakan tambahan informasi, tidak mengikat, dan tidak menjadi bagian dari lisensi kami. Pertimbangan untuk pemberi lisensi Lisensi publik Creative Commons ditujukan untuk digunakan oleh setiap orang yang berhak memberikan izin kepada pengguna untuk menggunakan materi berhak cipta dengan cara-cara yang dibatasi oleh hak cipta dan Hak-hak Serupa. Lisensi kami tidak dapat dibatalkan. Pemberi lisensi wajib membaca dan memahami syarat dan ketentuan lisensi yang dipilih sebelum menggunakannya. Pemberi lisensi juga wajib memiliki izin penggunaan Hak-hak Serupa sebelum menggunakan lisensi kami sehingga pengguna dapat menggunakan kembali materi ini sebagaimana seharusnya. Pemberi lisensi wajib menandai setiap materi yang tidak menggunakan lisensi ini. Hal ini termasuk materi yang menggunakan lisensi Creative Commons lainnya, atau materi yang digunakan di bawah pengecualian atau pembatasan hak cipta. Pertimbangan lebih lanjut untuk pemberi lisensi. Pertimbangan untuk pengguna Dengan menggunakan salah satu lisensi kami, pemberi lisensi memberikan izin kepada pengguna untuk menggunakan materi berlisensi di bawah syarat dan ketentuan tertentu. Apabila izin pemberi lisensi tidak diperlukan karena adanya alasan tertentu--sebagai contoh, penggunaan di bawah pengecualian atau pembatasan hak cipta--maka penggunaan tersebut tidak tunduk pada aturan lisensi ini. Lisensi kami hanya memberikan izin di bawah hak cipta dan Hak-hak Serupa yang dipegang oleh pemberi lisensi. Penggunaan materi berlisensi dapat dibatasi oleh ketentuan lain, seperti dalam hal pihak lain memiliki hak cipta atau Hak-hak Serupa atas materi tersebut. Pemberi lisensi dapat membuat permintaan tertentu, seperti meminta pengguna untuk menandai dan mendeskripsikan perubahan yang dibuat. Walau tidak ditentukan di bawah lisensi kami, Anda diharapkan untuk menghargai permintaan tersebut jika sesuai. Pertimbangan lebih lanjut untuk pengguna. Atribusi 4.0 Internasional Dengan menggunakan Hak Lisensi (penjelasan di bawah), Anda menerima dan setuju untuk terikat dengan syarat dan ketentuan dari Lisensi Publik Creative Commons Atribusi 4.0 Internasional (“Lisensi Publik”). Sejauh Lisensi Publik ini dapat dipandang sebagai kontrak, Anda menerima Hak Lisensi dengan mempertimbangkan persetujuan Anda atas syarat dan ketentuan berikut, dan Pemberi Lisensi memberikan Anda hak-hak tersebut dengan mempertimbangkan manfaat yang diterima Pemberi Lisensi dengan menyebarluaskan Materi Berlisensi di bawah syarat dan ketentuan berikut. Bagian 1 – Definisi. Materi Adaptasi adalah materi yang memiliki Hak Cipta dan Hak-hak Serupa yang diambil dari atau dibuat berdasarkan Materi Berlisensi dan Materi Berlisensi harus diterjemahkan, diubah, disusun ulang, dialihwujudkan, atau dimodifikasi dengan cara lainnya dengan izin Pemberi Lisensi atas Hak Cipta dan Hak-hak Serupa. Untuk tujuan Lisensi Publik ini, dalam hal Materi Berlisensi adalah ciptaan musikal, pertunjukan, atau rekaman suara, Materi Adaptasi juga tercipta saat Materi Berlisensi dipadukan dengan gambar bergerak. Lisensi Pengadaptasi adalah lisensi yang Anda berikan pada Hak Cipta dan Hak-hak Serupa Anda pada kontribusi Anda dalam Materi Adaptasi sesuai dengan syarat dan ketentuan dalam Lisensi Publik ini. Hak Cipta dan Hak-hak Serupa adalah hak cipta dan/atau Hak-hak Serupa yang berkaitan dengan hak cipta termasuk, tanpa terbatas pada, hak untuk mempertunjukan, menyiarkan, merekam suara, dan Hak Basis Data Sui Generis, tanpa mengurangi tanda atau kategori hak-hak tersebut. Untuk tujuan Lisensi Publik ini, hak-hak yang disebutkan dalam Bagian 2(b)(1)-(2) tidak termasuk Hak Cipta dan Hak-hak Serupa. Sarana Kontrol Teknologi adalah tindakan yang, dalam hal tidak adanya otoritas yang berkewajiban, tidak boleh dirusak di bawah ketentuan peraturan perundang-undangan yang memenuhi kewajiban Pasal 11 Perjanjian Hak Cipta WIPO yang berlaku sejak 20 Desember 1996 dan/atau perjanjian internasional yang serupa. Pengecualian dan Pembatasan adalah penggunaan yang wajar dan/atau pengecualian atau pembatasan lain atas Hak Cipta dan Hak-hak Serupa yang berlaku pada penggunaan Anda atas Materi Berlisensi. Materi Berlisensi adalah ciptaan di bidang seni dan sastra, basis data, atau materi lain yang menggunakan Lisensi Publik ini. Hak Lisensi adalah hak-hak yang diberikan kepada Anda berdasarkan syarat dan ketentuan pada Lisensi Publik ini, yang terbatas pada seluruh Hak Cipta dan Hak-hak Serupa yang berlaku pada penggunaan Anda atas Materi Berlisensi dan terbatas pada bagian yang dapat dilisensikan oleh Pemberi Lisensi. Pemberi Lisensi adalah setiap individu atau entitas yang memberikan hak-hak di bawah Lisensi Publik. Membagikan adalah menyediakan materi kepada publik dengan cara atau proses apapun yang membutuhkan izin di bawah Hak Lisensi, seperti memperbanyak, memamerkan, mempertunjukan, menyebarluaskan, mengomunikasikan, atau mengimpor, dan untuk menyediakan materi kepada publik termasuk melalui cara-cara yang memungkinkan publik untuk mengakses materi dari tempat dan waktu yang mereka pilih sendiri. Hak Basis Data Sui Generis adalah hak selain hak cipta yang muncul dari Direktif Parlemen dan Dewan Uni Eropa 11 Maret 1996 No. 96/9/EC tentang tentang perlindungan hukum atas basis data, sebagaimana diamandemen dan/atau digantikan, juga hak-hak setara lainnya yang berlaku. Anda adalah setiap individu atau entitas hukum yang menggunakan Hak Lisensi di bawah Lisensi Publik ini. Bagian 2 – Ruang Lingkup. Ruang lingkup lisensi . Sesuai dengan syarat dan ketentuan di dalam Lisensi Publik ini, Pemberi Lisensi memberikan Anda lisensi yang berlaku di seluruh dunia, bebas royalti, tidak dapat dilisensikan kembali, non-eksklusif, dan tidak dapat dicabut untuk menggunakan Hak Lisensi pada Materi Berlisensi untuk: memperbanyak dan Membagikan Materi Berlisensi, dalam bentuk utuh maupun sebagian; dan menciptakan, memperbanyak, dan Membagikan Materi Adaptasi. Pengecualian dan Pembatasan . Untuk menghindari keraguan, saat Pengecualian dan Pembatasan berlaku atas penggunaan Anda, Lisensi Publik ini tidak berlaku, dan Anda tidak wajib melaksanakan syarat dan ketentuan di dalamnya. Jangka waktu . Jangka waktu Lisensi Publik ini dijelaskan pada Bagian 6(a) . Media dan format; modifikasi teknis diperbolehkan . Pemberi Lisensi mengizinkan Anda untuk menggunakan Hak Lisensi pada seluruh media dan format baik yang telah diketahui saat ini maupun yang akan diciptakan, dan untuk melakukan modifikasi teknis yang diperlukan. Pemberi Lisensi melepaskan dan/atau setuju untuk tidak menggunakan hak atau kewenangan apapun untuk melarang Anda melakukan modifikasi teknis yang diperlukan untuk menggunakan Hak Lisensi, termasuk modifikasi teknis yang diperlukan untuk menghilangkan Sarana Kontrol Teknologi. Untuk tujuan Lisensi Publik ini, pembuatan modifikasi yang diizinkan Bagian 2(a)(4) ini tidak berarti menghasilkan Materi Adaptasi. Pengguna lain . Tawaran dari Pemberi Lisensi – Materi Berlisensi . Setiap pengguna Materi Berlisensi secara otomatis menerima tawaran dari Pemberi Lisensi untuk menggunakan Hak Lisensi di bawah syarat dan ketentuan dalam Lisensi Publik ini. Tidak ada halangan tambahan . Anda tidak boleh menawarkan atau memberikan syarat dan ketentuan tambahan pada, atau menggunakan Sarana Kontrol Teknologi pada, Materi Berlisensi apabila tindakan tersebut menghalangi penggunaan Hak Lisensi oleh setiap pengguna lain dari Materi Berlinsensi. Tanpa dukungan . Tidak satupun hal di bawah Lisensi Publik ini memunculkan atau dapat memunculkan izin untuk menyatakan secara langsung maupun tidak langsung bahwa Anda, atau penggunaan Anda atas Hak Lisensi, adalah terkait dengan, atau didukung oleh, atau secara resmi diberikan oleh, Pemberi Lisensi atau pihak lain yang harus menerima atribusi sebagaimana tercantum dalam Bagian 3(a)(1)(A)(i) . Hak lainnya . Hak moral, seperti hak atas integritas, tidak dilisensikan di bawah Lisensi Publik ini, juga hak atas potret, kerahasiaan, dan/atau hak personal serupa lainnya; walau demikian, sejauh yang dimungkinkan, Pemberi Lisensi melepaskan dan/atau setuju untuk tidak menggunakan hak lainnya yang dipegang oleh Pemberi Lisensi hingga batasan tertentu untuk mengizinkan Anda menggunakan Hak Lisensi, dan bukan sebaliknya. Hak paten dan merek dagang tidak dilisensikan di bawah Lisensi Publik. Sejauh yang dimungkinkan, Pemberi Lisensi melepaskan hak untuk mendapatkan royalti dari Anda dengan menggunakan Hak Lisensi, baik secara langsung maupun melalui lembaga manajemen kolektif di bawah ketentuan skema lisensi sukarela atau yang dapat dilepaskan maupun skema lisensi wajib. Dalam kondisi lainnya Pemberi Lisensi memiliki hak untuk mendapatkan royalti tersebut. Bagian 3 – Ketentuan Lisensi. Penggunaan Anda atas Hak Lisensi bergantung pada ketentuan di bawah ini. Atribusi . Apabila Anda Membagikan Materi Berlisensi (termasuk yang telah dimodifikasi), Anda wajib: mencantumkan hal-hal di bawah ini apabila dinyatakan oleh Pemberi Lisensi di dalam Materi Berlisensi: identitas para pencipta Materi Berlisensi dan pihak lain yang harus menerima atribusi, dengan cara yang sesuai dengan permintaan Pemberi Lisensi (termasuk penggunaan nama samaran jika ada); pemberitahuan hak cipta; pemberitahuan mengenai Lisensi Publik ini; pemberitahuan mengenai pernyataan jaminan; PSS (pengidentifikasi sumber seragam) atau tautan kepada Materi Berlisensi jika memungkinkan; menunjukkan bahwa Anda telah memodifikasi Materi Berlisensi dan menunjukkan setiap modifikasi yang sebelumnya pernah dibuat; dan menunjukkan bahwa Materi Berlisensi dilisensikan di bawah Lisensi Publik ini, termasuk teks, atau PSS dan tautan kepada, dari Lisensi Publik ini. Anda dapat melaksanakan ketentuan pada Bagian 3(a)(1) dengan cara yang sesuai dengan perantara, cara, dan konteks penggunaan Anda dalam Membagikan Materi Berlisensi. Sebagai contoh, Anda dapat melaksanakan ketentuan ini dengan memberikan PSS atau tautan kepada sumber yang menyediakan informasi yang dibutuhkan. Apabila dimintakan demikian oleh Pemberi Lisensi, Anda harus menghilangkan setiap informasi yang dinyatakan dalam Bagian 3(a)(1)(A) jika memungkinkan. Apabila Anda Membagikan Materi Adaptasi yang Anda buat, Lisensi Pengadaptasi yang harus Anda gunakan tidak dapat menghalangi penerima Materi Adaptasi untuk melaksanakan Lisensi Publik ini. Bagian 4 – Hak Basis Data Sui Generis. Apabila Hak Lisensi mencakup Hak Basis Data Sui Generis yang berlaku untuk penggunaan Anda atas Materi Berlisensi: untuk menghindari keraguan, Bagian 2(a)(1) memberikan hak kepada Anda untuk mengambil, menggunakan kembali, memperbanyak, dan Membagikan seluruh atau sebagian besar dari isi basis data; apabila Anda mencantumkan seluruh atau sebagian besar dari isi basis data di dalam basis data dengan Hak Basis Data Sui Generis yang dapat Anda gunakan, maka basis data dengan Hak Basis Data Sui Generis yang dapat Anda gunakan (namun bukan isinya secara terpisah) adalah Materi Adaptasi; dan Anda harus melaksanakan ketentuan dalam Bagian 3(a) apabila Anda Membagikan seluruh atau sebagian besar dari isi basis data. Untuk menghindari keraguan, Bagian 4 ini menambahkan dan tidak menggantikan kewajiban Anda di bawah Lisensi Publik di mana Hak Lisensi termasuk Hak Cipta dan Hak-hak Serupa lainnya. Bagian 5 – Pernyataan Jaminan dan Batasan Tanggung Jawab. Kecuali dilaksanakan dengan cara lain secara terpisah oleh Pemberi Lisensi, sejauh yang dimungkinkan, Pemberi Lisensi memberikan Materi Berlisensi “apa adanya” dan “sebagaimana tersedia”, dan tidak memberikan pernyataan atau jaminan apapun terkait Materi Berlisensi, baik secara tegas, secara tersirat, berdasarkan hukum, atau lainnya. Hal ini termasuk, tanpa terbatas pada, jaminan atas hak, jual beli, kecocokan untuk tujuan tertentu, tidak adanya pelanggaran, tidak adanya pengelabuan atau cacat lainnya, keakuratan, atau adanya atau tidak adanya kesalahan, baik yang diketahui maupun tidak. Dalam hal pernyataan jaminan tidak dapat dilaksanakan secara penuh atau sebagian, pernyataan ini tidak berlaku terhadap Anda. Sejauh yang dimungkinkan, Pemberi Lisensi tidak dapat dianggap bertanggung jawab kepada Anda untuk tindakan hukum apapun (termasuk, tanpa terbatas pada, kelalaian) atau untuk setiap kehilangan, kerugian, pengeluaran, atau kerusakan yang terjadi secara langsung, khusus, tidak langsung, sebagai kecelakaan, akibat, hukuman, pembebasan, atau lainnya yang muncul dari Lisensi Publik ini atau penggunaan Materi Berlisensi, walau pemberi lisensi telah memberitahukan kemungkinan terjadinya kehilangan, kerugian, pengeluaran, atau kerusakan tersebut. Dalam hal pembatasan tanggung jawab tidak dapat dilaksanakan secara penuh atau sebagian, batasan ini tidak berlaku terhadap Anda. Pernyataan jaminan dan batasan tanggung jawab di atas ini dapat diinterpretasikan dengan cara, sejauh yang dimungkinkan, yang paling dekat dengan pernyataan dan pelepasan dari seluruh tanggung jawab sepenuhnya. Bagian 6 – Jangka Waktu dan Penghentian. Lisensi Publik ini berlaku sepanjang jangka waktu Hak Cipta dan Hak-hak Serupa yang dilisensikan di bawahnya. Walau demikian, apabila Anda lalai dalam melaksanakan ketentuan Lisensi Publik ini, maka hak Anda di bawah Lisensi Publik ini akan secara otomatis berakhir. Dalam hal hak Anda untuk menggunakan Materi Berlisensi telah berakhir sesuai Bagian 6(a), Lisensi Publik ini dapat berlaku kembali: secara otomatis pada tanggal ditanggulanginya kelalaian yang dilakukan, atau dalam waktu 30 hari setelah Anda mengetahui kelalaian yang dilakukan; atau berdasarkan pemberlakukan kembali oleh Pemberi Lisensi. Untuk menghindari keraguan, Bagian 6(b) tidak berpengaruh pada setiap pelanggaran atas hak yang dimiliki oleh Pemberi Lisensi yang terjadi akibat kelalaian Anda melaksanakan ketentuan dalam Lisensi Publik ini. Untuk menghindari keraguan, Pemberi Lisensi dapat menawarkan Materi Berlisensi di bawah syarat dan ketentuan yang terpisah atau berhenti menyebarluaskan Materi Berlisensi di setiap waktu; namun, hal ini tidak akan menghentikan keberlakuan Lisensi Publik ini. Bagian 1 , 5 , 6 , 7 , dan 8 akan terus berlaku setelah Lisensi Publik ini berakhir. Bagian 7 – Syarat dan Ketentuan Lain. Pemberi Lisensi tidak terikat di bawah setiap syarat atau ketentuan tambahan atau syarat atau ketentuan yang berbeda yang Anda sarankan kecuali secara tegas disetujui demikian. Setiap aturan, kesepakatan, atau perjanjian terkait Materi Berlisensi yang tidak tercantum di sini berlaku secara terpisah dan tidak bergantung pada syarat dan ketentuan di bawah Lisensi Publik ini. Bagian 8 – Interpretasi. Untuk menghindari keraguan, Lisensi Publik ini tidak bertujuan untuk, dan tidak dapat dianggap bertujuan untuk, mengurangi, membatasi, menghalangi, atau memaksakan ketentuan dari setiap penggunaan Materi Berlisensi yang secara hukum dapat diciptakan tanpa izin di bawah Lisensi Publik ini. Sejauh yang dimungkinkan, apabila ketentuan di bawah Lisensi Publik ini dinilai tidak dapat dilaksanakan, maka kewajiban pelaksanaan ketentuan harus dilakukan dengan cara yang sesuai. Apabila ketentuan yang ada tidak dapat dilaksanakan sama sekali, maka ketentuan tersebut ditiadakan dari Lisensi Publik ini namun tidak berpengaruh pada pelaksanaan syarat dan ketentuan lainnya. Syarat atau ketentuan di bawah Lisensi Publik ini tidak dapat dilepaskan dan tidak ada kelalaian yang diizinkan kecuali secara tegas disetujui demikian oleh Pemberi Lisensi. Lisensi Publik ini tidak memunculkan atau dapat dianggap sebagai pembatasan dari, atau pelepasan atas, setiap hak dan kekebalan yang berlaku untuk Pemberi Lisensi atau Anda, termasuk dari proses hukum menurut jurisdiksi atau kewenangan apapun. About Creative Commons Creative Commons bukanlah pihak dalam lisensi publik. Walau demikian, Creative Commons dapat memilih untuk menggunakan salah satu dari lisensi publik yang ada untuk materi yang dipublikasikan oleh kami dan dalam hal demikian dianggap sebagai "Pemberi Lisensi." Teks dari lisensi publik Creative Commons disebarluaskan di bawah Dedikasi Domain Publik CC0 . Kecuali untuk tujuan tertentu dalam hal menyatakan bahwa materi tersebut disebarluaskan di bawah lisensi publik Creative Commons atau sebagaimana diizinkan oleh aturan Creative Commons yang dicantumkan pada creativecommons.org/policies , Creative Commons tidak mengizinkan penggunaan merek dagang "Creative Commons" atau setiap merek dagang atau logo Creative Commons tanpa izin tertulis termasuk, tanpa terbatas pada, dalam hubungannya dengan setiap modifikasi tanpa izin yang dilakukan terhadap lisensi publik atau setiap aturan, kesepakatan, atau perjanjian lainnya terkait penggunaan materi berlisensi. Untuk menghindari keraguan, paragraf ini tidak menjadi bagian dari lisensi publik. Creative Commons dapat dihubungi melalui creativecommons.org . Creative Commons is the nonprofit behind the open licenses and other legal tools that allow creators to share their work. Our legal tools are free to use. Learn more about our work Learn more about CC Licensing Support our work Use the license for your own material. Licenses List Public Domain List Creative Commons Contact Newsletter Privacy Policies Terms Contact Us Creative Commons PO Box 1866, Mountain View, CA 94042 info@creativecommons.org +1-415-429-6753 Instagram --> Bluesky Mastodon LinkedIn Subscribe to our Newsletter Support Our Work Our work relies on you! Help us keep the Internet free and open. Donate Now Except where otherwise noted , content on this site is licensed under a Creative Commons Attribution 4.0 International license . Icons by Font Awesome . | 2026-01-13T09:29:13 |
https://th-th.facebook.com/login/?next=https%3A%2F%2Fl.facebook.com%2Fl.php%3Fu%3Dhttps%253A%252F%252Fwww.instagram.com%252F%26amp%253Bh%3DAT3JYaROIHDRnGnvxRuIozFF_BGGvvoNi8kVPWnSK0yCW2_Va2rKJWNXZ3PUqk5CKpNtOfbF-WNUpIWc7WVvePlsk9n9z3ptr24Okxk2028tZW0HuZ3QVvGoPKfc7Ts55I89ELD7U7OWf7bu | Facebook Facebook อีเมลหรือโทรศัพท์ รหัสผ่าน ลืมบัญชีใช่หรือไม่ สร้างบัญชีใหม่ คุณถูกบล็อกชั่วคราว คุณถูกบล็อกชั่วคราว ดูเหมือนว่าคุณจะใช้คุณสมบัตินี้ในทางที่ผิดโดยการใช้เร็วเกินไป คุณถูกบล็อกจากการใช้โดยชั่วคราว Back ภาษาไทย 한국어 English (US) Tiếng Việt Bahasa Indonesia Español 中文(简体) 日本語 Português (Brasil) Français (France) Deutsch สมัคร เข้าสู่ระบบ Messenger Facebook Lite วิดีโอ Meta Pay Meta Store Meta Quest Ray-Ban Meta Meta AI เนื้อหาเพิ่มเติมจาก Meta AI Instagram Threads ศูนย์ข้อมูลการลงคะแนนเสียง นโยบายความเป็นส่วนตัว ศูนย์ความเป็นส่วนตัว เกี่ยวกับ สร้างโฆษณา สร้างเพจ ผู้พัฒนา ร่วมงานกับ Facebook คุกกี้ ตัวเลือกโฆษณา เงื่อนไข ความช่วยเหลือ การอัพโหลดผู้ติดต่อและผู้ที่ไม่ได้ใช้บริการ การตั้งค่า บันทึกกิจกรรม Meta © 2026 | 2026-01-13T09:29:13 |
https://vi-vn.facebook.com/reg/?entry_point=login&next=https%3A%2F%2Fl.facebook.com%2Fl.php%3Fu%3Dhttps%253A%252F%252Fwww.instagram.com%252F%26amp%253Bh%3DAT21L5LIblPB6uZ-IbjXcioP8ejSlaAq7HniZxHJmYI-o6L1n76-VW-sAVLwyWXBNG2n_2y0DYxybw7ed-r36wSDm4wd3DrO-QezAGpzTaSSS6_25Sw5M6hXHwk94uNECNvyU1JtXti_Pm1I | Facebook Facebook Email hoặc điện thoại Mật khẩu Bạn quên tài khoản ư? Tạo tài khoản mới Bạn tạm thời bị chặn Bạn tạm thời bị chặn Có vẻ như bạn đang dùng nhầm tính năng này do sử dụng quá nhanh. Bạn tạm thời đã bị chặn sử dụng nó. Back Tiếng Việt 한국어 English (US) Bahasa Indonesia ภาษาไทย Español 中文(简体) 日本語 Português (Brasil) Français (France) Deutsch Đăng ký Đăng nhập Messenger Facebook Lite Video Meta Pay Cửa hàng trên Meta Meta Quest Ray-Ban Meta Meta AI Nội dung khác do Meta AI tạo Instagram Threads Trung tâm thông tin bỏ phiếu Chính sách quyền riêng tư Trung tâm quyền riêng tư Giới thiệu Tạo quảng cáo Tạo Trang Nhà phát triển Tuyển dụng Cookie Lựa chọn quảng cáo Điều khoản Trợ giúp Tải thông tin liên hệ lên & đối tượng không phải người dùng Cài đặt Nhật ký hoạt động Meta © 2026 | 2026-01-13T09:29:13 |
https://www.facebook.com/login/?next=https%3A%2F%2Fl.facebook.com%2Fl.php%3Fu%3Dhttps%253A%252F%252Fwww.instagram.com%252F%26amp%253Bh%3DAT3JYaROIHDRnGnvxRuIozFF_BGGvvoNi8kVPWnSK0yCW2_Va2rKJWNXZ3PUqk5CKpNtOfbF-WNUpIWc7WVvePlsk9n9z3ptr24Okxk2028tZW0HuZ3QVvGoPKfc7Ts55I89ELD7U7OWf7bu | Facebook Facebook 이메일 또는 휴대폰 비밀번호 계정을 잊으셨나요? 새 계정 만들기 일시적으로 차단됨 일시적으로 차단됨 회원님의 이 기능 사용 속도가 너무 빠른 것 같습니다. 이 기능 사용에서 일시적으로 차단되었습니다. Back 한국어 English (US) Tiếng Việt Bahasa Indonesia ภาษาไทย Español 中文(简体) 日本語 Português (Brasil) Français (France) Deutsch 가입하기 로그인 Messenger Facebook Lite 동영상 Meta Pay Meta 스토어 Meta Quest Ray-Ban Meta Meta AI Meta AI 콘텐츠 더 보기 Instagram Threads 투표 정보 센터 개인정보처리방침 개인정보 보호 센터 정보 광고 만들기 페이지 만들기 개발자 채용 정보 쿠키 AdChoices 이용 약관 고객 센터 연락처 업로드 및 비사용자 설정 활동 로그 Meta © 2026 | 2026-01-13T09:29:13 |
https://l.facebook.com/l.php?u=https%3A%2F%2Fwww.instagram.com%2F&h=AT302_ectAGosG-VOUDCbpkB5cp4cfVahESHE_Y3xCduTKWfr2JgUHv6eR0_l-QFBXFQiGfSENr5UATua8FTDcX_LM4YX00FbFI-grkIlElTTXhz_vIvkkJ6SudNFfB6GnoVtIBqPHAqiW7A | Facebook Facebook 이메일 또는 휴대폰 비밀번호 계정을 잊으셨나요? 새 계정 만들기 일시적으로 차단됨 일시적으로 차단됨 회원님의 이 기능 사용 속도가 너무 빠른 것 같습니다. 이 기능 사용에서 일시적으로 차단되었습니다. Back 한국어 English (US) Tiếng Việt Bahasa Indonesia ภาษาไทย Español 中文(简体) 日本語 Português (Brasil) Français (France) Deutsch 가입하기 로그인 Messenger Facebook Lite 동영상 Meta Pay Meta 스토어 Meta Quest Ray-Ban Meta Meta AI Meta AI 콘텐츠 더 보기 Instagram Threads 투표 정보 센터 개인정보처리방침 개인정보 보호 센터 정보 광고 만들기 페이지 만들기 개발자 채용 정보 쿠키 AdChoices 이용 약관 고객 센터 연락처 업로드 및 비사용자 설정 활동 로그 Meta © 2026 | 2026-01-13T09:29:13 |
https://l.facebook.com/l.php?u=https%3A%2F%2Fwww.instagram.com%2F&h=AT2A-Hcxe9FDUxXMjHYdF_uHFgfz8zDfyip4PE1VH2p45WyYRyqeFYIJ_eDS1IeJhLjTiZSqdJ_Ad4YTEUVSOo5wPIkGzrQkM1LacP7j41Vd3D6bVLXnZQpwHSmFIPfmAGobU4uCTv3uRCmM | Facebook Facebook 이메일 또는 휴대폰 비밀번호 계정을 잊으셨나요? 새 계정 만들기 일시적으로 차단됨 일시적으로 차단됨 회원님의 이 기능 사용 속도가 너무 빠른 것 같습니다. 이 기능 사용에서 일시적으로 차단되었습니다. Back 한국어 English (US) Tiếng Việt Bahasa Indonesia ภาษาไทย Español 中文(简体) 日本語 Português (Brasil) Français (France) Deutsch 가입하기 로그인 Messenger Facebook Lite 동영상 Meta Pay Meta 스토어 Meta Quest Ray-Ban Meta Meta AI Meta AI 콘텐츠 더 보기 Instagram Threads 투표 정보 센터 개인정보처리방침 개인정보 보호 센터 정보 광고 만들기 페이지 만들기 개발자 채용 정보 쿠키 AdChoices 이용 약관 고객 센터 연락처 업로드 및 비사용자 설정 활동 로그 Meta © 2026 | 2026-01-13T09:29:13 |
https://doc.rust-lang.org/cargo/commands/cargo-owner.html | cargo owner - The Cargo Book Keyboard shortcuts Press ← or → to navigate between chapters Press S or / to search in the book Press ? to show this help Press Esc to hide this help Auto Light Rust Coal Navy Ayu The Cargo Book cargo-owner(1) NAME cargo-owner — Manage the owners of a crate on the registry SYNOPSIS cargo owner [ options ] --add login [ crate ] cargo owner [ options ] --remove login [ crate ] cargo owner [ options ] --list [ crate ] DESCRIPTION This command will modify the owners for a crate on the registry. Owners of a crate can upload new versions and yank old versions. Non-team owners can also modify the set of owners, so take care! This command requires you to be authenticated with either the --token option or using cargo-login(1) . If the crate name is not specified, it will use the package name from the current directory. See the reference for more information about owners and publishing. OPTIONS Owner Options -a --add login … Invite the given user or team as an owner. -r --remove login … Remove the given user or team as an owner. -l --list List owners of a crate. --token token API token to use when authenticating. This overrides the token stored in the credentials file (which is created by cargo-login(1) ). Cargo config environment variables can be used to override the tokens stored in the credentials file. The token for crates.io may be specified with the CARGO_REGISTRY_TOKEN environment variable. Tokens for other registries may be specified with environment variables of the form CARGO_REGISTRIES_NAME_TOKEN where NAME is the name of the registry in all capital letters. --index index The URL of the registry index to use. --registry registry Name of the registry to use. Registry names are defined in Cargo config files . If not specified, the default registry is used, which is defined by the registry.default config key which defaults to crates-io . Display Options -v --verbose Use verbose output. May be specified twice for “very verbose” output which includes extra output such as dependency warnings and build script output. May also be specified with the term.verbose config value . -q --quiet Do not print cargo log messages. May also be specified with the term.quiet config value . --color when Control when colored output is used. Valid values: auto (default): Automatically detect if color support is available on the terminal. always : Always display colors. never : Never display colors. May also be specified with the term.color config value . Common Options + toolchain If Cargo has been installed with rustup, and the first argument to cargo begins with + , it will be interpreted as a rustup toolchain name (such as +stable or +nightly ). See the rustup documentation for more information about how toolchain overrides work. --config KEY=VALUE or PATH Overrides a Cargo configuration value. The argument should be in TOML syntax of KEY=VALUE , or provided as a path to an extra configuration file. This flag may be specified multiple times. See the command-line overrides section for more information. -C PATH Changes the current working directory before executing any specified operations. This affects things like where cargo looks by default for the project manifest ( Cargo.toml ), as well as the directories searched for discovering .cargo/config.toml , for example. This option must appear before the command name, for example cargo -C path/to/my-project build . This option is only available on the nightly channel and requires the -Z unstable-options flag to enable (see #10098 ). -h --help Prints help information. -Z flag Unstable (nightly-only) flags to Cargo. Run cargo -Z help for details. ENVIRONMENT See the reference for details on environment variables that Cargo reads. EXIT STATUS 0 : Cargo succeeded. 101 : Cargo failed to complete. EXAMPLES List owners of a package: cargo owner --list foo Invite an owner to a package: cargo owner --add username foo Remove an owner from a package: cargo owner --remove username foo SEE ALSO cargo(1) , cargo-login(1) , cargo-publish(1) | 2026-01-13T09:29:13 |
https://doc.rust-lang.org/stable/std/f64/consts/constant.FRAC_2_PI.html | FRAC_2_PI in std::f64::consts - Rust This old browser is unsupported and will most likely display funky things. FRAC_2_PI std 1.92.0 (ded5c06cf 2025-12-08) In std:: f64:: consts std :: f64 :: consts Constant FRAC_ 2_ PI Copy item path 1.0.0 · Source pub const FRAC_2_PI: f64 = 0.636619772367581343075535053490057448_f64; // 0.63661977236758138f64 Expand description 2/π | 2026-01-13T09:29:13 |
https://doc.rust-lang.org/stable/std/f64/consts/constant.FRAC_1_SQRT_2.html | FRAC_1_SQRT_2 in std::f64::consts - Rust This old browser is unsupported and will most likely display funky things. FRAC_1_SQRT_2 std 1.92.0 (ded5c06cf 2025-12-08) In std:: f64:: consts std :: f64 :: consts Constant FRAC_ 1_ SQRT_ 2 Copy item path 1.0.0 · Source pub const FRAC_1_SQRT_2: f64 = 0.707106781186547524400844362104849039_f64; // 0.70710678118654757f64 Expand description 1/sqrt(2) | 2026-01-13T09:29:13 |
https://doc.rust-lang.org/stable/std/f64/consts/constant.FRAC_1_PI.html | FRAC_1_PI in std::f64::consts - Rust This old browser is unsupported and will most likely display funky things. FRAC_1_PI std 1.92.0 (ded5c06cf 2025-12-08) In std:: f64:: consts std :: f64 :: consts Constant FRAC_ 1_ PI Copy item path 1.0.0 · Source pub const FRAC_1_PI: f64 = 0.318309886183790671537767526745028724_f64; // 0.31830988618379069f64 Expand description 1/π | 2026-01-13T09:29:13 |
https://doc.rust-lang.org/stable/std/f64/consts/constant.FRAC_PI_2.html | FRAC_PI_2 in std::f64::consts - Rust This old browser is unsupported and will most likely display funky things. FRAC_PI_2 std 1.92.0 (ded5c06cf 2025-12-08) In std:: f64:: consts std :: f64 :: consts Constant FRAC_ PI_ 2 Copy item path 1.0.0 · Source pub const FRAC_PI_2: f64 = 1.57079632679489661923132169163975144_f64; // 1.5707963267948966f64 Expand description π/2 | 2026-01-13T09:29:13 |
https://doc.rust-lang.org/stable/std/f64/consts/constant.LN_2.html | LN_2 in std::f64::consts - Rust This old browser is unsupported and will most likely display funky things. LN_2 std 1.92.0 (ded5c06cf 2025-12-08) In std:: f64:: consts std :: f64 :: consts Constant LN_2 Copy item path 1.0.0 · Source pub const LN_2: f64 = 0.693147180559945309417232121458176568_f64; // 0.69314718055994529f64 Expand description ln(2) | 2026-01-13T09:29:13 |
https://twitter.com/starletdreaming | JavaScript is not available. We’ve detected that JavaScript is disabled in this browser. Please enable JavaScript or switch to a supported browser to continue using x.com. You can see a list of supported browsers in our Help Center. Help Center Terms of Service Privacy Policy Cookie Policy Imprint Ads info © 2026 X Corp. Something went wrong, but don’t fret — let’s give it another shot. Try again Some privacy related extensions may cause issues on x.com. Please disable them and try again. | 2026-01-13T09:29:13 |
https://doc.rust-lang.org/stable/std/f64/consts/constant.FRAC_PI_4.html | FRAC_PI_4 in std::f64::consts - Rust This old browser is unsupported and will most likely display funky things. FRAC_PI_4 std 1.92.0 (ded5c06cf 2025-12-08) In std:: f64:: consts std :: f64 :: consts Constant FRAC_ PI_ 4 Copy item path 1.0.0 · Source pub const FRAC_PI_4: f64 = 0.785398163397448309615660845819875721_f64; // 0.78539816339744828f64 Expand description π/4 | 2026-01-13T09:29:13 |
https://doc.rust-lang.org/stable/std/f64/consts/constant.FRAC_PI_6.html | FRAC_PI_6 in std::f64::consts - Rust This old browser is unsupported and will most likely display funky things. FRAC_PI_6 std 1.92.0 (ded5c06cf 2025-12-08) In std:: f64:: consts std :: f64 :: consts Constant FRAC_ PI_ 6 Copy item path 1.0.0 · Source pub const FRAC_PI_6: f64 = 0.52359877559829887307710723054658381_f64; // 0.52359877559829893f64 Expand description π/6 | 2026-01-13T09:29:13 |
https://doc.rust-lang.org/stable/std/f64/consts/constant.FRAC_PI_3.html | FRAC_PI_3 in std::f64::consts - Rust This old browser is unsupported and will most likely display funky things. FRAC_PI_3 std 1.92.0 (ded5c06cf 2025-12-08) In std:: f64:: consts std :: f64 :: consts Constant FRAC_ PI_ 3 Copy item path 1.0.0 · Source pub const FRAC_PI_3: f64 = 1.04719755119659774615421446109316763_f64; // 1.0471975511965979f64 Expand description π/3 | 2026-01-13T09:29:13 |
https://doc.rust-lang.org/stable/std/f64/consts/constant.FRAC_PI_8.html | FRAC_PI_8 in std::f64::consts - Rust This old browser is unsupported and will most likely display funky things. FRAC_PI_8 std 1.92.0 (ded5c06cf 2025-12-08) In std:: f64:: consts std :: f64 :: consts Constant FRAC_ PI_ 8 Copy item path 1.0.0 · Source pub const FRAC_PI_8: f64 = 0.39269908169872415480783042290993786_f64; // 0.39269908169872414f64 Expand description π/8 | 2026-01-13T09:29:13 |
https://doc.rust-lang.org/stable/std/f64/consts/constant.E.html | E in std::f64::consts - Rust This old browser is unsupported and will most likely display funky things. E std 1.92.0 (ded5c06cf 2025-12-08) In std:: f64:: consts std :: f64 :: consts Constant E Copy item path 1.0.0 · Source pub const E: f64 = 2.71828182845904523536028747135266250_f64; // 2.7182818284590451f64 Expand description Euler’s number (e) | 2026-01-13T09:29:13 |
https://doc.rust-lang.org/stable/std/f64/consts/constant.LN_10.html | LN_10 in std::f64::consts - Rust This old browser is unsupported and will most likely display funky things. LN_10 std 1.92.0 (ded5c06cf 2025-12-08) In std:: f64:: consts std :: f64 :: consts Constant LN_10 Copy item path 1.0.0 · Source pub const LN_10: f64 = 2.30258509299404568401799145468436421_f64; // 2.3025850929940459f64 Expand description ln(10) | 2026-01-13T09:29:13 |
https://doc.rust-lang.org/stable/std/f64/consts/constant.FRAC_2_SQRT_PI.html | FRAC_2_SQRT_PI in std::f64::consts - Rust This old browser is unsupported and will most likely display funky things. FRAC_2_SQRT_PI std 1.92.0 (ded5c06cf 2025-12-08) In std:: f64:: consts std :: f64 :: consts Constant FRAC_ 2_ SQRT_ PI Copy item path 1.0.0 · Source pub const FRAC_2_SQRT_PI: f64 = 1.12837916709551257389615890312154517_f64; // 1.1283791670955126f64 Expand description 2/sqrt(π) | 2026-01-13T09:29:14 |
https://creativecommons.org/licenses/by/4.0/legalcode.eu | Kode Legala - Aitortu 4.0 Nazioartekoa - Creative Commons Joan edukira Creative Commons Menu Who We Are What We Do Licenses and Tools Blog Support Us Languages available Bahasa Indonesia Basque dansk Deutsch eesti English español français frysk Hrvatski italiano latviešu Lietuviškai Māori Nederlands norsk polski Português Română Slovensky Slovenščina suomi svenska Türkçe česky Ελληνικά Русский Українська العربيّة 日本語 简体中文 繁體中文 한국어 Search Donate Explore CC Global Network Join a global community working to strengthen the Commons Certificate Become an expert in creating and engaging with openly licensed materials Global Summit Attend our annual event, promoting the power of open licensing Chooser Get help choosing the appropriate license for your work Search Portal Find engines to search openly licensed material for creative and educational reuse Open Source Help us build products that maximize creativity and innovation Help us protect the commons. Make a tax deductible gift to fund our work. Donate today! Aitortu 4.0 Nazioartekoa CC BY 4.0 Kode Legala Aitortu 4.0 Nazioartekoa 1. Atala - Definizioak. 2. Atala - Aplikazio-eremua. 3. Atala - Lizentziaren baldintzak. 4. Atala - Datu-baseen Sui Generis Eskubideak. 5. Atala - Berme-ukatzea eta erantzukizun-mugatzea. 6. Atala - Iraupena eta azkentzea. 7. Atala - Beste baldintza batzuk. 8. Atala - Interpretazioa. Canonical URL https://creativecommons.org/licenses/by/4.0/ Other formats Plain Text RDF/XML See the deed Version 4.0 • See the errata page for any corrections and the date of change About the license and Creative Commons Creative Commons Corporation («Creative Commons») ez da abokatu-bulego bat, eta ez du zerbitzu juridikorik edo aholkularitza juridikorik eskaintzen. Creative Commons lizentzia publikoa banatzeagatik ez da abokatu-bezero harremanik edo bestelakorik sortzen. Creative Commons-ek «bere horretan» jartzen ditu eskuragarri bere lizentziak eta horiekin erlazionatutako informazioa. Creative Commons-ek ez du bermerik eskaintzen bere lizentziei, lizentzia horiekin emandako edozein materiali edo horiekin erlazionatutako informazioari dagokienez. Creative Commons-ek, ahal den neurrian, ez du erantzukizunik hartzen horiek erabiltzetik sor daitezkeen kalteen gainean. Creative Commons Lizentzia Publikoen erabilera Creative Commons lizentzia publikoek baldintza-sorta estandar bat eskaintzen dute sortzaileek eta bestelako eskubideen jabeek erabili ahal izan ditzaten gizartearekin partekatzeko, bai jatorrizko egile-lanak, bai egile-eskubideei edo lizentzia publikoan zehazten diren beste eskubide batzuei lotutako materialak. Ondorengo kontsiderazioak informazio moduan ematen dira; ez dira exhaustiboak, eta ez dira gure lizentzien zati. Lizentzia-emaileentzako kontsiderazioak Publikoari materiala erabiltzeko baimena emateko pentsatuta daude gure lizentzia publikoak, horretarako ahalmena dutenek jendeari baimena eman diezaioten bestela egile-eskubideei eta beste eskubide batzuei lotuta egongo litzatekeen materiala erabili ahal izateko. Gure lizentziak errebokaezinak dira. Lizentzia eman aurretik, lizentzia-emaileek arretaz irakurri eta ulertu behar dituzte aukeratu duten lizentziaren baldintzak. Era berean, behar diren eskubide guztiak bermatu behar dituzte gure lizentziak erabili aurretik, publikoak materiala aurreikusi bezala berrerabili ahal izan dezan. Argi eta garbi markatu behar dute lizentziaren barruan sartzen ez den materiala. Besteak beste, CC lizentziadun bestelako materiala, edo egile-eskubideen salbuespen edo mugekin erabilitako materiala. Lizentzia-emaileentzako kontsiderazio gehiago. Publikoarentzako kontsiderazioak Gure lizentzia publiko bat erabiltzen duenean, lizentzia-emaileak publikoari baimena ematen dio material lizentziatua erabil dezan zehaztutako baldintzetan. Lizentzia-emailearen baimena beharrezkoa ez bada, edozein arrazoi dela medio -adibidez, egile-eskubideen salbuespen edo mugaren bat aplikatzen delako-, erabilera hori ez da lizentziaren arabera erregulatuko. Gure lizentziek egile-eskubideei, edo lizentzia-emaileak eman ditzakeen beste eskubide batzuei, lotutako baimenak soilik ematen dituzte. Material lizentziatuaren erabilera beste arrazoi batzuk direla medio muga daiteke, besteak beste, beste pertsona batzuek materialaren gaineko egile-eskubideak edo beste eskubide batzuk dituztelako. Lizentzia-emaileek eskaera bereziak egin ditzakete, adibidez, aldaketa guztiak adierazteko edo deskribatzeko eskaera. Gure lizentziek horretara behartzen ez duten arren, eskaera horiek errespetatzea gomendatzen dizugu, zentzuzkoa den neurrian. Publikoarentzako kontsiderazio gehiago. Aitortu 4.0 Nazioartekoa Eskubide Lizentziatuak (behean definituak) erabiltzen badituzu, Creative Commons Aitortu 4.0 Nazioarteko Lizentzia Publiko honen («Lizentzia Publiko») baldintzei loturik zaudela onartzen eta baiesten duzu. Lizentzia Publiko hau kontratu gisa interpretatuko den neurrian, Zuk baldintza hauek onartu behar dituzu Eskubide Lizentziatuak eskuratzeko, eta Lizentzia-emaileak eskubide horiek emango dizkizu, Material Lizentziatua baldintza hauetan erabilgarri jartzetik lortzen dituen onurak kontuan izanda. 1. Atala - Definizioak. Egokitutako Materiala da Egile-eskubideen eta Antzeko Eskubideen menpe dagoen materiala, Material Lizentziatutik eratorria, edo hartan oinarritua, Material Lizentziatua itzuliz, moldatuz, berrantolatuz, eraldatuz edo bestela aldatuz, Lizentzia-emailearen Egile-eskubideen eta Antzeko Eskubideen araberako baimena behar duen beste edozein modutan. Lizentzia Publiko honi dagokionez, Material Lizentziatua musika-lanak, emanaldiak edo soinu-grabazioak direnean, Egokitutako Materiala sortzen da beti Material Lizentziatua mugimenduzko irudiekin denboraren arabera sinkronizatzen den bakoitzean. Egokitzailearen Lizentzia da Zuk Egokitutako Materialari egin dizkiozun ekarpenen gainean dituzun Egile-eskubideei eta Antzeko Eskubideei aplikatzen diezun lizentzia, Lizentzia Publiko honen baldintzen arabera. Egile-eskubideak eta Antzeko Eskubideak dira Egile-eskubideak eta/edo horiekin lotura estua duten antzeko beste eskubide batzuk, barne hartuz, mugarik gabe, emanaldiak, difusioa, soinu-grabazioak, eta Datu-baseen Sui Generis Eskubideak, eskubide horiek nola etiketatzen edo sailkatzen diren kontuan hartu gabe. Lizentzia Publiko honen ondorioetarako, 2(b)(1)-(2) Atalean zehaztutako eskubideak ez dira Egile-eskubide eta Antzeko Eskubidetzat jotzen. Teknologia Neurri Eraginkorrak dira, WIPO Jabetza Intelektualaren Mundu Erakundearen 1996ko abenduaren 20ko Egile-eskubideen Itunaren 11. artikuluan ezarritakoaren arabera, edo horren antzeko nazioarteko itunen arabera, saihestu behar ez diren neurri teknologikoak, baimen egokirik egon ezean. Salbuespenak eta Mugak dira Material Lizentziatua zuzen eta egoki erabiltzea eta tratatzea, eta/edo material hori erabiltzeko Zuri ezartzen zaizun Egile-eskubideen eta Antzeko Eskubideen beste edozein salbuespen edo muga. Material Lizentziatua da Lizentzia-emaileak Lizentzia Publiko hau eman dion artelan edo literatura-lan, datu-base edo bestelako material oro. Eskubide Lizentziatuak dira Lizentzia Publiko honen baldintzetan Zuri aitortzen zaizkizun eskubideak, zeinak mugatzen baitira Material Lizentziatuarekin egiten duzun erabilerari aplikatzen zaizkion -eta Lizentzia-emaileak eman ditzakeen- Egile-eskubide eta Antzeko Eskubideetara. Lizentzia-emailea da Lizentzia Publiko honen arabera eskubideak ematen dituen norbanakoa edo erakundea. Partekatzea da publikoari materiala eskaintzea Eskubide Lizentziatuen baimena behar duen edozein bitarteko edo prozesuren bidez (hala nola erreproduzitzea, erakustaldi publikoak egitea, emankizun publikoak egitea, banatzea, hedatzea, komunikatzea edo inportatzea) eta materiala publikoarentzat eskuragarri jartzea, bakoitzak nahi duen lekutik eta nahi duen unean eskuratu ahal izan dezan. Datu-baseen Sui Generis Eskubideak dira egile-eskubideen barnean sartzen ez direnak, Europako Parlamentuaren eta Kontseiluaren 1996ko martxoaren 11ko 96/9/EE Zuzentarauan, datu-baseen babes juridikoari buruzkoan, edo ondorengo zuzenketetan, arautzen direnak, eta, halaber, funtsean horien baliokideak diren munduko edozein lekutako eskubideak. Zu esaten denean, edo Zuri erreferentzia egiten zaizunean, Lizentzia Publiko honekin emandako Eskubide Lizentziatuak baliatzen dituen pertsona edo erakundea esan nahi da. 2. Atala - Aplikazio-eremua. Lizentzia ematea . Lizentzia Publiko honetan adierazten diren baldintzen arabera, Lizentzia-emaileak, honen bidez, mundu-mailako eta royalty-rik gabeko lizentzia ez azpilizentziagarri, ez esklusibo eta errebokaezina ematen dizu Zuri, Material Lizentziatuko Eskubide Lizentziatuak erabil ditzazun: Material Lizentziatua erreproduzitzeko eta Partekatzeko, osorik edo zati bat; eta Egokitutako Materiala produzitzeko, erreproduzitzeko eta Partekatzeko. Salbuespenak eta Mugak . Zalantzarik gelditu ez dadin, Zure erabilerari Salbuespenak eta Mugak aplikatzen zaizkionean, Lizentzia Publiko hau ez da aplikagarria izango, eta ez dituzu bertako baldintzak bete beharko. Iraupena . Lizentzia Publiko honen iraupena 6(a) Atalean zehazten da. Euskarriak eta formatuak: aldaketa teknikoak egiteko baimena . Lizentzia-emaileak baimena ematen dizu Eskubide Lizentziatuak erabiltzeko euskarri eta formatu guztietan, orain ezagutzen direnetan zein etorkizunean sortuko direnetan, eta horretarako beharrezkoak diren aldaketa teknikoak burutzeko. Lizentzia-emaileak baieztatzen eta berresten du ez duela eskubide edo autoritaterik erabiliko Zuri eragozteko edo debekatzeko Eskubide Lizentziatuak erabiltzeko behar diren aldaketa teknikoak egitea, Teknologia Neurri Eraginkorrak saihesteko aldaketa teknikoak barne. Lizentzia Publiko honen ondorioetarako, 2(a)(4) Atal honek baimendutako aldaketak egiteagatik soilik ez da Egokitutako Materialik sortzen. Ondorengo hartzaileak . Lizentzia-emailearen eskaintza - Material Lizentziatua . Material Lizentziatuaren hartzaile orok Lizentzia-emailearen eskaintza bat jasoko du automatikoki Eskubide Lizentziatuak erabiltzeko Lizentzia Publiko honen baldintzetan. Murrizketarik ez ondorengo hartzaileentzat . Ezin duzu baldintza gehigarri edo desberdinik eskaini edo inposatu Material Lizentziatuaren gainean, eta ezin diozu Teknologia Neurri Eraginkorrik aplikatu, baldin eta modu horretan Eskubide Lizentziatuen erabilera mugatzen bazaio Material Lizentziatuaren edozein hartzaileri. Onespenik ez . Lizentzia Publiko honek ez du baimenik ematen baieztatzeko edo ondorioztatzeko Zuk edo Material Lizentziatuekin egiten duzun erabilerak lotura duzuenik Lizentzia-emailearekin edo 3(a)(1)(A)(i) Atalaren arabera aitorpena jaso behar duen beste edonorekin, edo horien onespena, babesa edo sostengua duzuenik, edo sustatzen zaituztetenik edo estatus ofiziala ematen dizuetenik, eta ez litzateke hala interpretatu behar. Beste eskubide batzuk . Eskubide moralik, hala nola obraren osotasunaren eskubidea, ez da ematen Lizentzia Publiko honetan, ezta irudi-eskubiderik, pribatutasun-eskubiderik edo antzeko nortasun-eskubiderik ere. Hala ere, posible den neurrian, Lizentzia-emaileak baieztatzen eta berresten du ez duela halako eskubiderik baliatuko Eskubide Lizentziatuak erabil ahal izateko behar duzun neurrian, baina ez bestela. Lizentzia Publiko honek ez du ematen patente- eta marka-eskubiderik. Posible den neurrian, Lizentzia-emaileak uko egiten dio Eskubide Lizentziatuak erabiltzearen truke Zuri royalty-ak kobratzeko edozein eskubideri, dela zuzenean edo zeharka kudeaketa kolektiboko sozietate baten bidez, borondatezko edo uko egin dakiokeen edozein legezko edo nahitaezko lizentzia-sistematan. Beste kasu guztietan, Lizentzia-emaileak espresuki beretzat gordetzen du royalty horiek kobratzeko edozein eskubide. 3. Atala - Lizentziaren baldintzak. Eskubide Lizentziatuak erabiltzen dituzunean, ondorengo baldintzak bete behar dituzu. Aitorpena . Material Lizentziatua Partekatzen baduzu (baita aldaketak egin dizkiozunean ere), baldintza hauek bete behar dituzu: datu hauek mantendu, baldin eta Lizentzia-emaileak Material Lizentziatuarekin batera eman baditu: Material Lizentziatuaren egilearen edo egileen identifikazioa eta aitorpena jaso behar duen beste edozein pertsonarena, Lizentzia-emaileak eskatutako zentzuzko edozein modutan (baita izenorde edo pseudonimo bidez ere, halakorik ematen bada); egile-eskubideei buruzko oharra; Lizentzia Publiko honen inguruko oharra; bermerik ezari buruzko oharra; Material Lizentziatuaren URIa edo hiperesteka, zentzuzkoa eta egingarria den neurrian; Material Lizentziatua aldatu duzun adierazi eta aurreko aldaketen inguruko oharra mantendu; eta Material Lizentziatua Lizentzia Publiko honen menpe dagoela adierazi, eta Lizentzia Publiko honen testua edo testuaren URIa edo hiperesteka gehitu. Aurreko 3(a)(1) Ataleko baldintzak bete ditzakezu zentzuzkoa den edozein modutan, Material Lizentziatua Partekatzeko erabili dituzun euskarriak, bitartekoak eta testuingurua kontuan hartuta. Adibidez, baldintzak betetzeko zentzuzkoa litzateke behar den informazio guztia jasotzen duen URI edo hiperesteka bat ematea. Lizentzia-emaileak hala eskatzen badu, 3(a)(1)(A) Atalean jasotzen den edozein informazio ezabatu behar duzu, zentzuzkoa eta egingarria den neurrian. Zuk zeuk Egokitutako Materiala Partekatzen baduzu, aplikatzen diozun Egokitzailearen Lizentziak ezin die Egokitutako Materialaren hartzaileei eragotzi Lizentzia Publiko hau betetzea. 4. Atala - Datu-baseen Sui Generis Eskubideak. Eskubide Lizentziatuen barnean Datu-baseen Sui Generis Eskubideak sartzen badira, Material Lizentziatuekin egiten duzun erabilerari aplikatzen zaizkionak: zalantzarik gelditu ez dadin, 2(a)(1) Atalak eskubidea aitortzen dizu datu-basearen eduki guztiak edo edukien zati handi bat erauzteko, berrerabiltzeko, erreproduzitzeko eta Partekatzeko; datu-basearen eduki guztiak edo edukien zati handi bat gehitzen badizkiozu Zuk Sui Generis Eskubideak dituzun datu-base bati, Zuk Sui Generis Datu-base Eskubideak dituzun datu-base hori Egokitutako Materiala izango da (baina ez, ordea, eduki indibidualak); eta datu-basearen eduki guztiak edo edukien zati handi bat Partekatzeko, 3(a) Ataleko baldintzak bete behar dituzu. Zalantzarik gelditu ez dadin, 4 Atal honek osatu egiten ditu, eta ez ditu ordezten, Lizentzia Publiko honek ezartzen dizkizun obligazioak Eskubide Lizentziatuek barne hartzen badituzte beste Egile-eskubide eta Antzeko Eskubide batzuk. 5. Atala - Berme-ukatzea eta erantzukizun-mugatzea. Lizentzia-emaileak besterik agindu ezean, eta posible den neurrian, Lizentzia-emaileak Material Lizentziatua bere horretan eta eskuragarri dagoen moduan eskaintzen du, eta ez du inolako bermerik eskaintzen Material Lizentziatuari dagokionez, ez berariazkorik, ez inpliziturik, ez legezkorik, ez besterik. Hor sartzen dira, mugarik gabe, berme hauek: titulua, komertzializagarritasuna, xede jakin baterako egokitasuna, araurik ez-urratzea, akats latente edo bestelakorik ez izatea, doitasuna, edo erroreak izatea edo ez izatea, ezagunak edo hautemangarriak izan edo ez. Berme-ukatzeak, erabat edo neurri batean, debekatuta dauden kasuetan, ez zaizu ukatze hau aplikatuko. Posible den neurrian, Lizentzia-emaileari ezingo diozu erantzukizunik eskatu inolako oinarri juridiko (zabarkeria barne, besteak beste) edo bestelakotan funtsatuta, Lizentzia Publiko honen edo Material Lizentziatuaren erabileraren ondorioz sor litezkeen galera, kostu, gastu edo kalte zuzen, berezi, zeharkako, ezusteko, ondoriozko, zigorrezko eta ereduzkoengatik, ezta Lizentzia-emaileari halako galerak, kostuak, gastuak eta kalteak sor litezkeela ohartarazi bazaio ere. Erantzukizun-mugatzea, erabat edo neurri batean, debekatuta dagoen kasuetan, ez zaizu muga hau aplikatuko. Goian zehaztutako berme-ukatzea eta erantzukizun-mugatzea interpretatu behar dira, ahal den neurrian, era guztietako erantzukizunak erabat ukatzera gehien hurbiltzen den moduan. 6. Atala - Iraupena eta azkentzea. Lizentzia Publiko hau aplikatuko da hemen lizentziatzen diren Egile-eskubideek eta Antzeko Eskubideek irauten duten bitartean. Hala ere, Lizentzia Publiko honen baldintzak betetzen ez badituzu, Lizentzia Publiko honek aitortzen dizkizun eskubideak automatikoki azkenduko dira. Material Lizentziatua erabiltzeko duzun eskubidea azkenduz gero 6(a), Atalaren arabera, kasu hauetan lehengoratuko da: automatikoki, urraketa zuzentzen den egunean bertan, baldin eta urraketaz ohartu eta 30 egun baino lehenago zuzentzen baduzu; edo Lizentzia-emaileak eskubidea espresuki lehengoratzen badu. Zalantzarik gelditu ez dadin, 6(b) Atal honek ez die eragiten Lizentzia-emaileak, Lizentzia Publikoa urratzen baduzu, konponbidea eskatzeko izan ditzakeen eskubideei. Zalantzarik gelditu ez dadin, Lizentzia-emaileak Material Lizentziatua beste baldintza batzuetan ere eskain dezake, edo Material Lizentziatua banatzeari utz diezaioke edozein unetan; hala ere, hori egingo balu ere, ez da azkendutzat emango Lizentzia Publiko hau. 1 , 5 , 6 , 7 eta 8 Atalek indarrean jarraituko dute Lizentzia Publiko hau azkendutzat eman ondoren. 7. Atala - Beste baldintza batzuk. Lizentzia-emaileak ez du inolako loturarik Zuk ezarritako baldintza osagarri edo desberdinekin, espresuki adostu ezean. Material Lizentziatuaren inguruan egiten diren eta hemen aipatzen ez diren akordio, adostasun edo hitzarmenak independenteak dira eta ez dute loturarik Lizentzia Publiko honen baldintzekin. 8. Atala - Interpretazioa. Zalantzarik gelditu ez dadin, Lizentzia Publiko honek ez du murrizten, mugatzen, urritzen edo baldintzatzen Material Lizentziatua erabili ahal izatea legeak Lizentzia Publiko honen baimenik gabe ere onartzen duen edozein erabileratan, eta ez da horrela interpretatu behar. Posible den neurrian, Lizentzia Publiko honen edozein xedapen aplikaezintzat joz gero, automatikoki aldatu beharko litzateke, ahalik eta gutxien ukituta, aplikagarria izan dadin. Xedapena aldatu ezin bada, Lizentzia Publiko honetatik kendu egin beharko litzateke, gainerako baldintzen aplikagarritasunari eragin gabe. Lizentzia Publiko honen baldintzarik ez da baztertuko, eta ez-betetzerik ez da onartuko, Lizentzia-emaileak espresuki adostasuna eman ezean. Lizentzia Publiko honek ez du mugatzen edo ukatzen Lizentzia-emaileak edo Zuk duzuen pribilegiorik edo immunitaterik, edozein jurisdikzio edo autoritateren aurreko lege-prozesuetakoak barne, eta ez litzateke hala interpretatu behar. About Creative Commons Creative Commons ez da bere lizentzia publikoen alderdietako bat. Hala ere, Creative Commons-ek erabaki dezake bere Lizentzia Publikoetako bat aplikatzea berak argitaratutako materialari eta, kasu horretan, «Lizentzia-emaile» izango da. Creative Commons lizentzia publikoen testua jabari publikorako jarri da CC0 Jabari Publikoaren Eskaintzaren arabera . Ez baldin bada, bakar-bakarrik, materiala Creative Commons lizentzia publikoarekin partekatzen dela edo Creative Commons-ek creativecommons.org/policies webgunean argitaratutako politiketan onartutako beste edozein modutan partekatzen dela adierazteko, Creative Commons-ek ez du baimenik ematen «Creative Commons» marka erabiltzeko edo Creative Commons-en bestelako marka edo logotiporik erabiltzeko, aldez aurreko idatzizko baimenik gabe, barne hartuz, besteak beste, bere lizentzia publikoetan -edo material lizentziatua erabiltzeko bestelako edozein akordio, adostasun edo hitzarmenetan- baimenik gabeko aldaketak egiteko. Zalantzarik gelditu ez dadin, paragrafo hau ez da lizentzia publikoaren barnean sartzen. Creative Commons-ekin harremanetan jar daiteke creativecommons.org webgunean. Creative Commons is the nonprofit behind the open licenses and other legal tools that allow creators to share their work. Our legal tools are free to use. Learn more about our work Learn more about CC Licensing Support our work Use the license for your own material. Licenses List Public Domain List Creative Commons Contact Newsletter Privacy Policies Terms Contact Us Creative Commons PO Box 1866, Mountain View, CA 94042 info@creativecommons.org +1-415-429-6753 Instagram --> Bluesky Mastodon LinkedIn Subscribe to our Newsletter Support Our Work Our work relies on you! Help us keep the Internet free and open. Donate Now Except where otherwise noted , content on this site is licensed under a Creative Commons Attribution 4.0 International license . Icons by Font Awesome . | 2026-01-13T09:29:14 |
https://doc.rust-lang.org/std/default/trait.Default.html | Default in std::default - Rust This old browser is unsupported and will most likely display funky things. Default std 1.92.0 (ded5c06cf 2025-12-08) Default Sections Derivable enum s How can I implement Default ? Examples Required Methods default Dyn Compatibility Implementors In std:: default std :: default Trait Default Copy item path 1.0.0 (const: unstable ) · Source pub trait Default: Sized { // Required method fn default () -> Self; } Expand description A trait for giving a type a useful default value. Sometimes, you want to fall back to some kind of default value, and don’t particularly care what it is. This comes up often with struct s that define a set of options: struct SomeOptions { foo: i32, bar: f32, } How can we define some default values? You can use Default : #[derive(Default)] struct SomeOptions { foo: i32, bar: f32, } fn main() { let options: SomeOptions = Default::default(); } Now, you get all of the default values. Rust implements Default for various primitive types. If you want to override a particular option, but still retain the other defaults: fn main() { let options = SomeOptions { foo: 42 , ..Default::default() }; } § Derivable This trait can be used with #[derive] if all of the type’s fields implement Default . When derive d, it will use the default value for each field’s type. § enum s When using #[derive(Default)] on an enum , you need to choose which unit variant will be default. You do this by placing the #[default] attribute on the variant. #[derive(Default)] enum Kind { #[default] A, B, C, } You cannot use the #[default] attribute on non-unit or non-exhaustive variants. The #[default] attribute was stabilized in Rust 1.62.0. § How can I implement Default ? Provide an implementation for the default() method that returns the value of your type that should be the default: enum Kind { A, B, C, } impl Default for Kind { fn default() -> Self { Kind::A } } § Examples #[derive(Default)] struct SomeOptions { foo: i32, bar: f32, } Required Methods § 1.0.0 · Source fn default () -> Self Returns the “default value” for a type. Default values are often some kind of initial value, identity value, or anything else that may make sense as a default. § Examples Using built-in default values: let i: i8 = Default::default(); let (x, y): ( Option <String>, f64) = Default::default(); let (a, b, (c, d)): (i32, u32, (bool, bool)) = Default::default(); Making your own: enum Kind { A, B, C, } impl Default for Kind { fn default() -> Self { Kind::A } } Dyn Compatibility § This trait is not dyn compatible . In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe. Implementors § 1.0.0 (const: unstable ) · Source § impl Default for & str 1.10.0 · Source § impl Default for & CStr 1.9.0 · Source § impl Default for & OsStr 1.28.0 (const: unstable ) · Source § impl Default for &mut str 1.0.0 (const: unstable ) · Source § impl Default for AsciiChar 1.0.0 (const: unstable ) · Source § impl Default for bool 1.0.0 (const: unstable ) · Source § impl Default for char 1.0.0 (const: unstable ) · Source § impl Default for f16 1.0.0 (const: unstable ) · Source § impl Default for f32 1.0.0 (const: unstable ) · Source § impl Default for f64 1.0.0 (const: unstable ) · Source § impl Default for f128 1.0.0 (const: unstable ) · Source § impl Default for i8 1.0.0 (const: unstable ) · Source § impl Default for i16 1.0.0 (const: unstable ) · Source § impl Default for i32 1.0.0 (const: unstable ) · Source § impl Default for i64 1.0.0 (const: unstable ) · Source § impl Default for i128 1.0.0 (const: unstable ) · Source § impl Default for isize 1.0.0 (const: unstable ) · Source § impl Default for u8 1.0.0 (const: unstable ) · Source § impl Default for u16 1.0.0 (const: unstable ) · Source § impl Default for u32 1.0.0 (const: unstable ) · Source § impl Default for u64 1.0.0 (const: unstable ) · Source § impl Default for u128 1.0.0 (const: unstable ) · Source § impl Default for () 1.0.0 (const: unstable ) · Source § impl Default for usize Source § impl Default for Global 1.28.0 · Source § impl Default for System 1.17.0 · Source § impl Default for Box < str > 1.17.0 · Source § impl Default for Box < CStr > 1.17.0 · Source § impl Default for Box < OsStr > Source § impl Default for ByteString 1.10.0 · Source § impl Default for CString 1.9.0 · Source § impl Default for OsString 1.0.0 · Source § impl Default for Error Source § impl Default for FormattingOptions 1.75.0 · Source § impl Default for FileTimes 1.13.0 · Source § impl Default for DefaultHasher 1.7.0 · Source § impl Default for RandomState 1.0.0 · Source § impl Default for SipHasher 1.0.0 · Source § impl Default for std::io:: Empty 1.0.0 · Source § impl Default for Sink 1.33.0 · Source § impl Default for PhantomPinned 1.0.0 · Source § impl Default for RangeFull 1.17.0 · Source § impl Default for PathBuf 1.75.0 · Source § impl Default for ExitCode The default value is ExitCode::SUCCESS 1.73.0 · Source § impl Default for ExitStatus The default value is one which indicates successful completion. Source § impl Default for Alignment Returns Alignment::MIN , which is valid for any type. Source § impl Default for DefaultRandomSource 1.80.0 · Source § impl Default for Rc < str > 1.80.0 · Source § impl Default for Rc < CStr > 1.0.0 (const: unstable ) · Source § impl Default for String 1.0.0 · Source § impl Default for AtomicBool 1.34.0 · Source § impl Default for AtomicI8 1.34.0 · Source § impl Default for AtomicI16 1.34.0 · Source § impl Default for AtomicI32 1.34.0 · Source § impl Default for AtomicI64 1.0.0 · Source § impl Default for AtomicIsize 1.34.0 · Source § impl Default for AtomicU8 1.34.0 · Source § impl Default for AtomicU16 1.34.0 · Source § impl Default for AtomicU32 1.34.0 · Source § impl Default for AtomicU64 1.0.0 · Source § impl Default for AtomicUsize Source § impl Default for std::sync::nonpoison:: Condvar 1.80.0 · Source § impl Default for Arc < str > 1.80.0 · Source § impl Default for Arc < CStr > 1.10.0 · Source § impl Default for std::sync:: Condvar 1.3.0 · Source § impl Default for Duration Source § impl<'a> Default for &'a ByteStr Source § impl<'a> Default for &'a mut ByteStr Source § impl<'a> Default for PhantomContravariantLifetime <'a> Source § impl<'a> Default for PhantomCovariantLifetime <'a> Source § impl<'a> Default for PhantomInvariantLifetime <'a> 1.70.0 · Source § impl<'a, K, V> Default for std::collections::btree_map:: Iter <'a, K, V> where K: 'a, V: 'a, 1.70.0 · Source § impl<'a, K, V> Default for std::collections::btree_map:: IterMut <'a, K, V> where K: 'a, V: 'a, 1.70.0 · Source § impl<A, B> Default for Chain <A, B> where A: Default , B: Default , 1.11.0 · Source § impl<B> Default for Cow <'_, B> where B: ToOwned + ? Sized , <B as ToOwned >:: Owned : Default , 1.7.0 · Source § impl<H> Default for BuildHasherDefault <H> 1.70.0 · Source § impl<I> Default for Cloned <I> where I: Default , 1.70.0 · Source § impl<I> Default for Copied <I> where I: Default , 1.70.0 · Source § impl<I> Default for Enumerate <I> where I: Default , 1.70.0 · Source § impl<I> Default for Flatten <I> where I: Default + Iterator , <I as Iterator >:: Item : IntoIterator , 1.70.0 · Source § impl<I> Default for Fuse <I> where I: Default , 1.70.0 · Source § impl<I> Default for Rev <I> where I: Default , 1.0.0 · Source § impl<Idx> Default for std::ops:: Range <Idx> where Idx: Default , Source § impl<Idx> Default for std::range:: Range <Idx> where Idx: Default , 1.83.0 · Source § impl<K> Default for std::collections::hash_set:: IntoIter <K> 1.83.0 · Source § impl<K> Default for std::collections::hash_set:: Iter <'_, K> 1.70.0 · Source § impl<K, V> Default for std::collections::btree_map:: Keys <'_, K, V> 1.70.0 · Source § impl<K, V> Default for std::collections::btree_map:: Range <'_, K, V> 1.82.0 · Source § impl<K, V> Default for RangeMut <'_, K, V> 1.70.0 · Source § impl<K, V> Default for std::collections::btree_map:: Values <'_, K, V> 1.82.0 · Source § impl<K, V> Default for std::collections::btree_map:: ValuesMut <'_, K, V> 1.83.0 · Source § impl<K, V> Default for std::collections::hash_map:: IntoIter <K, V> 1.83.0 · Source § impl<K, V> Default for std::collections::hash_map:: IntoKeys <K, V> 1.83.0 · Source § impl<K, V> Default for std::collections::hash_map:: IntoValues <K, V> 1.83.0 · Source § impl<K, V> Default for std::collections::hash_map:: Iter <'_, K, V> 1.83.0 · Source § impl<K, V> Default for std::collections::hash_map:: IterMut <'_, K, V> 1.83.0 · Source § impl<K, V> Default for std::collections::hash_map:: Keys <'_, K, V> 1.83.0 · Source § impl<K, V> Default for std::collections::hash_map:: Values <'_, K, V> 1.83.0 · Source § impl<K, V> Default for std::collections::hash_map:: ValuesMut <'_, K, V> 1.0.0 · Source § impl<K, V> Default for BTreeMap <K, V> 1.70.0 · Source § impl<K, V, A> Default for std::collections::btree_map:: IntoIter <K, V, A> where A: Allocator + Default + Clone , 1.70.0 · Source § impl<K, V, A> Default for std::collections::btree_map:: IntoKeys <K, V, A> where A: Allocator + Default + Clone , 1.70.0 · Source § impl<K, V, A> Default for std::collections::btree_map:: IntoValues <K, V, A> where A: Allocator + Default + Clone , 1.0.0 · Source § impl<K, V, S> Default for HashMap <K, V, S> where S: Default , 1.0.0 (const: unstable ) · Source § impl<T> Default for & [T] 1.5.0 (const: unstable ) · Source § impl<T> Default for &mut [T] 1.0.0 (const: unstable ) · Source § impl<T> Default for Option <T> 1.4.0 · Source § impl<T> Default for [T; 0] 1.4.0 · Source § impl<T> Default for [T; 1] where T: Default , 1.4.0 · Source § impl<T> Default for [T; 2] where T: Default , 1.4.0 · Source § impl<T> Default for [T; 3] where T: Default , 1.4.0 · Source § impl<T> Default for [T; 4] where T: Default , 1.4.0 · Source § impl<T> Default for [T; 5] where T: Default , 1.4.0 · Source § impl<T> Default for [T; 6] where T: Default , 1.4.0 · Source § impl<T> Default for [T; 7] where T: Default , 1.4.0 · Source § impl<T> Default for [T; 8] where T: Default , 1.4.0 · Source § impl<T> Default for [T; 9] where T: Default , 1.4.0 · Source § impl<T> Default for [T; 10] where T: Default , 1.4.0 · Source § impl<T> Default for [T; 11] where T: Default , 1.4.0 · Source § impl<T> Default for [T; 12] where T: Default , 1.4.0 · Source § impl<T> Default for [T; 13] where T: Default , 1.4.0 · Source § impl<T> Default for [T; 14] where T: Default , 1.4.0 · Source § impl<T> Default for [T; 15] where T: Default , 1.4.0 · Source § impl<T> Default for [T; 16] where T: Default , 1.4.0 · Source § impl<T> Default for [T; 17] where T: Default , 1.4.0 · Source § impl<T> Default for [T; 18] where T: Default , 1.4.0 · Source § impl<T> Default for [T; 19] where T: Default , 1.4.0 · Source § impl<T> Default for [T; 20] where T: Default , 1.4.0 · Source § impl<T> Default for [T; 21] where T: Default , 1.4.0 · Source § impl<T> Default for [T; 22] where T: Default , 1.4.0 · Source § impl<T> Default for [T; 23] where T: Default , 1.4.0 · Source § impl<T> Default for [T; 24] where T: Default , 1.4.0 · Source § impl<T> Default for [T; 25] where T: Default , 1.4.0 · Source § impl<T> Default for [T; 26] where T: Default , 1.4.0 · Source § impl<T> Default for [T; 27] where T: Default , 1.4.0 · Source § impl<T> Default for [T; 28] where T: Default , 1.4.0 · Source § impl<T> Default for [T; 29] where T: Default , 1.4.0 · Source § impl<T> Default for [T; 30] where T: Default , 1.4.0 · Source § impl<T> Default for [T; 31] where T: Default , 1.4.0 · Source § impl<T> Default for [T; 32] where T: Default , 1.88.0 · Source § impl<T> Default for *const T where T: Thin + ? Sized , 1.88.0 · Source § impl<T> Default for *mut T where T: Thin + ? Sized , 1.0.0 · Source § impl<T> Default for (T₁, T₂, …, Tₙ) where T: Default , This trait is implemented for tuples up to twelve items long. 1.0.0 · Source § impl<T> Default for Box < [T] > 1.0.0 · Source § impl<T> Default for Box <T> where T: Default , 1.0.0 (const: unstable ) · Source § impl<T> Default for Cell <T> where T: Default , 1.80.0 · Source § impl<T> Default for LazyCell <T> where T: Default , 1.70.0 · Source § impl<T> Default for OnceCell <T> 1.0.0 (const: unstable ) · Source § impl<T> Default for RefCell <T> where T: Default , Source § impl<T> Default for SyncUnsafeCell <T> where T: Default , 1.10.0 (const: unstable ) · Source § impl<T> Default for UnsafeCell <T> where T: Default , 1.19.0 (const: unstable ) · Source § impl<T> Default for Reverse <T> where T: Default , 1.70.0 · Source § impl<T> Default for std::collections::binary_heap:: IntoIter <T> 1.82.0 · Source § impl<T> Default for std::collections::binary_heap:: Iter <'_, T> 1.70.0 · Source § impl<T> Default for std::collections::btree_set:: Iter <'_, T> 1.70.0 · Source § impl<T> Default for std::collections::btree_set:: Range <'_, T> 1.70.0 · Source § impl<T> Default for std::collections::linked_list:: IntoIter <T> 1.70.0 · Source § impl<T> Default for std::collections::linked_list:: Iter <'_, T> 1.70.0 · Source § impl<T> Default for std::collections::linked_list:: IterMut <'_, T> 1.0.0 · Source § impl<T> Default for BTreeSet <T> 1.0.0 · Source § impl<T> Default for BinaryHeap <T> where T: Ord , 1.0.0 · Source § impl<T> Default for LinkedList <T> 1.0.0 · Source § impl<T> Default for VecDeque <T> 1.82.0 · Source § impl<T> Default for std::collections::vec_deque:: Iter <'_, T> 1.82.0 · Source § impl<T> Default for std::collections::vec_deque:: IterMut <'_, T> 1.2.0 (const: unstable ) · Source § impl<T> Default for std::iter:: Empty <T> Source § impl<T> Default for PhantomContravariant <T> where T: ? Sized , Source § impl<T> Default for PhantomCovariant <T> where T: ? Sized , 1.0.0 (const: unstable ) · Source § impl<T> Default for PhantomData <T> where T: ? Sized , Source § impl<T> Default for PhantomInvariant <T> where T: ? Sized , 1.20.0 · Source § impl<T> Default for ManuallyDrop <T> where T: Default + ? Sized , 1.74.0 · Source § impl<T> Default for Saturating <T> where T: Default , 1.0.0 · Source § impl<T> Default for Wrapping <T> where T: Default , 1.62.0 · Source § impl<T> Default for AssertUnwindSafe <T> where T: Default , 1.91.0 · Source § impl<T> Default for Pin < Box <T>> where Box <T>: Default , T: ? Sized , 1.91.0 · Source § impl<T> Default for Pin < Rc <T>> where Rc <T>: Default , T: ? Sized , 1.91.0 · Source § impl<T> Default for Pin < Arc <T>> where Arc <T>: Default , T: ? Sized , Source § impl<T> Default for UnsafePinned <T> where T: Default , 1.80.0 · Source § impl<T> Default for Rc < [T] > 1.0.0 · Source § impl<T> Default for Rc <T> where T: Default , 1.10.0 · Source § impl<T> Default for std::rc:: Weak <T> 1.70.0 · Source § impl<T> Default for std::slice:: Iter <'_, T> 1.70.0 · Source § impl<T> Default for std::slice:: IterMut <'_, T> 1.0.0 · Source § impl<T> Default for AtomicPtr <T> 1.80.0 · Source § impl<T> Default for Arc < [T] > 1.0.0 · Source § impl<T> Default for Arc <T> where T: Default , Source § impl<T> Default for Exclusive <T> where T: Default + ? Sized , 1.70.0 · Source § impl<T> Default for OnceLock <T> 1.10.0 · Source § impl<T> Default for std::sync:: Weak <T> 1.0.0 (const: unstable ) · Source § impl<T> Default for Vec <T> 1.70.0 · Source § impl<T, A> Default for std::collections::btree_set:: IntoIter <T, A> where A: Allocator + Default + Clone , 1.70.0 · Source § impl<T, A> Default for std::vec:: IntoIter <T, A> where A: Allocator + Default , 1.0.0 · Source § impl<T, S> Default for HashSet <T, S> where S: Default , 1.89.0 · Source § impl<T, const N: usize > Default for std::array:: IntoIter <T, N> Source § impl<T, const N: usize > Default for Mask <T, N> where T: MaskElement , LaneCount <N>: SupportedLaneCount , Source § impl<T, const N: usize > Default for Simd <T, N> where LaneCount <N>: SupportedLaneCount , T: SimdElement + Default , 1.0.0 · Source § impl<T: Default > Default for Cursor <T> Source § impl<T: Default > Default for std::sync::nonpoison:: RwLock <T> 1.80.0 · Source § impl<T: Default > Default for LazyLock <T> Source § impl<T: Default > Default for ReentrantLock <T> 1.10.0 · Source § impl<T: Default > Default for std::sync:: RwLock <T> Source § impl<T: ? Sized + Default > Default for std::sync::nonpoison:: Mutex <T> 1.10.0 · Source § impl<T: ? Sized + Default > Default for std::sync:: Mutex <T> | 2026-01-13T09:29:14 |
https://docs.rs/linked-hash-map/0.4.2/linked_hash_map/struct.LinkedHashMap.html | linked_hash_map::LinkedHashMap - Rust Docs.rs linked-hash-map-0.4.2 linked-hash-map 0.4.2 Docs.rs crate page MIT / Apache-2.0 Links Homepage Documentation Repository crates.io Source Owners github:contain-rs:owners pczarn Gankra Dependencies serde_test ^0.9 normal serde ^0.9 normal clippy 0.* normal heapsize ^0.3.9 normal Versions Go to latest version Platform i686-apple-darwin i686-pc-windows-gnu i686-unknown-linux-gnu x86_64-apple-darwin x86_64-pc-windows-gnu x86_64-unknown-linux-gnu Feature flags docs.rs About docs.rs Badges Builds Metadata Shorthand URLs Download Rustdoc JSON Build queue Privacy policy Rust Rust website The Book Standard Library API Reference Rust by Example The Cargo Guide Clippy Documentation This old browser is unsupported and will most likely display funky things. Struct LinkedHashMap Methods Trait Implementations linked_hash_map Struct linked_hash_map :: LinkedHashMap [ − ] [src] pub struct LinkedHashMap<K, V, S = RandomState > { /* fields omitted */ } A linked hash map. Methods impl<K: Hash + Eq , V> LinkedHashMap <K, V> [src] fn new () -> Self Creates a linked hash map. fn with_capacity (capacity: usize ) -> Self Creates an empty linked hash map with the given initial capacity. impl<K: Hash + Eq , V, S: BuildHasher > LinkedHashMap <K, V, S> [src] fn with_hasher (hash_builder: S) -> Self Creates an empty linked hash map with the given initial hash builder. fn with_capacity_and_hasher (capacity: usize , hash_builder: S) -> Self Creates an empty linked hash map with the given initial capacity and hash builder. fn reserve (&mut self, additional: usize ) Reserves capacity for at least additional more elements to be inserted into the map. The map may reserve more space to avoid frequent allocations. Panics Panics if the new allocation size overflows usize. fn shrink_to_fit (&mut self) Shrinks the capacity of the map as much as possible. It will drop down as much as possible while maintaining the internal rules and possibly leaving some space in accordance with the resize policy. fn entry (&mut self, k: K) -> Entry <K, V, S> Gets the given key's corresponding entry in the map for in-place manipulation. Examples use linked_hash_map :: LinkedHashMap ; let mut letters = LinkedHashMap :: new (); for ch in "a short treatise on fungi" . chars () { let counter = letters . entry ( ch ). or_insert ( 0 ); * counter += 1 ; } assert_eq ! ( letters [ & 's' ], 2 ); assert_eq ! ( letters [ & 't' ], 3 ); assert_eq ! ( letters [ & 'u' ], 1 ); assert_eq ! ( letters . get ( & 'y' ), None ); fn entries (&mut self) -> Entries <K, V, S> Returns an iterator visiting all entries in insertion order. Iterator element type is OccupiedEntry<K, V, S> . Allows for removal as well as replacing the entry. Examples use linked_hash_map :: LinkedHashMap ; let mut map = LinkedHashMap :: new (); map . insert ( "a" , 10 ); map . insert ( "c" , 30 ); map . insert ( "b" , 20 ); { let mut iter = map . entries (); let mut entry = iter . next (). unwrap (); assert_eq ! ( & "a" , entry . key ()); * entry . get_mut () = 17 ; } assert_eq ! ( & 17 , map . get ( & "a" ). unwrap ()); fn insert (&mut self, k: K, v: V) -> Option <V> Inserts a key-value pair into the map. If the key already existed, the old value is returned. Examples use linked_hash_map :: LinkedHashMap ; let mut map = LinkedHashMap :: new (); map . insert ( 1 , "a" ); map . insert ( 2 , "b" ); assert_eq ! ( map [ & 1 ], "a" ); assert_eq ! ( map [ & 2 ], "b" ); fn contains_key <Q: ? Sized >(&self, k: &Q) -> bool where K: Borrow <Q>, Q: Eq + Hash , Checks if the map contains the given key. fn get <Q: ? Sized >(&self, k: &Q) -> Option <&V> where K: Borrow <Q>, Q: Eq + Hash , Returns the value corresponding to the key in the map. Examples use linked_hash_map :: LinkedHashMap ; let mut map = LinkedHashMap :: new (); map . insert ( 1 , "a" ); map . insert ( 2 , "b" ); map . insert ( 2 , "c" ); map . insert ( 3 , "d" ); assert_eq ! ( map . get ( & 1 ), Some ( & "a" )); assert_eq ! ( map . get ( & 2 ), Some ( & "c" )); fn get_mut <Q: ? Sized >(&mut self, k: &Q) -> Option <&mut V> where K: Borrow <Q>, Q: Eq + Hash , Returns the mutable reference corresponding to the key in the map. Examples use linked_hash_map :: LinkedHashMap ; let mut map = LinkedHashMap :: new (); map . insert ( 1 , "a" ); map . insert ( 2 , "b" ); * map . get_mut ( & 1 ). unwrap () = "c" ; assert_eq ! ( map . get ( & 1 ), Some ( & "c" )); fn get_refresh <Q: ? Sized >(&mut self, k: &Q) -> Option <&mut V> where K: Borrow <Q>, Q: Eq + Hash , Returns the value corresponding to the key in the map. If value is found, it is moved to the end of the list. This operation can be used in implemenation of LRU cache. Examples use linked_hash_map :: LinkedHashMap ; let mut map = LinkedHashMap :: new (); map . insert ( 1 , "a" ); map . insert ( 2 , "b" ); map . insert ( 3 , "d" ); assert_eq ! ( map . get_refresh ( & 2 ), Some ( & mut "b" )); assert_eq ! (( & 2 , & "b" ), map . iter (). rev (). next (). unwrap ()); fn remove <Q: ? Sized >(&mut self, k: &Q) -> Option <V> where K: Borrow <Q>, Q: Eq + Hash , Removes and returns the value corresponding to the key from the map. Examples use linked_hash_map :: LinkedHashMap ; let mut map = LinkedHashMap :: new (); map . insert ( 2 , "a" ); assert_eq ! ( map . remove ( & 1 ), None ); assert_eq ! ( map . remove ( & 2 ), Some ( "a" )); assert_eq ! ( map . remove ( & 2 ), None ); assert_eq ! ( map . len (), 0 ); fn capacity (&self) -> usize Returns the maximum number of key-value pairs the map can hold without reallocating. Examples use linked_hash_map :: LinkedHashMap ; let mut map : LinkedHashMap < i32 , & str > = LinkedHashMap :: new (); let capacity = map . capacity (); fn pop_front (&mut self) -> Option < ( K, V ) > Removes the first entry. Can be used in implementation of LRU cache. Examples use linked_hash_map :: LinkedHashMap ; let mut map = LinkedHashMap :: new (); map . insert ( 1 , 10 ); map . insert ( 2 , 20 ); map . pop_front (); assert_eq ! ( map . get ( & 1 ), None ); assert_eq ! ( map . get ( & 2 ), Some ( & 20 )); fn front (&self) -> Option < ( &K, &V ) > Gets the first entry. Examples use linked_hash_map :: LinkedHashMap ; let mut map = LinkedHashMap :: new (); map . insert ( 1 , 10 ); map . insert ( 2 , 20 ); assert_eq ! ( map . front (), Some (( & 1 , & 10 ))); fn pop_back (&mut self) -> Option < ( K, V ) > Removes the last entry. Examples use linked_hash_map :: LinkedHashMap ; let mut map = LinkedHashMap :: new (); map . insert ( 1 , 10 ); map . insert ( 2 , 20 ); map . pop_back (); assert_eq ! ( map . get ( & 1 ), Some ( & 10 )); assert_eq ! ( map . get ( & 2 ), None ); fn back (&mut self) -> Option < ( &K, &V ) > Gets the last entry. Examples use linked_hash_map :: LinkedHashMap ; let mut map = LinkedHashMap :: new (); map . insert ( 1 , 10 ); map . insert ( 2 , 20 ); assert_eq ! ( map . back (), Some (( & 2 , & 20 ))); fn len (&self) -> usize Returns the number of key-value pairs in the map. fn is_empty (&self) -> bool Returns whether the map is currently empty. fn hasher (&self) -> &S Returns a reference to the map's hasher. fn clear (&mut self) Clears the map of all key-value pairs. fn iter (&self) -> Iter <K, V> Returns a double-ended iterator visiting all key-value pairs in order of insertion. Iterator element type is (&'a K, &'a V) Examples use linked_hash_map :: LinkedHashMap ; let mut map = LinkedHashMap :: new (); map . insert ( "a" , 10 ); map . insert ( "c" , 30 ); map . insert ( "b" , 20 ); let mut iter = map . iter (); assert_eq ! (( & "a" , & 10 ), iter . next (). unwrap ()); assert_eq ! (( & "c" , & 30 ), iter . next (). unwrap ()); assert_eq ! (( & "b" , & 20 ), iter . next (). unwrap ()); assert_eq ! ( None , iter . next ()); fn iter_mut (&mut self) -> IterMut <K, V> Returns a double-ended iterator visiting all key-value pairs in order of insertion. Iterator element type is (&'a K, &'a mut V) Examples use linked_hash_map :: LinkedHashMap ; let mut map = LinkedHashMap :: new (); map . insert ( "a" , 10 ); map . insert ( "c" , 30 ); map . insert ( "b" , 20 ); { let mut iter = map . iter_mut (); let mut entry = iter . next (). unwrap (); assert_eq ! ( & "a" , entry . 0 ); * entry . 1 = 17 ; } assert_eq ! ( & 17 , map . get ( & "a" ). unwrap ()); fn keys (&self) -> Keys <K, V> Returns a double-ended iterator visiting all key in order of insertion. Examples use linked_hash_map :: LinkedHashMap ; let mut map = LinkedHashMap :: new (); map . insert ( 'a' , 10 ); map . insert ( 'c' , 30 ); map . insert ( 'b' , 20 ); let mut keys = map . keys (); assert_eq ! ( & 'a' , keys . next (). unwrap ()); assert_eq ! ( & 'c' , keys . next (). unwrap ()); assert_eq ! ( & 'b' , keys . next (). unwrap ()); assert_eq ! ( None , keys . next ()); fn values (&self) -> Values <K, V> Returns a double-ended iterator visiting all values in order of insertion. Examples use linked_hash_map :: LinkedHashMap ; let mut map = LinkedHashMap :: new (); map . insert ( 'a' , 10 ); map . insert ( 'c' , 30 ); map . insert ( 'b' , 20 ); let mut values = map . values (); assert_eq ! ( & 10 , values . next (). unwrap ()); assert_eq ! ( & 30 , values . next (). unwrap ()); assert_eq ! ( & 20 , values . next (). unwrap ()); assert_eq ! ( None , values . next ()); Trait Implementations impl<'a, K, V, S, Q: ? Sized > Index <&'a Q> for LinkedHashMap <K, V, S> where K: Hash + Eq + Borrow <Q>, S: BuildHasher , Q: Eq + Hash , [src] type Output = V The returned type after indexing fn index (&self, index: &'a Q) -> &V The method for the indexing ( container[index] ) operation impl<'a, K, V, S, Q: ? Sized > IndexMut <&'a Q> for LinkedHashMap <K, V, S> where K: Hash + Eq + Borrow <Q>, S: BuildHasher , Q: Eq + Hash , [src] fn index_mut (&mut self, index: &'a Q) -> &mut V The method for the mutable indexing ( container[index] ) operation impl<K: Hash + Eq + Clone , V: Clone , S: BuildHasher + Clone > Clone for LinkedHashMap <K, V, S> [src] fn clone (&self) -> Self Returns a copy of the value. Read more fn clone_from (&mut self, source: &Self) 1.0.0 Performs copy-assignment from source . Read more impl<K: Hash + Eq , V, S: BuildHasher + Default > Default for LinkedHashMap <K, V, S> [src] fn default () -> Self Returns the "default value" for a type. Read more impl<K: Hash + Eq , V, S: BuildHasher > Extend < ( K, V ) > for LinkedHashMap <K, V, S> [src] fn extend <I: IntoIterator <Item = ( K, V ) >>(&mut self, iter: I) Extends a collection with the contents of an iterator. Read more impl<'a, K, V, S> Extend < ( &'a K, &'a V ) > for LinkedHashMap <K, V, S> where K: 'a + Hash + Eq + Copy , V: 'a + Copy , S: BuildHasher , [src] fn extend <I: IntoIterator <Item = ( &'a K, &'a V ) >>(&mut self, iter: I) Extends a collection with the contents of an iterator. Read more impl<K: Hash + Eq , V, S: BuildHasher + Default > FromIterator < ( K, V ) > for LinkedHashMap <K, V, S> [src] fn from_iter <I: IntoIterator <Item = ( K, V ) >>(iter: I) -> Self Creates a value from an iterator. Read more impl<A: Debug + Hash + Eq , B: Debug , S: BuildHasher > Debug for LinkedHashMap <A, B, S> [src] fn fmt (&self, f: &mut Formatter ) -> Result Returns a string that lists the key-value pairs in insertion order. impl<K: Hash + Eq , V: PartialEq , S: BuildHasher > PartialEq for LinkedHashMap <K, V, S> [src] fn eq (&self, other: &Self) -> bool This method tests for self and other values to be equal, and is used by == . Read more fn ne (&self, other: &Rhs) -> bool 1.0.0 This method tests for != . impl<K: Hash + Eq , V: Eq , S: BuildHasher > Eq for LinkedHashMap <K, V, S> [src] impl<K: Hash + Eq + PartialOrd , V: PartialOrd , S: BuildHasher > PartialOrd for LinkedHashMap <K, V, S> [src] fn partial_cmp (&self, other: &Self) -> Option < Ordering > This method returns an ordering between self and other values if one exists. Read more fn lt (&self, other: &Self) -> bool This method tests less than (for self and other ) and is used by the < operator. Read more fn le (&self, other: &Self) -> bool This method tests less than or equal to (for self and other ) and is used by the <= operator. Read more fn ge (&self, other: &Self) -> bool This method tests greater than or equal to (for self and other ) and is used by the >= operator. Read more fn gt (&self, other: &Self) -> bool This method tests greater than (for self and other ) and is used by the > operator. Read more impl<K: Hash + Eq + Ord , V: Ord , S: BuildHasher > Ord for LinkedHashMap <K, V, S> [src] fn cmp (&self, other: &Self) -> Ordering This method returns an Ordering between self and other . Read more impl<K: Hash + Eq , V: Hash , S: BuildHasher > Hash for LinkedHashMap <K, V, S> [src] fn hash <H: Hasher >(&self, h: &mut H) Feeds this value into the given [ Hasher ]. Read more fn hash_slice <H>(data: &[Self] , state: &mut H) where H: Hasher , 1.3.0 Feeds a slice of this type into the given [ Hasher ]. Read more impl<K: Send , V: Send , S: Send > Send for LinkedHashMap <K, V, S> [src] impl<K: Sync , V: Sync , S: Sync > Sync for LinkedHashMap <K, V, S> [src] impl<K, V, S> Drop for LinkedHashMap <K, V, S> [src] fn drop (&mut self) A method called when the value goes out of scope. Read more impl<'a, K: Hash + Eq , V, S: BuildHasher > IntoIterator for &'a LinkedHashMap <K, V, S> [src] type Item = ( &'a K, &'a V ) The type of the elements being iterated over. type IntoIter = Iter <'a, K, V> Which kind of iterator are we turning this into? fn into_iter (self) -> Iter <'a, K, V> Creates an iterator from a value. Read more impl<'a, K: Hash + Eq , V, S: BuildHasher > IntoIterator for &'a mut LinkedHashMap <K, V, S> [src] type Item = ( &'a K, &'a mut V ) The type of the elements being iterated over. type IntoIter = IterMut <'a, K, V> Which kind of iterator are we turning this into? fn into_iter (self) -> IterMut <'a, K, V> Creates an iterator from a value. Read more impl<K: Hash + Eq , V, S: BuildHasher > IntoIterator for LinkedHashMap <K, V, S> [src] type Item = ( K, V ) The type of the elements being iterated over. type IntoIter = IntoIter <K, V> Which kind of iterator are we turning this into? fn into_iter (self) -> IntoIter <K, V> Creates an iterator from a value. Read more Help Keyboard Shortcuts ? Show this help dialog S Focus the search field ⇤ Move up in search results ⇥ Move down in search results ⏎ Go to active search result + Collapse/expand all sections Search Tricks Prefix searches with a type followed by a colon (e.g. fn: ) to restrict the search to a given type. Accepted types are: fn , mod , struct , enum , trait , type , macro , and const . Search functions by type signature (e.g. vec -> usize or * -> vec ) | 2026-01-13T09:29:14 |
https://doc.rust-lang.org/stable/std/f64/index.html | std::f64 - Rust This old browser is unsupported and will most likely display funky things. Module f64 std 1.92.0 (ded5c06cf 2025-12-08) Module f64 Module Items Modules Constants In crate std std Module f64 Copy item path 1.0.0 · Source Expand description Constants for the f64 double-precision floating point type. See also the f64 primitive type . Mathematically significant numbers are provided in the consts sub-module. For the constants defined directly in this module (as distinct from those defined in the consts sub-module), new code should instead use the associated constants defined directly on the f64 type. Modules § consts Basic mathematical constants. Constants § DIGITS Deprecation planned Approximate number of significant digits in base 10. Use f64::DIGITS instead. EPSILON Deprecation planned Machine epsilon value for f64 . Use f64::EPSILON instead. INFINITY Deprecation planned Infinity (∞). Use f64::INFINITY instead. MANTISSA_ DIGITS Deprecation planned Number of significant digits in base 2. Use f64::MANTISSA_DIGITS instead. MAX Deprecation planned Largest finite f64 value. Use f64::MAX instead. MAX_ 10_ EXP Deprecation planned Maximum possible power of 10 exponent. Use f64::MAX_10_EXP instead. MAX_EXP Deprecation planned Maximum possible power of 2 exponent. Use f64::MAX_EXP instead. MIN Deprecation planned Smallest finite f64 value. Use f64::MIN instead. MIN_ 10_ EXP Deprecation planned Minimum possible normal power of 10 exponent. Use f64::MIN_10_EXP instead. MIN_EXP Deprecation planned One greater than the minimum possible normal power of 2 exponent. Use f64::MIN_EXP instead. MIN_ POSITIVE Deprecation planned Smallest positive normal f64 value. Use f64::MIN_POSITIVE instead. NAN Deprecation planned Not a Number (NaN). Use f64::NAN instead. NEG_ INFINITY Deprecation planned Negative infinity (−∞). Use f64::NEG_INFINITY instead. RADIX Deprecation planned The radix or base of the internal representation of f64 . Use f64::RADIX instead. | 2026-01-13T09:29:14 |
https://id-id.facebook.com/login/?next=https%3A%2F%2Fl.facebook.com%2Fl.php%3Fu%3Dhttps%253A%252F%252Fwww.instagram.com%252F%26amp%253Bh%3DAT2n2ad5edoxiZfbpoMEkNGCapqvjk3Zha8c1DS-IfhWMQRD-QXdRlQEcCYCl1RRAYHR0Mx37s1OKzcyqjS_88yFX-L67y4s2hGhnwpT3j1OIUkQ_EplDVcwoVuogpB-iRktRQbugSbxt_WX | Facebook Facebook Email atau telepon Kata Sandi Lupa akun? Buat Akun Baru Anda Diblokir Sementara Anda Diblokir Sementara Sepertinya Anda menyalahgunakan fitur ini dengan menggunakannya terlalu cepat. Anda dilarang menggunakan fitur ini untuk sementara. Back Bahasa Indonesia 한국어 English (US) Tiếng Việt ภาษาไทย Español 中文(简体) 日本語 Português (Brasil) Français (France) Deutsch Daftar Masuk Messenger Facebook Lite Video Meta Pay Meta Store Meta Quest Ray-Ban Meta Meta AI Konten Meta AI lainnya Instagram Threads Pusat Informasi Pemilu Kebijakan Privasi Pusat Privasi Tentang Buat Iklan Buat Halaman Developer Karier Cookie Pilihan Iklan Ketentuan Bantuan Pengunggahan Kontak & Non-Pengguna Pengaturan Log aktivitas Meta © 2026 | 2026-01-13T09:29:14 |
https://doc.rust-lang.org/reference/expressions.html#grammar-Expression | Expressions - The Rust Reference Keyboard shortcuts Press ← or → to navigate between chapters Press S or / to search in the book Press ? to show this help Press Esc to hide this help Auto Light Rust Coal Navy Ayu The Rust Reference [expr] Expressions [expr .syntax] Syntax Expression → ExpressionWithoutBlock | ExpressionWithBlock ExpressionWithoutBlock → OuterAttribute * ( LiteralExpression | PathExpression | OperatorExpression | GroupedExpression | ArrayExpression | AwaitExpression | IndexExpression | TupleExpression | TupleIndexingExpression | StructExpression | CallExpression | MethodCallExpression | FieldExpression | ClosureExpression | AsyncBlockExpression | ContinueExpression | BreakExpression | RangeExpression | ReturnExpression | UnderscoreExpression | MacroInvocation ) ExpressionWithBlock → OuterAttribute * ( BlockExpression | ConstBlockExpression | UnsafeBlockExpression | LoopExpression | IfExpression | MatchExpression ) Show Railroad Expression ExpressionWithoutBlock ExpressionWithBlock ExpressionWithoutBlock OuterAttribute LiteralExpression PathExpression OperatorExpression GroupedExpression ArrayExpression AwaitExpression IndexExpression TupleExpression TupleIndexingExpression StructExpression CallExpression MethodCallExpression FieldExpression ClosureExpression AsyncBlockExpression ContinueExpression BreakExpression RangeExpression ReturnExpression UnderscoreExpression MacroInvocation ExpressionWithBlock OuterAttribute BlockExpression ConstBlockExpression UnsafeBlockExpression LoopExpression IfExpression MatchExpression [expr .intro] An expression may have two roles: it always produces a value , and it may have effects (otherwise known as “side effects”). [expr .evaluation] An expression evaluates to a value, and has effects during evaluation . [expr .operands] Many expressions contain sub-expressions, called the operands of the expression. [expr .behavior] The meaning of each kind of expression dictates several things: Whether or not to evaluate the operands when evaluating the expression The order in which to evaluate the operands How to combine the operands’ values to obtain the value of the expression [expr .structure] In this way, the structure of expressions dictates the structure of execution. Blocks are just another kind of expression, so blocks, statements, expressions, and blocks again can recursively nest inside each other to an arbitrary depth. Note We give names to the operands of expressions so that we may discuss them, but these names are not stable and may be changed. [expr .precedence] Expression precedence The precedence of Rust operators and expressions is ordered as follows, going from strong to weak. Binary Operators at the same precedence level are grouped in the order given by their associativity. Operator/Expression Associativity Paths Method calls Field expressions left to right Function calls , array indexing ? Unary - ! * borrow as left to right * / % left to right + - left to right << >> left to right & left to right ^ left to right | left to right == != < > <= >= Require parentheses && left to right || left to right .. ..= Require parentheses = += -= *= /= %= &= |= ^= <<= >>= right to left return break closures [expr .operand-order] Evaluation order of operands [expr .operand-order .default] The following list of expressions all evaluate their operands the same way, as described after the list. Other expressions either don’t take operands or evaluate them conditionally as described on their respective pages. Dereference expression Error propagation expression Negation expression Arithmetic and logical binary operators Comparison operators Type cast expression Grouped expression Array expression Await expression Index expression Tuple expression Tuple index expression Struct expression Call expression Method call expression Field expression Break expression Range expression Return expression [expr .operand-order .operands-before-primary] The operands of these expressions are evaluated prior to applying the effects of the expression. Expressions taking multiple operands are evaluated left to right as written in the source code. Note Which subexpressions are the operands of an expression is determined by expression precedence as per the previous section. For example, the two next method calls will always be called in the same order: #![allow(unused)] fn main() { // Using vec instead of array to avoid references // since there is no stable owned array iterator // at the time this example was written. let mut one_two = vec![1, 2].into_iter(); assert_eq!( (1, 2), (one_two.next().unwrap(), one_two.next().unwrap()) ); } Note Since this is applied recursively, these expressions are also evaluated from innermost to outermost, ignoring siblings until there are no inner subexpressions. [expr .place-value] Place expressions and value expressions [expr .place-value .intro] Expressions are divided into two main categories: place expressions and value expressions; there is also a third, minor category of expressions called assignee expressions. Within each expression, operands may likewise occur in either place context or value context. The evaluation of an expression depends both on its own category and the context it occurs within. [expr .place-value .place-memory-location] A place expression is an expression that represents a memory location. [expr .place-value .place-expr-kinds] These expressions are paths which refer to local variables, static variables , dereferences ( *expr ), array indexing expressions ( expr[expr] ), field references ( expr.f ) and parenthesized place expressions. [expr .place-value .value-expr-kinds] All other expressions are value expressions. [expr .place-value .value-result] A value expression is an expression that represents an actual value. [expr .place-value .place-context] The following contexts are place expression contexts: The left operand of a compound assignment expression. The operand of a unary borrow , raw borrow or dereference operator. The operand of a field expression. The indexed operand of an array indexing expression. The operand of any implicit borrow . The initializer of a let statement . The scrutinee of an if let , match , or while let expression. The base of a functional update struct expression. Note Historically, place expressions were called lvalues and value expressions were called rvalues . [expr .place-value .assignee] An assignee expression is an expression that appears in the left operand of an assignment expression. Explicitly, the assignee expressions are: Place expressions. Underscores . Tuples of assignee expressions. Slices of assignee expressions. Tuple structs of assignee expressions. Structs of assignee expressions (with optionally named fields). Unit structs [expr .place-value .parenthesis] Arbitrary parenthesisation is permitted inside assignee expressions. [expr .move] Moved and copied types [expr .move .intro] When a place expression is evaluated in a value expression context, or is bound by value in a pattern, it denotes the value held in that memory location. [expr .move .copy] If the type of that value implements Copy , then the value will be copied. [expr .move .requires-sized] In the remaining situations, if that type is Sized , then it may be possible to move the value. [expr .move .movable-place] Only the following place expressions may be moved out of: Variables which are not currently borrowed. Temporary values . Fields of a place expression which can be moved out of and don’t implement Drop . The result of dereferencing an expression with type Box<T> and that can also be moved out of. [expr .move .deinitialization] After moving out of a place expression that evaluates to a local variable, the location is deinitialized and cannot be read from again until it is reinitialized. [expr .move .place-invalid] In all other cases, trying to use a place expression in a value expression context is an error. [expr .mut] Mutability [expr .mut .intro] For a place expression to be assigned to, mutably borrowed , implicitly mutably borrowed , or bound to a pattern containing ref mut , it must be mutable . We call these mutable place expressions . In contrast, other place expressions are called immutable place expressions . [expr .mut .valid-places] The following expressions can be mutable place expression contexts: Mutable variables which are not currently borrowed. Mutable static items . Temporary values . Fields : this evaluates the subexpression in a mutable place expression context. Dereferences of a *mut T pointer. Dereference of a variable, or field of a variable, with type &mut T . Note: This is an exception to the requirement of the next rule. Dereferences of a type that implements DerefMut : this then requires that the value being dereferenced is evaluated in a mutable place expression context. Array indexing of a type that implements IndexMut : this then evaluates the value being indexed, but not the index, in mutable place expression context. [expr .temporary] Temporaries When using a value expression in most place expression contexts, a temporary unnamed memory location is created and initialized to that value. The expression evaluates to that location instead, except if promoted to a static . The drop scope of the temporary is usually the end of the enclosing statement. [expr .super-macros] Super macros [expr .super-macros .intro] Certain built-in macros may create temporaries whose scopes may be extended . These temporaries are super temporaries and these macros are super macros . Invocations of these macros are super macro call expressions . Arguments to these macros may be super operands . Note When a super macro call expression is an extending expression , its super operands are extending expressions and the scopes of the super temporaries are extended . See destructors.scope.lifetime-extension.exprs . [expr .super-macros .format_args] format_args! [expr .super-macros .format_args .super-operands] Except for the format string argument, all arguments passed to format_args! are super operands . #![allow(unused)] fn main() { fn temp() -> String { String::from("") } // Due to the call being an extending expression and the argument // being a super operand, the inner block is an extending expression, // so the scope of the temporary created in its trailing expression // is extended. let _ = format_args!("{}", { &temp() }); // OK } [expr .super-macros .format_args .super-temporaries] The super operands of format_args! are implicitly borrowed and are therefore place expression contexts . When a value expression is passed as an argument, it creates a super temporary . #![allow(unused)] fn main() { fn temp() -> String { String::from("") } let x = format_args!("{}", temp()); x; // <-- The temporary is extended, allowing use here. } The expansion of a call to format_args! sometimes creates other internal super temporaries . #![allow(unused)] fn main() { let x = { // This call creates an internal temporary. let x = format_args!("{:?}", 0); x // <-- The temporary is extended, allowing its use here. }; // <-- The temporary is dropped here. x; // ERROR } #![allow(unused)] fn main() { // This call doesn't create an internal temporary. let x = { let x = format_args!("{}", 0); x }; x; // OK } Note The details of when format_args! does or does not create internal temporaries are currently unspecified. [expr .super-macros .pin] pin! [expr .super-macros .pin .super-operands] The argument to pin! is a super operand . #![allow(unused)] fn main() { use core::pin::pin; fn temp() {} // As above for `format_args!`. let _ = pin!({ &temp() }); // OK } [expr .super-macros .pin .super-temporaries] The argument to pin! is a value expression context and creates a super temporary . #![allow(unused)] fn main() { use core::pin::pin; fn temp() {} // The argument is evaluated into a super temporary. let x = pin!(temp()); // The temporary is extended, allowing its use here. x; // OK } [expr .implicit-borrow] Implicit borrows [expr .implicit-borrow-intro] Certain expressions will treat an expression as a place expression by implicitly borrowing it. For example, it is possible to compare two unsized slices for equality directly, because the == operator implicitly borrows its operands: #![allow(unused)] fn main() { let c = [1, 2, 3]; let d = vec![1, 2, 3]; let a: &[i32]; let b: &[i32]; a = &c; b = &d; // ... *a == *b; // Equivalent form: ::std::cmp::PartialEq::eq(&*a, &*b); } [expr .implicit-borrow .application] Implicit borrows may be taken in the following expressions: Left operand in method-call expressions. Left operand in field expressions. Left operand in call expressions . Left operand in array indexing expressions. Operand of the dereference operator ( * ). Operands of comparison . Left operands of the compound assignment . Arguments to format_args! except the format string. [expr .overload] Overloading traits Many of the following operators and expressions can also be overloaded for other types using traits in std::ops or std::cmp . These traits also exist in core::ops and core::cmp with the same names. [expr .attr] Expression attributes [expr .attr .restriction] Outer attributes before an expression are allowed only in a few specific cases: Before an expression used as a statement . Elements of array expressions , tuple expressions , call expressions , and tuple-style struct expressions. The tail expression of block expressions . [expr .attr .never-before] They are never allowed before: Range expressions. Binary operator expressions ( ArithmeticOrLogicalExpression , ComparisonExpression , LazyBooleanExpression , TypeCastExpression , AssignmentExpression , CompoundAssignmentExpression ). | 2026-01-13T09:29:14 |
https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii_alphanumeric | char - Rust This old browser is unsupported and will most likely display funky things. char std 1.92.0 (ded5c06cf 2025-12-08) char Sections Validity and Layout Representation Associated Constants MAX MAX_LEN_UTF8 MAX_LEN_UTF16 MIN REPLACEMENT_CHARACTER UNICODE_VERSION Methods as_ascii as_ascii_unchecked decode_utf16 encode_utf8 encode_utf16 eq_ignore_ascii_case escape_debug escape_default escape_unicode from_digit from_u32 from_u32_unchecked is_alphabetic is_alphanumeric is_ascii is_ascii_alphabetic is_ascii_alphanumeric is_ascii_control is_ascii_digit is_ascii_graphic is_ascii_hexdigit is_ascii_lowercase is_ascii_octdigit is_ascii_punctuation is_ascii_uppercase is_ascii_whitespace is_control is_digit is_lowercase is_numeric is_uppercase is_whitespace len_utf8 len_utf16 make_ascii_lowercase make_ascii_uppercase to_ascii_lowercase to_ascii_uppercase to_digit to_lowercase to_uppercase Trait Implementations AsciiExt Clone ConstParamTy_ Copy Debug Default Display Eq Extend<&'a char> Extend<char> From<AsciiChar> From<char> From<char> From<char> From<char> From<u8> FromIterator<&'a char> FromIterator<&'a char> FromIterator<char> FromIterator<char> FromIterator<char> FromIterator<char> FromStr Hash Ord PartialEq PartialOrd Pattern RangePattern Step StructuralPartialEq TrustedStep TryFrom<char> TryFrom<char> TryFrom<u32> UseCloned ZeroablePrimitive Auto Trait Implementations Freeze RefUnwindSafe Send Sync Unpin UnwindSafe Blanket Implementations Any Borrow<T> BorrowMut<T> CloneToUninit From<NonZero<T>> From<T> Into<U> ToOwned ToString TryFrom<U> TryInto<U> In crate std Primitive Type char Copy item path 1.0.0 Expand description A character type. The char type represents a single character. More specifically, since ‘character’ isn’t a well-defined concept in Unicode, char is a ‘ Unicode scalar value ’. This documentation describes a number of methods and trait implementations on the char type. For technical reasons, there is additional, separate documentation in the std::char module as well. § Validity and Layout A char is a ‘ Unicode scalar value ’, which is any ‘ Unicode code point ’ other than a surrogate code point . This has a fixed numerical definition: code points are in the range 0 to 0x10FFFF, inclusive. Surrogate code points, used by UTF-16, are in the range 0xD800 to 0xDFFF. No char may be constructed, whether as a literal or at runtime, that is not a Unicode scalar value. Violating this rule causes undefined behavior. ⓘ // Each of these is a compiler error [ '\u{D800}' , '\u{DFFF}' , '\u{110000}' ]; ⓘ // Panics; from_u32 returns None. char::from_u32( 0xDE01 ).unwrap(); // Undefined behavior let _ = unsafe { char::from_u32_unchecked( 0x110000 ) }; Unicode scalar values are also the exact set of values that may be encoded in UTF-8. Because char values are Unicode scalar values and functions may assume incoming str values are valid UTF-8 , it is safe to store any char in a str or read any character from a str as a char . The gap in valid char values is understood by the compiler, so in the below example the two ranges are understood to cover the whole range of possible char values and there is no error for a non-exhaustive match . let c: char = 'a' ; match c { '\0' ..= '\u{D7FF}' => false , '\u{E000}' ..= '\u{10FFFF}' => true , }; All Unicode scalar values are valid char values, but not all of them represent a real character. Many Unicode scalar values are not currently assigned to a character, but may be in the future (“reserved”); some will never be a character (“noncharacters”); and some may be given different meanings by different users (“private use”). char is guaranteed to have the same size, alignment, and function call ABI as u32 on all platforms. use std::alloc::Layout; assert_eq! (Layout::new::<char>(), Layout::new::<u32>()); § Representation char is always four bytes in size. This is a different representation than a given character would have as part of a String . For example: let v = vec! [ 'h' , 'e' , 'l' , 'l' , 'o' ]; // five elements times four bytes for each element assert_eq! ( 20 , v.len() * size_of::<char>()); let s = String::from( "hello" ); // five elements times one byte per element assert_eq! ( 5 , s.len() * size_of::<u8>()); As always, remember that a human intuition for ‘character’ might not map to Unicode’s definitions. For example, despite looking similar, the ‘é’ character is one Unicode code point while ‘é’ is two Unicode code points: let mut chars = "é" .chars(); // U+00e9: 'latin small letter e with acute' assert_eq! ( Some ( '\u{00e9}' ), chars.next()); assert_eq! ( None , chars.next()); let mut chars = "é" .chars(); // U+0065: 'latin small letter e' assert_eq! ( Some ( '\u{0065}' ), chars.next()); // U+0301: 'combining acute accent' assert_eq! ( Some ( '\u{0301}' ), chars.next()); assert_eq! ( None , chars.next()); This means that the contents of the first string above will fit into a char while the contents of the second string will not . Trying to create a char literal with the contents of the second string gives an error: error: character literal may only contain one codepoint: 'é' let c = 'é'; ^^^ Another implication of the 4-byte fixed size of a char is that per- char processing can end up using a lot more memory: let s = String::from( "love: ❤️" ); let v: Vec<char> = s.chars().collect(); assert_eq! ( 12 , size_of_val( & s[..])); assert_eq! ( 32 , size_of_val( & v[..])); Implementations § Source § impl char 1.83.0 · Source pub const MIN : char = '\0' The lowest valid code point a char can have, '\0' . Unlike integer types, char actually has a gap in the middle, meaning that the range of possible char s is smaller than you might expect. Ranges of char will automatically hop this gap for you: let dist = u32::from(char::MAX) - u32::from(char::MIN); let size = (char::MIN..=char::MAX).count() as u32; assert! (size < dist); Despite this gap, the MIN and MAX values can be used as bounds for all char values. § Examples let c: char = something_which_returns_char(); assert! (char::MIN <= c); let value_at_min = u32::from(char::MIN); assert_eq! (char::from_u32(value_at_min), Some ( '\0' )); 1.52.0 · Source pub const MAX : char = '\u{10ffff}' The highest valid code point a char can have, '\u{10FFFF}' . Unlike integer types, char actually has a gap in the middle, meaning that the range of possible char s is smaller than you might expect. Ranges of char will automatically hop this gap for you: let dist = u32::from(char::MAX) - u32::from(char::MIN); let size = (char::MIN..=char::MAX).count() as u32; assert! (size < dist); Despite this gap, the MIN and MAX values can be used as bounds for all char values. § Examples let c: char = something_which_returns_char(); assert! (c <= char::MAX); let value_at_max = u32::from(char::MAX); assert_eq! (char::from_u32(value_at_max), Some ( '\u{10FFFF}' )); assert_eq! (char::from_u32(value_at_max + 1 ), None ); Source pub const MAX_LEN_UTF8 : usize = 4usize 🔬 This is a nightly-only experimental API. ( char_max_len #121714 ) The maximum number of bytes required to encode a char to UTF-8 encoding. Source pub const MAX_LEN_UTF16 : usize = 2usize 🔬 This is a nightly-only experimental API. ( char_max_len #121714 ) The maximum number of two-byte units required to encode a char to UTF-16 encoding. 1.52.0 · Source pub const REPLACEMENT_CHARACTER : char = '�' U+FFFD REPLACEMENT CHARACTER (�) is used in Unicode to represent a decoding error. It can occur, for example, when giving ill-formed UTF-8 bytes to String::from_utf8_lossy . 1.52.0 · Source pub const UNICODE_VERSION : ( u8 , u8 , u8 ) = crate::unicode::UNICODE_VERSION The version of Unicode that the Unicode parts of char and str methods are based on. New versions of Unicode are released regularly and subsequently all methods in the standard library depending on Unicode are updated. Therefore the behavior of some char and str methods and the value of this constant changes over time. This is not considered to be a breaking change. The version numbering scheme is explained in Unicode 11.0 or later, Section 3.1 Versions of the Unicode Standard . 1.52.0 · Source pub fn decode_utf16 <I>(iter: I) -> DecodeUtf16 <<I as IntoIterator >:: IntoIter > ⓘ where I: IntoIterator <Item = u16 >, Creates an iterator over the native endian UTF-16 encoded code points in iter , returning unpaired surrogates as Err s. § Examples Basic usage: // 𝄞mus<invalid>ic<invalid> let v = [ 0xD834 , 0xDD1E , 0x006d , 0x0075 , 0x0073 , 0xDD1E , 0x0069 , 0x0063 , 0xD834 , ]; assert_eq! ( char::decode_utf16(v) .map(|r| r.map_err(|e| e.unpaired_surrogate())) .collect::<Vec< _ >>(), vec! [ Ok ( '𝄞' ), Ok ( 'm' ), Ok ( 'u' ), Ok ( 's' ), Err ( 0xDD1E ), Ok ( 'i' ), Ok ( 'c' ), Err ( 0xD834 ) ] ); A lossy decoder can be obtained by replacing Err results with the replacement character: // 𝄞mus<invalid>ic<invalid> let v = [ 0xD834 , 0xDD1E , 0x006d , 0x0075 , 0x0073 , 0xDD1E , 0x0069 , 0x0063 , 0xD834 , ]; assert_eq! ( char::decode_utf16(v) .map(|r| r.unwrap_or(char::REPLACEMENT_CHARACTER)) .collect::<String>(), "𝄞mus�ic�" ); 1.52.0 (const: 1.67.0) · Source pub const fn from_u32 (i: u32 ) -> Option < char > Converts a u32 to a char . Note that all char s are valid u32 s, and can be cast to one with as : let c = '💯' ; let i = c as u32; assert_eq! ( 128175 , i); However, the reverse is not true: not all valid u32 s are valid char s. from_u32() will return None if the input is not a valid value for a char . For an unsafe version of this function which ignores these checks, see from_u32_unchecked . § Examples Basic usage: let c = char::from_u32( 0x2764 ); assert_eq! ( Some ( '❤' ), c); Returning None when the input is not a valid char : let c = char::from_u32( 0x110000 ); assert_eq! ( None , c); 1.52.0 (const: 1.81.0) · Source pub const unsafe fn from_u32_unchecked (i: u32 ) -> char Converts a u32 to a char , ignoring validity. Note that all char s are valid u32 s, and can be cast to one with as : let c = '💯' ; let i = c as u32; assert_eq! ( 128175 , i); However, the reverse is not true: not all valid u32 s are valid char s. from_u32_unchecked() will ignore this, and blindly cast to char , possibly creating an invalid one. § Safety This function is unsafe, as it may construct invalid char values. For a safe version of this function, see the from_u32 function. § Examples Basic usage: let c = unsafe { char::from_u32_unchecked( 0x2764 ) }; assert_eq! ( '❤' , c); 1.52.0 (const: 1.67.0) · Source pub const fn from_digit (num: u32 , radix: u32 ) -> Option < char > Converts a digit in the given radix to a char . A ‘radix’ here is sometimes also called a ‘base’. A radix of two indicates a binary number, a radix of ten, decimal, and a radix of sixteen, hexadecimal, to give some common values. Arbitrary radices are supported. from_digit() will return None if the input is not a digit in the given radix. § Panics Panics if given a radix larger than 36. § Examples Basic usage: let c = char::from_digit( 4 , 10 ); assert_eq! ( Some ( '4' ), c); // Decimal 11 is a single digit in base 16 let c = char::from_digit( 11 , 16 ); assert_eq! ( Some ( 'b' ), c); Returning None when the input is not a digit: let c = char::from_digit( 20 , 10 ); assert_eq! ( None , c); Passing a large radix, causing a panic: ⓘ // this panics let _c = char::from_digit( 1 , 37 ); 1.0.0 (const: 1.87.0) · Source pub const fn is_digit (self, radix: u32 ) -> bool Checks if a char is a digit in the given radix. A ‘radix’ here is sometimes also called a ‘base’. A radix of two indicates a binary number, a radix of ten, decimal, and a radix of sixteen, hexadecimal, to give some common values. Arbitrary radices are supported. Compared to is_numeric() , this function only recognizes the characters 0-9 , a-z and A-Z . ‘Digit’ is defined to be only the following characters: 0-9 a-z A-Z For a more comprehensive understanding of ‘digit’, see is_numeric() . § Panics Panics if given a radix smaller than 2 or larger than 36. § Examples Basic usage: assert! ( '1' .is_digit( 10 )); assert! ( 'f' .is_digit( 16 )); assert! (! 'f' .is_digit( 10 )); Passing a large radix, causing a panic: ⓘ // this panics '1' .is_digit( 37 ); Passing a small radix, causing a panic: ⓘ // this panics '1' .is_digit( 1 ); 1.0.0 (const: 1.67.0) · Source pub const fn to_digit (self, radix: u32 ) -> Option < u32 > Converts a char to a digit in the given radix. A ‘radix’ here is sometimes also called a ‘base’. A radix of two indicates a binary number, a radix of ten, decimal, and a radix of sixteen, hexadecimal, to give some common values. Arbitrary radices are supported. ‘Digit’ is defined to be only the following characters: 0-9 a-z A-Z § Errors Returns None if the char does not refer to a digit in the given radix. § Panics Panics if given a radix smaller than 2 or larger than 36. § Examples Basic usage: assert_eq! ( '1' .to_digit( 10 ), Some ( 1 )); assert_eq! ( 'f' .to_digit( 16 ), Some ( 15 )); Passing a non-digit results in failure: assert_eq! ( 'f' .to_digit( 10 ), None ); assert_eq! ( 'z' .to_digit( 16 ), None ); Passing a large radix, causing a panic: ⓘ // this panics let _ = '1' .to_digit( 37 ); Passing a small radix, causing a panic: ⓘ // this panics let _ = '1' .to_digit( 1 ); 1.0.0 · Source pub fn escape_unicode (self) -> EscapeUnicode ⓘ Returns an iterator that yields the hexadecimal Unicode escape of a character as char s. This will escape characters with the Rust syntax of the form \u{NNNNNN} where NNNNNN is a hexadecimal representation. § Examples As an iterator: for c in '❤' .escape_unicode() { print! ( "{c}" ); } println! (); Using println! directly: println! ( "{}" , '❤' .escape_unicode()); Both are equivalent to: println! ( "\\u{{2764}}" ); Using to_string : assert_eq! ( '❤' .escape_unicode().to_string(), "\\u{2764}" ); 1.20.0 · Source pub fn escape_debug (self) -> EscapeDebug ⓘ Returns an iterator that yields the literal escape code of a character as char s. This will escape the characters similar to the Debug implementations of str or char . § Examples As an iterator: for c in '\n' .escape_debug() { print! ( "{c}" ); } println! (); Using println! directly: println! ( "{}" , '\n' .escape_debug()); Both are equivalent to: println! ( "\\n" ); Using to_string : assert_eq! ( '\n' .escape_debug().to_string(), "\\n" ); 1.0.0 · Source pub fn escape_default (self) -> EscapeDefault ⓘ Returns an iterator that yields the literal escape code of a character as char s. The default is chosen with a bias toward producing literals that are legal in a variety of languages, including C++11 and similar C-family languages. The exact rules are: Tab is escaped as \t . Carriage return is escaped as \r . Line feed is escaped as \n . Single quote is escaped as \' . Double quote is escaped as \" . Backslash is escaped as \\ . Any character in the ‘printable ASCII’ range 0x20 .. 0x7e inclusive is not escaped. All other characters are given hexadecimal Unicode escapes; see escape_unicode . § Examples As an iterator: for c in '"' .escape_default() { print! ( "{c}" ); } println! (); Using println! directly: println! ( "{}" , '"' .escape_default()); Both are equivalent to: println! ( "\\\"" ); Using to_string : assert_eq! ( '"' .escape_default().to_string(), "\\\"" ); 1.0.0 (const: 1.52.0) · Source pub const fn len_utf8 (self) -> usize Returns the number of bytes this char would need if encoded in UTF-8. That number of bytes is always between 1 and 4, inclusive. § Examples Basic usage: let len = 'A' .len_utf8(); assert_eq! (len, 1 ); let len = 'ß' .len_utf8(); assert_eq! (len, 2 ); let len = 'ℝ' .len_utf8(); assert_eq! (len, 3 ); let len = '💣' .len_utf8(); assert_eq! (len, 4 ); The &str type guarantees that its contents are UTF-8, and so we can compare the length it would take if each code point was represented as a char vs in the &str itself: // as chars let eastern = '東' ; let capital = '京' ; // both can be represented as three bytes assert_eq! ( 3 , eastern.len_utf8()); assert_eq! ( 3 , capital.len_utf8()); // as a &str, these two are encoded in UTF-8 let tokyo = "東京" ; let len = eastern.len_utf8() + capital.len_utf8(); // we can see that they take six bytes total... assert_eq! ( 6 , tokyo.len()); // ... just like the &str assert_eq! (len, tokyo.len()); 1.0.0 (const: 1.52.0) · Source pub const fn len_utf16 (self) -> usize Returns the number of 16-bit code units this char would need if encoded in UTF-16. That number of code units is always either 1 or 2, for unicode scalar values in the basic multilingual plane or supplementary planes respectively. See the documentation for len_utf8() for more explanation of this concept. This function is a mirror, but for UTF-16 instead of UTF-8. § Examples Basic usage: let n = 'ß' .len_utf16(); assert_eq! (n, 1 ); let len = '💣' .len_utf16(); assert_eq! (len, 2 ); 1.15.0 (const: 1.83.0) · Source pub const fn encode_utf8 (self, dst: &mut [ u8 ]) -> &mut str Encodes this character as UTF-8 into the provided byte buffer, and then returns the subslice of the buffer that contains the encoded character. § Panics Panics if the buffer is not large enough. A buffer of length four is large enough to encode any char . § Examples In both of these examples, ‘ß’ takes two bytes to encode. let mut b = [ 0 ; 2 ]; let result = 'ß' .encode_utf8( &mut b); assert_eq! (result, "ß" ); assert_eq! (result.len(), 2 ); A buffer that’s too small: ⓘ let mut b = [ 0 ; 1 ]; // this panics 'ß' .encode_utf8( &mut b); 1.15.0 (const: 1.84.0) · Source pub const fn encode_utf16 (self, dst: &mut [ u16 ]) -> &mut [ u16 ] Encodes this character as native endian UTF-16 into the provided u16 buffer, and then returns the subslice of the buffer that contains the encoded character. § Panics Panics if the buffer is not large enough. A buffer of length 2 is large enough to encode any char . § Examples In both of these examples, ‘𝕊’ takes two u16 s to encode. let mut b = [ 0 ; 2 ]; let result = '𝕊' .encode_utf16( &mut b); assert_eq! (result.len(), 2 ); A buffer that’s too small: ⓘ let mut b = [ 0 ; 1 ]; // this panics '𝕊' .encode_utf16( &mut b); 1.0.0 · Source pub fn is_alphabetic (self) -> bool Returns true if this char has the Alphabetic property. Alphabetic is described in Chapter 4 (Character Properties) of the Unicode Standard and specified in the Unicode Character Database DerivedCoreProperties.txt . § Examples Basic usage: assert! ( 'a' .is_alphabetic()); assert! ( '京' .is_alphabetic()); let c = '💝' ; // love is many things, but it is not alphabetic assert! (!c.is_alphabetic()); 1.0.0 (const: 1.84.0) · Source pub const fn is_lowercase (self) -> bool Returns true if this char has the Lowercase property. Lowercase is described in Chapter 4 (Character Properties) of the Unicode Standard and specified in the Unicode Character Database DerivedCoreProperties.txt . § Examples Basic usage: assert! ( 'a' .is_lowercase()); assert! ( 'δ' .is_lowercase()); assert! (! 'A' .is_lowercase()); assert! (! 'Δ' .is_lowercase()); // The various Chinese scripts and punctuation do not have case, and so: assert! (! '中' .is_lowercase()); assert! (! ' ' .is_lowercase()); In a const context: const CAPITAL_DELTA_IS_LOWERCASE: bool = 'Δ' .is_lowercase(); assert! (!CAPITAL_DELTA_IS_LOWERCASE); 1.0.0 (const: 1.84.0) · Source pub const fn is_uppercase (self) -> bool Returns true if this char has the Uppercase property. Uppercase is described in Chapter 4 (Character Properties) of the Unicode Standard and specified in the Unicode Character Database DerivedCoreProperties.txt . § Examples Basic usage: assert! (! 'a' .is_uppercase()); assert! (! 'δ' .is_uppercase()); assert! ( 'A' .is_uppercase()); assert! ( 'Δ' .is_uppercase()); // The various Chinese scripts and punctuation do not have case, and so: assert! (! '中' .is_uppercase()); assert! (! ' ' .is_uppercase()); In a const context: const CAPITAL_DELTA_IS_UPPERCASE: bool = 'Δ' .is_uppercase(); assert! (CAPITAL_DELTA_IS_UPPERCASE); 1.0.0 (const: 1.87.0) · Source pub const fn is_whitespace (self) -> bool Returns true if this char has the White_Space property. White_Space is specified in the Unicode Character Database PropList.txt . § Examples Basic usage: assert! ( ' ' .is_whitespace()); // line break assert! ( '\n' .is_whitespace()); // a non-breaking space assert! ( '\u{A0}' .is_whitespace()); assert! (! '越' .is_whitespace()); 1.0.0 · Source pub fn is_alphanumeric (self) -> bool Returns true if this char satisfies either is_alphabetic() or is_numeric() . § Examples Basic usage: assert! ( '٣' .is_alphanumeric()); assert! ( '7' .is_alphanumeric()); assert! ( '৬' .is_alphanumeric()); assert! ( '¾' .is_alphanumeric()); assert! ( '①' .is_alphanumeric()); assert! ( 'K' .is_alphanumeric()); assert! ( 'و' .is_alphanumeric()); assert! ( '藏' .is_alphanumeric()); 1.0.0 · Source pub fn is_control (self) -> bool Returns true if this char has the general category for control codes. Control codes (code points with the general category of Cc ) are described in Chapter 4 (Character Properties) of the Unicode Standard and specified in the Unicode Character Database UnicodeData.txt . § Examples Basic usage: // U+009C, STRING TERMINATOR assert! ( '' .is_control()); assert! (! 'q' .is_control()); 1.0.0 · Source pub fn is_numeric (self) -> bool Returns true if this char has one of the general categories for numbers. The general categories for numbers ( Nd for decimal digits, Nl for letter-like numeric characters, and No for other numeric characters) are specified in the Unicode Character Database UnicodeData.txt . This method doesn’t cover everything that could be considered a number, e.g. ideographic numbers like ‘三’. If you want everything including characters with overlapping purposes then you might want to use a unicode or language-processing library that exposes the appropriate character properties instead of looking at the unicode categories. If you want to parse ASCII decimal digits (0-9) or ASCII base-N, use is_ascii_digit or is_digit instead. § Examples Basic usage: assert! ( '٣' .is_numeric()); assert! ( '7' .is_numeric()); assert! ( '৬' .is_numeric()); assert! ( '¾' .is_numeric()); assert! ( '①' .is_numeric()); assert! (! 'K' .is_numeric()); assert! (! 'و' .is_numeric()); assert! (! '藏' .is_numeric()); assert! (! '三' .is_numeric()); 1.0.0 · Source pub fn to_lowercase (self) -> ToLowercase ⓘ Returns an iterator that yields the lowercase mapping of this char as one or more char s. If this char does not have a lowercase mapping, the iterator yields the same char . If this char has a one-to-one lowercase mapping given by the Unicode Character Database UnicodeData.txt , the iterator yields that char . If this char requires special considerations (e.g. multiple char s) the iterator yields the char (s) given by SpecialCasing.txt . This operation performs an unconditional mapping without tailoring. That is, the conversion is independent of context and language. In the Unicode Standard , Chapter 4 (Character Properties) discusses case mapping in general and Chapter 3 (Conformance) discusses the default algorithm for case conversion. § Examples As an iterator: for c in 'İ' .to_lowercase() { print! ( "{c}" ); } println! (); Using println! directly: println! ( "{}" , 'İ' .to_lowercase()); Both are equivalent to: println! ( "i\u{307}" ); Using to_string : assert_eq! ( 'C' .to_lowercase().to_string(), "c" ); // Sometimes the result is more than one character: assert_eq! ( 'İ' .to_lowercase().to_string(), "i\u{307}" ); // Characters that do not have both uppercase and lowercase // convert into themselves. assert_eq! ( '山' .to_lowercase().to_string(), "山" ); 1.0.0 · Source pub fn to_uppercase (self) -> ToUppercase ⓘ Returns an iterator that yields the uppercase mapping of this char as one or more char s. If this char does not have an uppercase mapping, the iterator yields the same char . If this char has a one-to-one uppercase mapping given by the Unicode Character Database UnicodeData.txt , the iterator yields that char . If this char requires special considerations (e.g. multiple char s) the iterator yields the char (s) given by SpecialCasing.txt . This operation performs an unconditional mapping without tailoring. That is, the conversion is independent of context and language. In the Unicode Standard , Chapter 4 (Character Properties) discusses case mapping in general and Chapter 3 (Conformance) discusses the default algorithm for case conversion. § Examples As an iterator: for c in 'ß' .to_uppercase() { print! ( "{c}" ); } println! (); Using println! directly: println! ( "{}" , 'ß' .to_uppercase()); Both are equivalent to: println! ( "SS" ); Using to_string : assert_eq! ( 'c' .to_uppercase().to_string(), "C" ); // Sometimes the result is more than one character: assert_eq! ( 'ß' .to_uppercase().to_string(), "SS" ); // Characters that do not have both uppercase and lowercase // convert into themselves. assert_eq! ( '山' .to_uppercase().to_string(), "山" ); § Note on locale In Turkish, the equivalent of ‘i’ in Latin has five forms instead of two: ‘Dotless’: I / ı, sometimes written ï ‘Dotted’: İ / i Note that the lowercase dotted ‘i’ is the same as the Latin. Therefore: let upper_i = 'i' .to_uppercase().to_string(); The value of upper_i here relies on the language of the text: if we’re in en-US , it should be "I" , but if we’re in tr_TR , it should be "İ" . to_uppercase() does not take this into account, and so: let upper_i = 'i' .to_uppercase().to_string(); assert_eq! (upper_i, "I" ); holds across languages. 1.23.0 (const: 1.32.0) · Source pub const fn is_ascii (&self) -> bool Checks if the value is within the ASCII range. § Examples let ascii = 'a' ; let non_ascii = '❤' ; assert! (ascii.is_ascii()); assert! (!non_ascii.is_ascii()); Source pub const fn as_ascii (&self) -> Option < AsciiChar > 🔬 This is a nightly-only experimental API. ( ascii_char #110998 ) Returns Some if the value is within the ASCII range, or None if it’s not. This is preferred to Self::is_ascii when you’re passing the value along to something else that can take ascii::Char rather than needing to check again for itself whether the value is in ASCII. Source pub const unsafe fn as_ascii_unchecked (&self) -> AsciiChar 🔬 This is a nightly-only experimental API. ( ascii_char #110998 ) Converts this char into an ASCII character , without checking whether it is valid. § Safety This char must be within the ASCII range, or else this is UB. 1.23.0 (const: 1.52.0) · Source pub const fn to_ascii_uppercase (&self) -> char Makes a copy of the value in its ASCII upper case equivalent. ASCII letters ‘a’ to ‘z’ are mapped to ‘A’ to ‘Z’, but non-ASCII letters are unchanged. To uppercase the value in-place, use make_ascii_uppercase() . To uppercase ASCII characters in addition to non-ASCII characters, use to_uppercase() . § Examples let ascii = 'a' ; let non_ascii = '❤' ; assert_eq! ( 'A' , ascii.to_ascii_uppercase()); assert_eq! ( '❤' , non_ascii.to_ascii_uppercase()); 1.23.0 (const: 1.52.0) · Source pub const fn to_ascii_lowercase (&self) -> char Makes a copy of the value in its ASCII lower case equivalent. ASCII letters ‘A’ to ‘Z’ are mapped to ‘a’ to ‘z’, but non-ASCII letters are unchanged. To lowercase the value in-place, use make_ascii_lowercase() . To lowercase ASCII characters in addition to non-ASCII characters, use to_lowercase() . § Examples let ascii = 'A' ; let non_ascii = '❤' ; assert_eq! ( 'a' , ascii.to_ascii_lowercase()); assert_eq! ( '❤' , non_ascii.to_ascii_lowercase()); 1.23.0 (const: 1.52.0) · Source pub const fn eq_ignore_ascii_case (&self, other: & char ) -> bool Checks that two values are an ASCII case-insensitive match. Equivalent to to_ascii_lowercase (a) == to_ascii_lowercase (b) . § Examples let upper_a = 'A' ; let lower_a = 'a' ; let lower_z = 'z' ; assert! (upper_a.eq_ignore_ascii_case( & lower_a)); assert! (upper_a.eq_ignore_ascii_case( & upper_a)); assert! (!upper_a.eq_ignore_ascii_case( & lower_z)); 1.23.0 (const: 1.84.0) · Source pub const fn make_ascii_uppercase (&mut self) Converts this type to its ASCII upper case equivalent in-place. ASCII letters ‘a’ to ‘z’ are mapped to ‘A’ to ‘Z’, but non-ASCII letters are unchanged. To return a new uppercased value without modifying the existing one, use to_ascii_uppercase() . § Examples let mut ascii = 'a' ; ascii.make_ascii_uppercase(); assert_eq! ( 'A' , ascii); 1.23.0 (const: 1.84.0) · Source pub const fn make_ascii_lowercase (&mut self) Converts this type to its ASCII lower case equivalent in-place. ASCII letters ‘A’ to ‘Z’ are mapped to ‘a’ to ‘z’, but non-ASCII letters are unchanged. To return a new lowercased value without modifying the existing one, use to_ascii_lowercase() . § Examples let mut ascii = 'A' ; ascii.make_ascii_lowercase(); assert_eq! ( 'a' , ascii); 1.24.0 (const: 1.47.0) · Source pub const fn is_ascii_alphabetic (&self) -> bool Checks if the value is an ASCII alphabetic character: U+0041 ‘A’ ..= U+005A ‘Z’, or U+0061 ‘a’ ..= U+007A ‘z’. § Examples let uppercase_a = 'A' ; let uppercase_g = 'G' ; let a = 'a' ; let g = 'g' ; let zero = '0' ; let percent = '%' ; let space = ' ' ; let lf = '\n' ; let esc = '\x1b' ; assert! (uppercase_a.is_ascii_alphabetic()); assert! (uppercase_g.is_ascii_alphabetic()); assert! (a.is_ascii_alphabetic()); assert! (g.is_ascii_alphabetic()); assert! (!zero.is_ascii_alphabetic()); assert! (!percent.is_ascii_alphabetic()); assert! (!space.is_ascii_alphabetic()); assert! (!lf.is_ascii_alphabetic()); assert! (!esc.is_ascii_alphabetic()); 1.24.0 (const: 1.47.0) · Source pub const fn is_ascii_uppercase (&self) -> bool Checks if the value is an ASCII uppercase character: U+0041 ‘A’ ..= U+005A ‘Z’. § Examples let uppercase_a = 'A' ; let uppercase_g = 'G' ; let a = 'a' ; let g = 'g' ; let zero = '0' ; let percent = '%' ; let space = ' ' ; let lf = '\n' ; let esc = '\x1b' ; assert! (uppercase_a.is_ascii_uppercase()); assert! (uppercase_g.is_ascii_uppercase()); assert! (!a.is_ascii_uppercase()); assert! (!g.is_ascii_uppercase()); assert! (!zero.is_ascii_uppercase()); assert! (!percent.is_ascii_uppercase()); assert! (!space.is_ascii_uppercase()); assert! (!lf.is_ascii_uppercase()); assert! (!esc.is_ascii_uppercase()); 1.24.0 (const: 1.47.0) · Source pub const fn is_ascii_lowercase (&self) -> bool Checks if the value is an ASCII lowercase character: U+0061 ‘a’ ..= U+007A ‘z’. § Examples let uppercase_a = 'A' ; let uppercase_g = 'G' ; let a = 'a' ; let g = 'g' ; let zero = '0' ; let percent = '%' ; let space = ' ' ; let lf = '\n' ; let esc = '\x1b' ; assert! (!uppercase_a.is_ascii_lowercase()); assert! (!uppercase_g.is_ascii_lowercase()); assert! (a.is_ascii_lowercase()); assert! (g.is_ascii_lowercase()); assert! (!zero.is_ascii_lowercase()); assert! (!percent.is_ascii_lowercase()); assert! (!space.is_ascii_lowercase()); assert! (!lf.is_ascii_lowercase()); assert! (!esc.is_ascii_lowercase()); 1.24.0 (const: 1.47.0) · Source pub const fn is_ascii_alphanumeric (&self) -> bool Checks if the value is an ASCII alphanumeric character: U+0041 ‘A’ ..= U+005A ‘Z’, or U+0061 ‘a’ ..= U+007A ‘z’, or U+0030 ‘0’ ..= U+0039 ‘9’. § Examples let uppercase_a = 'A' ; let uppercase_g = 'G' ; let a = 'a' ; let g = 'g' ; let zero = '0' ; let percent = '%' ; let space = ' ' ; let lf = '\n' ; let esc = '\x1b' ; assert! (uppercase_a.is_ascii_alphanumeric()); assert! (uppercase_g.is_ascii_alphanumeric()); assert! (a.is_ascii_alphanumeric()); assert! (g.is_ascii_alphanumeric()); assert! (zero.is_ascii_alphanumeric()); assert! (!percent.is_ascii_alphanumeric()); assert! (!space.is_ascii_alphanumeric()); assert! (!lf.is_ascii_alphanumeric()); assert! (!esc.is_ascii_alphanumeric()); 1.24.0 (const: 1.47.0) · Source pub const fn is_ascii_digit (&self) -> bool Checks if the value is an ASCII decimal digit: U+0030 ‘0’ ..= U+0039 ‘9’. § Examples let uppercase_a = 'A' ; let uppercase_g = 'G' ; let a = 'a' ; let g = 'g' ; let zero = '0' ; let percent = '%' ; let space = ' ' ; let lf = '\n' ; let esc = '\x1b' ; assert! (!uppercase_a.is_ascii_digit()); assert! (!uppercase_g.is_ascii_digit()); assert! (!a.is_ascii_digit()); assert! (!g.is_ascii_digit()); assert! (zero.is_ascii_digit()); assert! (!percent.is_ascii_digit()); assert! (!space.is_ascii_digit()); assert! (!lf.is_ascii_digit()); assert! (!esc.is_ascii_digit()); Source pub const fn is_ascii_octdigit (&self) -> bool 🔬 This is a nightly-only experimental API. ( is_ascii_octdigit #101288 ) Checks if the value is an ASCII octal digit: U+0030 ‘0’ ..= U+0037 ‘7’. § Examples #![feature(is_ascii_octdigit)] let uppercase_a = 'A' ; let a = 'a' ; let zero = '0' ; let seven = '7' ; let nine = '9' ; let percent = '%' ; let lf = '\n' ; assert! (!uppercase_a.is_ascii_octdigit()); assert! (!a.is_ascii_octdigit()); assert! (zero.is_ascii_octdigit()); assert! (seven.is_ascii_octdigit()); assert! (!nine.is_ascii_octdigit()); assert! (!percent.is_ascii_octdigit()); assert! (!lf.is_ascii_octdigit()); 1.24.0 (const: 1.47.0) · Source pub const fn is_ascii_hexdigit (&self) -> bool Checks if the value is an ASCII hexadecimal digit: U+0030 ‘0’ ..= U+0039 ‘9’, or U+0041 ‘A’ ..= U+0046 ‘F’, or U+0061 ‘a’ ..= U+0066 ‘f’. § Examples let uppercase_a = 'A' ; let uppercase_g = 'G' ; let a = 'a' ; let g = 'g' ; let zero = '0' ; let percent = '%' ; let space = ' ' ; let lf = '\n' ; let esc = '\x1b' ; assert! (uppercase_a.is_ascii_hexdigit()); assert! (!uppercase_g.is_ascii_hexdigit()); assert! (a.is_ascii_hexdigit()); assert! (!g.is_ascii_hexdigit()); assert! (zero.is_ascii_hexdigit()); assert! (!percent.is_ascii_hexdigit()); assert! (!space.is_ascii_hexdigit()); assert! (!lf.is_ascii_hexdigit()); assert! (!esc.is_ascii_hexdigit()); 1.24.0 (const: 1.47.0) · Source pub const fn is_ascii_punctuation (&self) -> bool Checks if the value is an ASCII punctuation character: U+0021 ..= U+002F ! " # $ % & ' ( ) * + , - . / , or U+003A ..= U+0040 : ; < = > ? @ , or U+005B ..= U+0060 [ \ ] ^ _ ` , or U+007B ..= U+007E { | } ~ § Examples let uppercase_a = 'A' ; let uppercase_g = 'G' ; let a = 'a' ; let g = 'g' ; let zero = '0' ; let percent = '%' ; let space = ' ' ; let lf = '\n' ; let esc = '\x1b' ; assert! (!uppercase_a.is_ascii_punctuation()); assert! (!uppercase_g.is_ascii_punctuation()); assert! (!a.is_ascii_punctuation()); assert! (!g.is_ascii_punctuation()); assert! (!zero.is_ascii_punctuation()); assert! (percent.is_ascii_punctuation()); assert! (!space.is_ascii_punctuation()); assert! (!lf.is_ascii_punctuation()); assert! (!esc.is_ascii_punctuation()); 1.24.0 (const: 1.47.0) · Source pub const fn is_ascii_graphic (&self) -> bool Checks if the value is an ASCII graphic character: U+0021 ‘!’ ..= U+007E ‘~’. § Examples let uppercase_a = 'A' ; let uppercase_g = 'G' ; let a = 'a' ; let g = 'g' ; let zero = '0' ; let percent = '%' ; let space = ' ' ; let lf = '\n' ; let esc = '\x1b' ; assert! (uppercase_a.is_ascii_graphic()); assert! (uppercase_g.is_ascii_graphic()); assert! (a.is_ascii_graphic()); assert! (g.is_ascii_graphic()); assert! (zero.is_ascii_graphic()); assert! (percent.is_ascii_graphic()); assert! (!space.is_ascii_graphic()); assert! (!lf.is_ascii_graphic()); assert! (!esc.is_ascii_graphic()); 1.24.0 (const: 1.47.0) · Source pub const fn is_ascii_whitespace (&self) -> bool Checks if the value is an ASCII whitespace character: U+0020 SPACE, U+0009 HORIZONTAL TAB, U+000A LINE FEED, U+000C FORM FEED, or U+000D CARRIAGE RETURN. Rust uses the WhatWG Infra Standard’s definition of ASCII whitespace . There are several other definitions in wide use. For instance, the POSIX locale includes U+000B VERTICAL TAB as well as all the above characters, but—from the very same specification— the default rule for “field splitting” in the Bourne shell considers only SPACE, HORIZONTAL TAB, and LINE FEED as whitespace. If you are writing a program that will process an existing file format, check what that format’s definition of whitespace is before using this function. § Examples let uppercase_a = 'A' ; let uppercase_g = 'G' ; let a = 'a' ; let g = 'g' ; let zero = '0' ; let percent = '%' ; let space = ' ' ; let lf = '\n' ; let esc = '\x1b' ; assert! (!uppercase_a.is_ascii_whitespace()); assert! (!uppercase_g.is_ascii_whitespace()); assert! (!a.is_ascii_whitespace()); assert! (!g.is_ascii_whitespace()); assert! (!zero.is_ascii_whitespace()); assert! (!percent.is_ascii_whitespace()); assert! (space.is_ascii_whitespace()); assert! (lf.is_ascii_whitespace()); assert! (!esc.is_ascii_whitespace()); 1.24.0 (const: 1.47.0) · Source pub const fn is_ascii_control (&self) -> bool Checks if the value is an ASCII control character: U+0000 NUL ..= U+001F UNIT SEPARATOR, or U+007F DELETE. Note that most ASCII whitespace characters are control characters, but SPACE is not. § Examples let uppercase_a = 'A' ; let uppercase_g = 'G' ; let a = 'a' ; let g = 'g' ; let zero = '0' ; let percent = '%' ; let space = ' ' ; let lf = '\n' ; let esc = '\x1b' ; assert! (!uppercase_a.is_ascii_control()); assert! (!uppercase_g.is_ascii_control()); assert! (!a.is_ascii_control()); assert! (!g.is_ascii_control()); assert! (!zero.is_ascii_control()); assert! (!percent.is_ascii_control()); assert! (!space.is_ascii_control()); assert! (lf.is_ascii_control()); assert! (esc.is_ascii_control()); Trait Implementations § 1.0.0 · Source § impl AsciiExt for char Source § type Owned = char 👎 Deprecated since 1.26.0: use inherent methods instead Container type for copied ASCII characters. Source § fn is_ascii (&self) -> bool 👎 Deprecated since 1.26.0: use inherent methods instead Checks if the value is within the ASCII range. Read more Source § fn to_ascii_uppercase (&self) -> Self:: Owned 👎 Deprecated since 1.26.0: use inherent methods instead Makes a copy of the value in its ASCII upper case equivalent. Read more Source § fn to_ascii_lowercase (&self) -> Self:: Owned 👎 Deprecated since 1.26.0: use inherent methods instead Makes a copy of the value in its ASCII lower case equivalent. Read more Source § fn eq_ignore_ascii_case (&self, o: &Self) -> bool 👎 Deprecated since 1.26.0: use inherent methods instead Checks that two values are an ASCII case-insensitive match. Read more Source § fn make_ascii_uppercase (&mut self) 👎 Deprecated since 1.26.0: use inherent methods instead Converts this type to its ASCII upper case equivalent in-place. Read more Source § fn make_ascii_lowercase (&mut self) 👎 Deprecated since 1.26.0: use inherent methods instead Converts this type to its ASCII lower case equivalent in-place. Read more 1.0.0 (const: unstable ) · Source § impl Clone for char Source § fn clone (&self) -> char Returns a duplicate of the value. Read more 1.0.0 · Source § fn clone_from (&mut self, source: &Self) Performs copy-assignment from source . Read more 1.0.0 · Source § impl Debug for char Source § fn fmt (&self, f: &mut Formatter <'_>) -> Result < () , Error > Formats the value using the given formatter. Read more 1.0.0 (const: unstable ) · Source § impl Default for char Source § fn default () -> char Returns the default value of \x00 1.0.0 · Source § impl Display for char Source § fn fmt (&self, f: &mut Formatter <'_>) -> Result < () , Error > Formats the value using the given formatter. Read more 1.2.0 · Source § impl<'a> Extend <&'a char > for String Source § fn extend <I>(&mut self, iter: I) where I: IntoIterator <Item = &'a char >, Extends a collection with the contents of an iterator. Read more Source § fn extend_one (&mut self, _: &'a char ) 🔬 This is a nightly-only experimental API. ( extend_one #72631 ) Extends a collection with exactly one element. Source § fn extend_reserve (&mut self, additional: usize ) 🔬 This is a nightly-only experimental API. ( extend_one #72631 ) Reserves capacity in a collection for the given number of additional elements. Read more 1.0.0 · Source § impl Extend < char > for String Source § fn extend <I>(&mut self, iter: I) where I: IntoIterator <Item = char >, Extends a collection with the contents of an iterator. Read more Source § fn extend_one (&mut self, c: char ) 🔬 This is a nightly-only experimental API. ( extend_one #72631 ) Extends a collection with exactly one element. Source § fn extend_reserve (&mut self, additional: usize ) 🔬 This is a nightly-only experimental API. ( extend_one #72631 ) Reserves capacity in a collection for the given number of additional elements. Read more Source § impl From < AsciiChar > for char Source § fn from (chr: AsciiChar ) -> char Converts to this type from the input type. 1.46.0 · Source § impl From < char > for String Source § fn from (c: char ) -> String Allocates an owned String from a single character. § Example let c: char = 'a' ; let s: String = String::from(c); assert_eq! ( "a" , & s[..]); 1.51.0 (const: unstable ) · Source § impl From < char > for u128 Source § fn from (c: char ) -> u128 Converts a char into a u128 . § Examples let c = '⚙' ; let u = u128::from(c); assert! ( 16 == size_of_val( & u)) 1.13.0 (const: unstable ) · Source § impl From < char > for u32 Source § fn from (c: char ) -> u32 Converts a char into a u32 . § Examples let c = 'c' ; let u = u32::from(c); assert! ( 4 == size_of_val( & u)) 1.51.0 (const: unstable ) · Source § impl From < char > for u64 Source § fn from (c: char ) -> u64 Converts a char into a u64 . § Examples let c = '👤' ; let u = u64::from(c); assert! ( 8 == size_of_val( & u)) 1.13.0 (const: unstable ) · Source § impl From < u8 > for char Maps a byte in 0x00..=0xFF to a char whose code point has the same value, in U+0000..=U+00FF. Unicode is designed such that this effectively decodes bytes with the character encoding that IANA calls ISO-8859-1. This encoding is compatible with ASCII. Note that this is different from ISO/IEC 8859-1 a.k.a. ISO 8859-1 (with one less hyphen), which leaves some “blanks”, byte values that are not assigned to any character. ISO-8859-1 (the IANA one) assigns them to the C0 and C1 control codes. Note that this is also different from Windows-1252 a.k.a. code page 1252, which is a superset ISO/IEC 8859-1 that assigns some (not all!) blanks to punctuation and various Latin characters. To confuse things further, on the Web ascii , iso-8859-1 , and windows-1252 are all aliases for a superset of Windows-1252 that fills the remaining blanks with corresponding C0 and C1 control codes. Source § fn from (i: u8 ) -> char Converts a u8 into a char . § Examples let u = 32 as u8; let c = char::from(u); assert! ( 4 == size_of_val( & c)) 1.80.0 · Source § impl<'a> FromIterator <&'a char > for Box < str > Source § fn from_iter <T>(iter: T) -> Box < str > where T: IntoIterator <Item = &'a char >, Creates a value from an iterator. Read more 1.17.0 · Source § impl<'a> FromIterator <&'a char > for String Source § fn from_iter <I>(iter: I) -> String where I: IntoIterator <Item = &'a char >, Creates a value from an iterator. Read more 1.80.0 · Source § impl FromIterator < char > for Box < str > Source § fn from_iter <T>(iter: T) -> Box < str > where T: IntoIterator <Item = char >, Creates a value from an iterator. Read more Source § impl FromIterator < char > for ByteString Source § fn from_iter <T>(iter: T) -> ByteString where T: IntoIterator <Item = char >, Creates a value from an iterator. Read more 1.12.0 · Source § impl<'a> FromIterator < char > for Cow <'a, str > Source § fn from_iter <I>(it: I) -> Cow <'a, str > where I: IntoIterator <Item = char >, Creates a value from an iterator. Read more 1.0.0 · Source § impl FromIterator < char > for String Source § fn from_iter <I>(iter: I) -> String where I: IntoIterator <Item = char >, Creates a value from an iterator. Read more 1.20.0 · Source § impl FromStr for char Source § type Err = ParseCharError The associated error which can be returned from parsing. Source § fn from_str (s: & str ) -> Result < char , < char as FromStr >:: Err > Parses a string s to return a value of this type. Read more 1.0.0 · Source § impl Hash for char Source § fn hash <H>(&self, state: &mut H ) where H: Hasher , Feeds this value into the given Hasher . Read more 1.3.0 · Source § fn hash_slice <H>(data: &[Self], state: &mut H ) where H: Hasher , Self: Sized , Feeds a slice of this type into the given Hasher . Read more 1.0.0 (const: unstable ) · Source § impl Ord for char Source § fn cmp (&self, other: & char ) -> Ordering This method returns an Ordering between self and other . Read more 1.21.0 · Source § fn max (self, other: Self) -> Self where Self: Sized , Compares and returns the maximum of two values. Read more 1.21.0 · Source § fn min (self, other: Self) -> Self where Self: Sized , Compares and returns the minimum of two values. Read more 1.50.0 · Source § fn clamp (self, min: Self, max: Self) -> Self where Self: Sized , Restrict a value to a certain interval. Read more 1.0.0 (const: unstable ) · Source § impl PartialEq for char Source § fn eq (&self, other: & char ) -> bool Tests for self and other values to be equal, and is used by == . Source § fn ne (&self, other: & char ) -> bool Tests for != . The default implementation is almost always sufficient, and should not be overridden without very good reason. 1.0.0 (const: unstable ) · Source § impl PartialOrd for char Source § fn partial_cmp (&self, other: & char ) -> Option < Ordering > This method returns an ordering between self and other values if one exists. Read more Source § fn lt (&self, other: & char ) -> bool Tests less than (for self and other ) and is used by the < operator. Read more Source § fn le (&self, other: & char ) -> bool Tests less than or equal to (for self and other ) and is used by the <= operator. Read more Source § fn gt (&self, other: & char ) -> bool Tests greater than (for self and other ) and is used by the > operator. Read more Source § fn ge (&self, other: & char ) -> bool Tests greater than or equal to (for self and other ) and is used by the >= operator. Read more Source § impl Pattern for char Searches for chars that are equal to a given char . § Examples assert_eq! ( "Hello world" .find( 'o' ), Some ( 4 )); Source § type Searcher <'a> = CharSearcher <'a> 🔬 This is a nightly-only experimental API. ( pattern #27721 ) Associated searcher for this pattern Source § fn into_searcher <'a>(self, haystack: &'a str ) -> < char as Pattern >:: Searcher <'a> 🔬 This is a nightly-only experimental API. ( pattern #27721 ) Constructs the associated searcher from self and the haystack to search in. Source § fn is_contained_in (self, haystack: & str ) -> bool 🔬 This is a nightly-only experimental API. ( pattern #27721 ) Checks whether the pattern matches anywhere in the haystack Source § fn is_prefix_of (self, haystack: & str ) -> bool 🔬 This is a nightly-only experimental API. ( pattern #27721 ) Checks whether the pattern matches at the front of the haystack Source § fn strip_prefix_of (self, haystack: & str ) -> Option <& str > 🔬 This is a nightly-only experimental API. ( pattern #27721 ) Removes the pattern from the front of haystack, if it matches. Source § fn is_suffix_of <'a>(self, haystack: &'a str ) -> bool where < char as Pattern >:: Searcher <'a>: ReverseSearcher <'a>, 🔬 This is a nightly-only experimental API. ( pattern #27721 ) Checks whether the pattern matches at the back of the haystack Source § fn strip_suffix_of <'a>(self, haystack: &'a str ) -> Option <&'a str > where < char as Pattern >:: Searcher <'a>: ReverseSearcher <'a>, 🔬 This is a nightly-only experimental API. ( pattern #27721 ) Removes the pattern from the back of haystack, if it matches. Source § fn as_utf8_pattern (&self) -> Option < Utf8Pattern <'_>> 🔬 This is a nightly-only experimental API. ( pattern #27721 ) Returns the pattern as utf-8 bytes if possible. Source § impl RangePattern for char Source § const MIN : char = '\0' 🔬 This is a nightly-only experimental API. ( pattern_t | 2026-01-13T09:29:14 |
https://l.facebook.com/l.php?u=https%3A%2F%2Fwww.instagram.com%2F&h=AT3hyGQQ8TdV7F9trEbiUOMbwLHEOrEJ7pcr6bOJ42nK2eSwc-3siSykggmzOYkYVjA9XqKki32d7t5W-fn8b8qvaoUg6vcaFj3n1ogkUtG4zPDHXHKNZ5DLdYKqwf3fR5aR0c-sI8BoOCgO | Facebook Facebook 이메일 또는 휴대폰 비밀번호 계정을 잊으셨나요? 새 계정 만들기 일시적으로 차단됨 일시적으로 차단됨 회원님의 이 기능 사용 속도가 너무 빠른 것 같습니다. 이 기능 사용에서 일시적으로 차단되었습니다. Back 한국어 English (US) Tiếng Việt Bahasa Indonesia ภาษาไทย Español 中文(简体) 日本語 Português (Brasil) Français (France) Deutsch 가입하기 로그인 Messenger Facebook Lite 동영상 Meta Pay Meta 스토어 Meta Quest Ray-Ban Meta Meta AI Meta AI 콘텐츠 더 보기 Instagram Threads 투표 정보 센터 개인정보처리방침 개인정보 보호 센터 정보 광고 만들기 페이지 만들기 개발자 채용 정보 쿠키 AdChoices 이용 약관 고객 센터 연락처 업로드 및 비사용자 설정 활동 로그 Meta © 2026 | 2026-01-13T09:29:14 |
https://l.facebook.com/l.php?u=https%3A%2F%2Fwww.instagram.com%2F&h=AT3c4OHB9ZlGJq0GZx_TOny4SilA_kpxG7lO7a9QlIiQv-iVzM1MS_YaoJXemfrgxnwTpmcyZs5iKHVBaLSIWAPCS7xilkI_SIG9Ewr-8rMLhG6YjEoLiK48mBXlNEcaTydg1WMN1puVSiXq | Facebook Facebook 이메일 또는 휴대폰 비밀번호 계정을 잊으셨나요? 새 계정 만들기 일시적으로 차단됨 일시적으로 차단됨 회원님의 이 기능 사용 속도가 너무 빠른 것 같습니다. 이 기능 사용에서 일시적으로 차단되었습니다. Back 한국어 English (US) Tiếng Việt Bahasa Indonesia ภาษาไทย Español 中文(简体) 日本語 Português (Brasil) Français (France) Deutsch 가입하기 로그인 Messenger Facebook Lite 동영상 Meta Pay Meta 스토어 Meta Quest Ray-Ban Meta Meta AI Meta AI 콘텐츠 더 보기 Instagram Threads 투표 정보 센터 개인정보처리방침 개인정보 보호 센터 정보 광고 만들기 페이지 만들기 개발자 채용 정보 쿠키 AdChoices 이용 약관 고객 센터 연락처 업로드 및 비사용자 설정 활동 로그 Meta © 2026 | 2026-01-13T09:29:14 |
https://doc.rust-lang.org/reference/expressions.html#expression-attributes | Expressions - The Rust Reference Keyboard shortcuts Press ← or → to navigate between chapters Press S or / to search in the book Press ? to show this help Press Esc to hide this help Auto Light Rust Coal Navy Ayu The Rust Reference [expr] Expressions [expr .syntax] Syntax Expression → ExpressionWithoutBlock | ExpressionWithBlock ExpressionWithoutBlock → OuterAttribute * ( LiteralExpression | PathExpression | OperatorExpression | GroupedExpression | ArrayExpression | AwaitExpression | IndexExpression | TupleExpression | TupleIndexingExpression | StructExpression | CallExpression | MethodCallExpression | FieldExpression | ClosureExpression | AsyncBlockExpression | ContinueExpression | BreakExpression | RangeExpression | ReturnExpression | UnderscoreExpression | MacroInvocation ) ExpressionWithBlock → OuterAttribute * ( BlockExpression | ConstBlockExpression | UnsafeBlockExpression | LoopExpression | IfExpression | MatchExpression ) Show Railroad Expression ExpressionWithoutBlock ExpressionWithBlock ExpressionWithoutBlock OuterAttribute LiteralExpression PathExpression OperatorExpression GroupedExpression ArrayExpression AwaitExpression IndexExpression TupleExpression TupleIndexingExpression StructExpression CallExpression MethodCallExpression FieldExpression ClosureExpression AsyncBlockExpression ContinueExpression BreakExpression RangeExpression ReturnExpression UnderscoreExpression MacroInvocation ExpressionWithBlock OuterAttribute BlockExpression ConstBlockExpression UnsafeBlockExpression LoopExpression IfExpression MatchExpression [expr .intro] An expression may have two roles: it always produces a value , and it may have effects (otherwise known as “side effects”). [expr .evaluation] An expression evaluates to a value, and has effects during evaluation . [expr .operands] Many expressions contain sub-expressions, called the operands of the expression. [expr .behavior] The meaning of each kind of expression dictates several things: Whether or not to evaluate the operands when evaluating the expression The order in which to evaluate the operands How to combine the operands’ values to obtain the value of the expression [expr .structure] In this way, the structure of expressions dictates the structure of execution. Blocks are just another kind of expression, so blocks, statements, expressions, and blocks again can recursively nest inside each other to an arbitrary depth. Note We give names to the operands of expressions so that we may discuss them, but these names are not stable and may be changed. [expr .precedence] Expression precedence The precedence of Rust operators and expressions is ordered as follows, going from strong to weak. Binary Operators at the same precedence level are grouped in the order given by their associativity. Operator/Expression Associativity Paths Method calls Field expressions left to right Function calls , array indexing ? Unary - ! * borrow as left to right * / % left to right + - left to right << >> left to right & left to right ^ left to right | left to right == != < > <= >= Require parentheses && left to right || left to right .. ..= Require parentheses = += -= *= /= %= &= |= ^= <<= >>= right to left return break closures [expr .operand-order] Evaluation order of operands [expr .operand-order .default] The following list of expressions all evaluate their operands the same way, as described after the list. Other expressions either don’t take operands or evaluate them conditionally as described on their respective pages. Dereference expression Error propagation expression Negation expression Arithmetic and logical binary operators Comparison operators Type cast expression Grouped expression Array expression Await expression Index expression Tuple expression Tuple index expression Struct expression Call expression Method call expression Field expression Break expression Range expression Return expression [expr .operand-order .operands-before-primary] The operands of these expressions are evaluated prior to applying the effects of the expression. Expressions taking multiple operands are evaluated left to right as written in the source code. Note Which subexpressions are the operands of an expression is determined by expression precedence as per the previous section. For example, the two next method calls will always be called in the same order: #![allow(unused)] fn main() { // Using vec instead of array to avoid references // since there is no stable owned array iterator // at the time this example was written. let mut one_two = vec![1, 2].into_iter(); assert_eq!( (1, 2), (one_two.next().unwrap(), one_two.next().unwrap()) ); } Note Since this is applied recursively, these expressions are also evaluated from innermost to outermost, ignoring siblings until there are no inner subexpressions. [expr .place-value] Place expressions and value expressions [expr .place-value .intro] Expressions are divided into two main categories: place expressions and value expressions; there is also a third, minor category of expressions called assignee expressions. Within each expression, operands may likewise occur in either place context or value context. The evaluation of an expression depends both on its own category and the context it occurs within. [expr .place-value .place-memory-location] A place expression is an expression that represents a memory location. [expr .place-value .place-expr-kinds] These expressions are paths which refer to local variables, static variables , dereferences ( *expr ), array indexing expressions ( expr[expr] ), field references ( expr.f ) and parenthesized place expressions. [expr .place-value .value-expr-kinds] All other expressions are value expressions. [expr .place-value .value-result] A value expression is an expression that represents an actual value. [expr .place-value .place-context] The following contexts are place expression contexts: The left operand of a compound assignment expression. The operand of a unary borrow , raw borrow or dereference operator. The operand of a field expression. The indexed operand of an array indexing expression. The operand of any implicit borrow . The initializer of a let statement . The scrutinee of an if let , match , or while let expression. The base of a functional update struct expression. Note Historically, place expressions were called lvalues and value expressions were called rvalues . [expr .place-value .assignee] An assignee expression is an expression that appears in the left operand of an assignment expression. Explicitly, the assignee expressions are: Place expressions. Underscores . Tuples of assignee expressions. Slices of assignee expressions. Tuple structs of assignee expressions. Structs of assignee expressions (with optionally named fields). Unit structs [expr .place-value .parenthesis] Arbitrary parenthesisation is permitted inside assignee expressions. [expr .move] Moved and copied types [expr .move .intro] When a place expression is evaluated in a value expression context, or is bound by value in a pattern, it denotes the value held in that memory location. [expr .move .copy] If the type of that value implements Copy , then the value will be copied. [expr .move .requires-sized] In the remaining situations, if that type is Sized , then it may be possible to move the value. [expr .move .movable-place] Only the following place expressions may be moved out of: Variables which are not currently borrowed. Temporary values . Fields of a place expression which can be moved out of and don’t implement Drop . The result of dereferencing an expression with type Box<T> and that can also be moved out of. [expr .move .deinitialization] After moving out of a place expression that evaluates to a local variable, the location is deinitialized and cannot be read from again until it is reinitialized. [expr .move .place-invalid] In all other cases, trying to use a place expression in a value expression context is an error. [expr .mut] Mutability [expr .mut .intro] For a place expression to be assigned to, mutably borrowed , implicitly mutably borrowed , or bound to a pattern containing ref mut , it must be mutable . We call these mutable place expressions . In contrast, other place expressions are called immutable place expressions . [expr .mut .valid-places] The following expressions can be mutable place expression contexts: Mutable variables which are not currently borrowed. Mutable static items . Temporary values . Fields : this evaluates the subexpression in a mutable place expression context. Dereferences of a *mut T pointer. Dereference of a variable, or field of a variable, with type &mut T . Note: This is an exception to the requirement of the next rule. Dereferences of a type that implements DerefMut : this then requires that the value being dereferenced is evaluated in a mutable place expression context. Array indexing of a type that implements IndexMut : this then evaluates the value being indexed, but not the index, in mutable place expression context. [expr .temporary] Temporaries When using a value expression in most place expression contexts, a temporary unnamed memory location is created and initialized to that value. The expression evaluates to that location instead, except if promoted to a static . The drop scope of the temporary is usually the end of the enclosing statement. [expr .super-macros] Super macros [expr .super-macros .intro] Certain built-in macros may create temporaries whose scopes may be extended . These temporaries are super temporaries and these macros are super macros . Invocations of these macros are super macro call expressions . Arguments to these macros may be super operands . Note When a super macro call expression is an extending expression , its super operands are extending expressions and the scopes of the super temporaries are extended . See destructors.scope.lifetime-extension.exprs . [expr .super-macros .format_args] format_args! [expr .super-macros .format_args .super-operands] Except for the format string argument, all arguments passed to format_args! are super operands . #![allow(unused)] fn main() { fn temp() -> String { String::from("") } // Due to the call being an extending expression and the argument // being a super operand, the inner block is an extending expression, // so the scope of the temporary created in its trailing expression // is extended. let _ = format_args!("{}", { &temp() }); // OK } [expr .super-macros .format_args .super-temporaries] The super operands of format_args! are implicitly borrowed and are therefore place expression contexts . When a value expression is passed as an argument, it creates a super temporary . #![allow(unused)] fn main() { fn temp() -> String { String::from("") } let x = format_args!("{}", temp()); x; // <-- The temporary is extended, allowing use here. } The expansion of a call to format_args! sometimes creates other internal super temporaries . #![allow(unused)] fn main() { let x = { // This call creates an internal temporary. let x = format_args!("{:?}", 0); x // <-- The temporary is extended, allowing its use here. }; // <-- The temporary is dropped here. x; // ERROR } #![allow(unused)] fn main() { // This call doesn't create an internal temporary. let x = { let x = format_args!("{}", 0); x }; x; // OK } Note The details of when format_args! does or does not create internal temporaries are currently unspecified. [expr .super-macros .pin] pin! [expr .super-macros .pin .super-operands] The argument to pin! is a super operand . #![allow(unused)] fn main() { use core::pin::pin; fn temp() {} // As above for `format_args!`. let _ = pin!({ &temp() }); // OK } [expr .super-macros .pin .super-temporaries] The argument to pin! is a value expression context and creates a super temporary . #![allow(unused)] fn main() { use core::pin::pin; fn temp() {} // The argument is evaluated into a super temporary. let x = pin!(temp()); // The temporary is extended, allowing its use here. x; // OK } [expr .implicit-borrow] Implicit borrows [expr .implicit-borrow-intro] Certain expressions will treat an expression as a place expression by implicitly borrowing it. For example, it is possible to compare two unsized slices for equality directly, because the == operator implicitly borrows its operands: #![allow(unused)] fn main() { let c = [1, 2, 3]; let d = vec![1, 2, 3]; let a: &[i32]; let b: &[i32]; a = &c; b = &d; // ... *a == *b; // Equivalent form: ::std::cmp::PartialEq::eq(&*a, &*b); } [expr .implicit-borrow .application] Implicit borrows may be taken in the following expressions: Left operand in method-call expressions. Left operand in field expressions. Left operand in call expressions . Left operand in array indexing expressions. Operand of the dereference operator ( * ). Operands of comparison . Left operands of the compound assignment . Arguments to format_args! except the format string. [expr .overload] Overloading traits Many of the following operators and expressions can also be overloaded for other types using traits in std::ops or std::cmp . These traits also exist in core::ops and core::cmp with the same names. [expr .attr] Expression attributes [expr .attr .restriction] Outer attributes before an expression are allowed only in a few specific cases: Before an expression used as a statement . Elements of array expressions , tuple expressions , call expressions , and tuple-style struct expressions. The tail expression of block expressions . [expr .attr .never-before] They are never allowed before: Range expressions. Binary operator expressions ( ArithmeticOrLogicalExpression , ComparisonExpression , LazyBooleanExpression , TypeCastExpression , AssignmentExpression , CompoundAssignmentExpression ). | 2026-01-13T09:29:14 |
https://www.facebook.com/reg/?entry_point=login&amp%3Bnext=https%3A%2F%2Fwww.facebook.com%2Fshare_channel%2F%3Ftype%3Dreshare%26link%3Dhttps%253A%252F%252Fdev.to%252Ftauri%252Ftauri-10-release-candidate-53jk%26app_id%3D966242223397117%26source_surface%3Dexternal_reshare%26display%26hashtag | Facebook Facebook 이메일 또는 휴대폰 비밀번호 계정을 잊으셨나요? 새 계정 만들기 일시적으로 차단됨 일시적으로 차단됨 회원님의 이 기능 사용 속도가 너무 빠른 것 같습니다. 이 기능 사용에서 일시적으로 차단되었습니다. Back 한국어 English (US) Tiếng Việt Bahasa Indonesia ภาษาไทย Español 中文(简体) 日本語 Português (Brasil) Français (France) Deutsch 가입하기 로그인 Messenger Facebook Lite 동영상 Meta Pay Meta 스토어 Meta Quest Ray-Ban Meta Meta AI Meta AI 콘텐츠 더 보기 Instagram Threads 투표 정보 센터 개인정보처리방침 개인정보 보호 센터 정보 광고 만들기 페이지 만들기 개발자 채용 정보 쿠키 AdChoices 이용 약관 고객 센터 연락처 업로드 및 비사용자 설정 활동 로그 Meta © 2026 | 2026-01-13T09:29:14 |
https://doc.rust-lang.org/std/io/trait.Read.html#tymethod.read | Read in std::io - Rust This old browser is unsupported and will most likely display funky things. Read std 1.92.0 (ded5c06cf 2025-12-08) Read Sections Examples Required Methods read Provided Methods by_ref bytes chain is_read_vectored read_buf read_buf_exact read_exact read_to_end read_to_string read_vectored take Implementors In std::io std :: io Trait Read Copy item path 1.0.0 · Source pub trait Read { // Required method fn read (&mut self, buf: &mut [ u8 ]) -> Result < usize >; // Provided methods fn read_vectored (&mut self, bufs: &mut [ IoSliceMut <'_>]) -> Result < usize > { ... } fn is_read_vectored (&self) -> bool { ... } fn read_to_end (&mut self, buf: &mut Vec < u8 >) -> Result < usize > { ... } fn read_to_string (&mut self, buf: &mut String ) -> Result < usize > { ... } fn read_exact (&mut self, buf: &mut [ u8 ]) -> Result < () > { ... } fn read_buf (&mut self, buf: BorrowedCursor <'_>) -> Result < () > { ... } fn read_buf_exact (&mut self, cursor: BorrowedCursor <'_>) -> Result < () > { ... } fn by_ref (&mut self) -> &mut Self where Self: Sized { ... } fn bytes (self) -> Bytes <Self> ⓘ where Self: Sized { ... } fn chain <R: Read >(self, next: R) -> Chain <Self, R> ⓘ where Self: Sized { ... } fn take (self, limit: u64 ) -> Take <Self> ⓘ where Self: Sized { ... } } Expand description The Read trait allows for reading bytes from a source. Implementors of the Read trait are called ‘readers’. Readers are defined by one required method, read() . Each call to read() will attempt to pull bytes from this source into a provided buffer. A number of other methods are implemented in terms of read() , giving implementors a number of ways to read bytes while only needing to implement a single method. Readers are intended to be composable with one another. Many implementors throughout std::io take and provide types which implement the Read trait. Please note that each call to read() may involve a system call, and therefore, using something that implements BufRead , such as BufReader , will be more efficient. Repeated calls to the reader use the same cursor, so for example calling read_to_end twice on a File will only return the file’s contents once. It’s recommended to first call rewind() in that case. § Examples File s implement Read : use std::io; use std::io::prelude:: * ; use std::fs::File; fn main() -> io::Result<()> { let mut f = File::open( "foo.txt" ) ? ; let mut buffer = [ 0 ; 10 ]; // read up to 10 bytes f.read( &mut buffer) ? ; let mut buffer = Vec::new(); // read the whole file f.read_to_end( &mut buffer) ? ; // read into a String, so that you don't need to do the conversion. let mut buffer = String::new(); f.read_to_string( &mut buffer) ? ; // and more! See the other methods for more details. Ok (()) } Read from &str because &[u8] implements Read : use std::io::prelude:: * ; fn main() -> io::Result<()> { let mut b = "This string will be read" .as_bytes(); let mut buffer = [ 0 ; 10 ]; // read up to 10 bytes b.read( &mut buffer) ? ; // etc... it works exactly as a File does! Ok (()) } Required Methods § 1.0.0 · Source fn read (&mut self, buf: &mut [ u8 ]) -> Result < usize > Pull some bytes from this source into the specified buffer, returning how many bytes were read. This function does not provide any guarantees about whether it blocks waiting for data, but if an object needs to block for a read and cannot, it will typically signal this via an Err return value. If the return value of this method is Ok(n) , then implementations must guarantee that 0 <= n <= buf.len() . A nonzero n value indicates that the buffer buf has been filled in with n bytes of data from this source. If n is 0 , then it can indicate one of two scenarios: This reader has reached its “end of file” and will likely no longer be able to produce bytes. Note that this does not mean that the reader will always no longer be able to produce bytes. As an example, on Linux, this method will call the recv syscall for a TcpStream , where returning zero indicates the connection was shut down correctly. While for File , it is possible to reach the end of file and get zero as result, but if more data is appended to the file, future calls to read will return more data. The buffer specified was 0 bytes in length. It is not an error if the returned value n is smaller than the buffer size, even when the reader is not at the end of the stream yet. This may happen for example because fewer bytes are actually available right now (e. g. being close to end-of-file) or because read() was interrupted by a signal. As this trait is safe to implement, callers in unsafe code cannot rely on n <= buf.len() for safety. Extra care needs to be taken when unsafe functions are used to access the read bytes. Callers have to ensure that no unchecked out-of-bounds accesses are possible even if n > buf.len() . Implementations of this method can make no assumptions about the contents of buf when this function is called. It is recommended that implementations only write data to buf instead of reading its contents. Correspondingly, however, callers of this method in unsafe code must not assume any guarantees about how the implementation uses buf . The trait is safe to implement, so it is possible that the code that’s supposed to write to the buffer might also read from it. It is your responsibility to make sure that buf is initialized before calling read . Calling read with an uninitialized buf (of the kind one obtains via MaybeUninit<T> ) is not safe, and can lead to undefined behavior. § Errors If this function encounters any form of I/O or other error, an error variant will be returned. If an error is returned then it must be guaranteed that no bytes were read. An error of the ErrorKind::Interrupted kind is non-fatal and the read operation should be retried if there is nothing else to do. § Examples File s implement Read : use std::io; use std::io::prelude:: * ; use std::fs::File; fn main() -> io::Result<()> { let mut f = File::open( "foo.txt" ) ? ; let mut buffer = [ 0 ; 10 ]; // read up to 10 bytes let n = f.read( &mut buffer[..]) ? ; println! ( "The bytes: {:?}" , & buffer[..n]); Ok (()) } Provided Methods § 1.36.0 · Source fn read_vectored (&mut self, bufs: &mut [ IoSliceMut <'_>]) -> Result < usize > Like read , except that it reads into a slice of buffers. Data is copied to fill each buffer in order, with the final buffer written to possibly being only partially filled. This method must behave equivalently to a single call to read with concatenated buffers. The default implementation calls read with either the first nonempty buffer provided, or an empty one if none exists. Source fn is_read_vectored (&self) -> bool 🔬 This is a nightly-only experimental API. ( can_vector #69941 ) Determines if this Read er has an efficient read_vectored implementation. If a Read er does not override the default read_vectored implementation, code using it may want to avoid the method all together and coalesce writes into a single buffer for higher performance. The default implementation returns false . 1.0.0 · Source fn read_to_end (&mut self, buf: &mut Vec < u8 >) -> Result < usize > Reads all bytes until EOF in this source, placing them into buf . All bytes read from this source will be appended to the specified buffer buf . This function will continuously call read() to append more data to buf until read() returns either Ok(0) or an error of non- ErrorKind::Interrupted kind. If successful, this function will return the total number of bytes read. § Errors If this function encounters an error of the kind ErrorKind::Interrupted then the error is ignored and the operation will continue. If any other read error is encountered then this function immediately returns. Any bytes which have already been read will be appended to buf . § Examples File s implement Read : use std::io; use std::io::prelude:: * ; use std::fs::File; fn main() -> io::Result<()> { let mut f = File::open( "foo.txt" ) ? ; let mut buffer = Vec::new(); // read the whole file f.read_to_end( &mut buffer) ? ; Ok (()) } (See also the std::fs::read convenience function for reading from a file.) § Implementing read_to_end When implementing the io::Read trait, it is recommended to allocate memory using Vec::try_reserve . However, this behavior is not guaranteed by all implementations, and read_to_end may not handle out-of-memory situations gracefully. fn read_to_end( &mut self , dest_vec: &mut Vec<u8>) -> io::Result<usize> { let initial_vec_len = dest_vec.len(); loop { let src_buf = self .example_datasource.fill_buf() ? ; if src_buf.is_empty() { break ; } dest_vec.try_reserve(src_buf.len()) ? ; dest_vec.extend_from_slice(src_buf); // Any irreversible side effects should happen after `try_reserve` succeeds, // to avoid losing data on allocation error. let read = src_buf.len(); self .example_datasource.consume(read); } Ok (dest_vec.len() - initial_vec_len) } § Usage Notes read_to_end attempts to read a source until EOF, but many sources are continuous streams that do not send EOF. In these cases, read_to_end will block indefinitely. Standard input is one such stream which may be finite if piped, but is typically continuous. For example, cat file | my-rust-program will correctly terminate with an EOF upon closure of cat. Reading user input or running programs that remain open indefinitely will never terminate the stream with EOF (e.g. yes | my-rust-program ). Using .lines() with a BufReader or using read can provide a better solution 1.0.0 · Source fn read_to_string (&mut self, buf: &mut String ) -> Result < usize > Reads all bytes until EOF in this source, appending them to buf . If successful, this function returns the number of bytes which were read and appended to buf . § Errors If the data in this stream is not valid UTF-8 then an error is returned and buf is unchanged. See read_to_end for other error semantics. § Examples File s implement Read : use std::io; use std::io::prelude:: * ; use std::fs::File; fn main() -> io::Result<()> { let mut f = File::open( "foo.txt" ) ? ; let mut buffer = String::new(); f.read_to_string( &mut buffer) ? ; Ok (()) } (See also the std::fs::read_to_string convenience function for reading from a file.) § Usage Notes read_to_string attempts to read a source until EOF, but many sources are continuous streams that do not send EOF. In these cases, read_to_string will block indefinitely. Standard input is one such stream which may be finite if piped, but is typically continuous. For example, cat file | my-rust-program will correctly terminate with an EOF upon closure of cat. Reading user input or running programs that remain open indefinitely will never terminate the stream with EOF (e.g. yes | my-rust-program ). Using .lines() with a BufReader or using read can provide a better solution 1.6.0 · Source fn read_exact (&mut self, buf: &mut [ u8 ]) -> Result < () > Reads the exact number of bytes required to fill buf . This function reads as many bytes as necessary to completely fill the specified buffer buf . Implementations of this method can make no assumptions about the contents of buf when this function is called. It is recommended that implementations only write data to buf instead of reading its contents. The documentation on read has a more detailed explanation of this subject. § Errors If this function encounters an error of the kind ErrorKind::Interrupted then the error is ignored and the operation will continue. If this function encounters an “end of file” before completely filling the buffer, it returns an error of the kind ErrorKind::UnexpectedEof . The contents of buf are unspecified in this case. If any other read error is encountered then this function immediately returns. The contents of buf are unspecified in this case. If this function returns an error, it is unspecified how many bytes it has read, but it will never read more than would be necessary to completely fill the buffer. § Examples File s implement Read : use std::io; use std::io::prelude:: * ; use std::fs::File; fn main() -> io::Result<()> { let mut f = File::open( "foo.txt" ) ? ; let mut buffer = [ 0 ; 10 ]; // read exactly 10 bytes f.read_exact( &mut buffer) ? ; Ok (()) } Source fn read_buf (&mut self, buf: BorrowedCursor <'_>) -> Result < () > 🔬 This is a nightly-only experimental API. ( read_buf #78485 ) Pull some bytes from this source into the specified buffer. This is equivalent to the read method, except that it is passed a BorrowedCursor rather than [u8] to allow use with uninitialized buffers. The new data will be appended to any existing contents of buf . The default implementation delegates to read . This method makes it possible to return both data and an error but it is advised against. Source fn read_buf_exact (&mut self, cursor: BorrowedCursor <'_>) -> Result < () > 🔬 This is a nightly-only experimental API. ( read_buf #78485 ) Reads the exact number of bytes required to fill cursor . This is similar to the read_exact method, except that it is passed a BorrowedCursor rather than [u8] to allow use with uninitialized buffers. § Errors If this function encounters an error of the kind ErrorKind::Interrupted then the error is ignored and the operation will continue. If this function encounters an “end of file” before completely filling the buffer, it returns an error of the kind ErrorKind::UnexpectedEof . If any other read error is encountered then this function immediately returns. If this function returns an error, all bytes read will be appended to cursor . 1.0.0 · Source fn by_ref (&mut self) -> &mut Self where Self: Sized , Creates a “by reference” adapter for this instance of Read . The returned adapter also implements Read and will simply borrow this current reader. § Examples File s implement Read : use std::io; use std::io::Read; use std::fs::File; fn main() -> io::Result<()> { let mut f = File::open( "foo.txt" ) ? ; let mut buffer = Vec::new(); let mut other_buffer = Vec::new(); { let reference = f.by_ref(); // read at most 5 bytes reference.take( 5 ).read_to_end( &mut buffer) ? ; } // drop our &mut reference so we can use f again // original file still usable, read the rest f.read_to_end( &mut other_buffer) ? ; Ok (()) } 1.0.0 · Source fn bytes (self) -> Bytes <Self> ⓘ where Self: Sized , Transforms this Read instance to an Iterator over its bytes. The returned type implements Iterator where the Item is Result < u8 , io::Error > . The yielded item is Ok if a byte was successfully read and Err otherwise. EOF is mapped to returning None from this iterator. The default implementation calls read for each byte, which can be very inefficient for data that’s not in memory, such as File . Consider using a BufReader in such cases. § Examples File s implement Read : use std::io; use std::io::prelude:: * ; use std::io::BufReader; use std::fs::File; fn main() -> io::Result<()> { let f = BufReader::new(File::open( "foo.txt" ) ? ); for byte in f.bytes() { println! ( "{}" , byte ? ); } Ok (()) } 1.0.0 · Source fn chain <R: Read >(self, next: R) -> Chain <Self, R> ⓘ where Self: Sized , Creates an adapter which will chain this stream with another. The returned Read instance will first read all bytes from this object until EOF is encountered. Afterwards the output is equivalent to the output of next . § Examples File s implement Read : use std::io; use std::io::prelude:: * ; use std::fs::File; fn main() -> io::Result<()> { let f1 = File::open( "foo.txt" ) ? ; let f2 = File::open( "bar.txt" ) ? ; let mut handle = f1.chain(f2); let mut buffer = String::new(); // read the value into a String. We could use any Read method here, // this is just one example. handle.read_to_string( &mut buffer) ? ; Ok (()) } 1.0.0 · Source fn take (self, limit: u64 ) -> Take <Self> ⓘ where Self: Sized , Creates an adapter which will read at most limit bytes from it. This function returns a new instance of Read which will read at most limit bytes, after which it will always return EOF ( Ok(0) ). Any read errors will not count towards the number of bytes read and future calls to read() may succeed. § Examples File s implement Read : use std::io; use std::io::prelude:: * ; use std::fs::File; fn main() -> io::Result<()> { let f = File::open( "foo.txt" ) ? ; let mut buffer = [ 0 ; 5 ]; // read at most five bytes let mut handle = f.take( 5 ); handle.read( &mut buffer) ? ; Ok (()) } Implementors § 1.0.0 · Source § impl Read for & File 1.0.0 · Source § impl Read for & TcpStream 1.87.0 · Source § impl Read for & PipeReader 1.78.0 · Source § impl Read for & Stdin 1.0.0 · Source § impl Read for &[ u8 ] Read is implemented for &[u8] by copying from the slice. Note that reading updates the slice to point to the yet unread part. The slice will be empty when EOF is reached. 1.0.0 · Source § impl Read for File 1.0.0 · Source § impl Read for TcpStream 1.10.0 · Source § impl Read for UnixStream Available on Unix only. 1.0.0 · Source § impl Read for ChildStderr 1.0.0 · Source § impl Read for ChildStdout 1.73.0 · Source § impl Read for Arc < File > 1.0.0 · Source § impl Read for Empty 1.87.0 · Source § impl Read for PipeReader 1.0.0 · Source § impl Read for Repeat 1.0.0 · Source § impl Read for Stdin 1.0.0 · Source § impl Read for StdinLock <'_> 1.10.0 · Source § impl<'a> Read for &'a UnixStream Available on Unix only. 1.63.0 · Source § impl<A: Allocator > Read for VecDeque < u8 , A> Read is implemented for VecDeque<u8> by consuming bytes from the front of the VecDeque . 1.0.0 · Source § impl<R: Read + ? Sized > Read for &mut R 1.0.0 · Source § impl<R: Read + ? Sized > Read for Box <R> 1.0.0 · Source § impl<R: ? Sized + Read > Read for BufReader <R> 1.0.0 · Source § impl<T> Read for Cursor <T> where T: AsRef <[ u8 ]>, 1.0.0 · Source § impl<T: Read > Read for Take <T> 1.0.0 · Source § impl<T: Read , U: Read > Read for Chain <T, U> | 2026-01-13T09:29:14 |
https://doc.rust-lang.org/reference/expressions.html#railroad-Expression | Expressions - The Rust Reference Keyboard shortcuts Press ← or → to navigate between chapters Press S or / to search in the book Press ? to show this help Press Esc to hide this help Auto Light Rust Coal Navy Ayu The Rust Reference [expr] Expressions [expr .syntax] Syntax Expression → ExpressionWithoutBlock | ExpressionWithBlock ExpressionWithoutBlock → OuterAttribute * ( LiteralExpression | PathExpression | OperatorExpression | GroupedExpression | ArrayExpression | AwaitExpression | IndexExpression | TupleExpression | TupleIndexingExpression | StructExpression | CallExpression | MethodCallExpression | FieldExpression | ClosureExpression | AsyncBlockExpression | ContinueExpression | BreakExpression | RangeExpression | ReturnExpression | UnderscoreExpression | MacroInvocation ) ExpressionWithBlock → OuterAttribute * ( BlockExpression | ConstBlockExpression | UnsafeBlockExpression | LoopExpression | IfExpression | MatchExpression ) Show Railroad Expression ExpressionWithoutBlock ExpressionWithBlock ExpressionWithoutBlock OuterAttribute LiteralExpression PathExpression OperatorExpression GroupedExpression ArrayExpression AwaitExpression IndexExpression TupleExpression TupleIndexingExpression StructExpression CallExpression MethodCallExpression FieldExpression ClosureExpression AsyncBlockExpression ContinueExpression BreakExpression RangeExpression ReturnExpression UnderscoreExpression MacroInvocation ExpressionWithBlock OuterAttribute BlockExpression ConstBlockExpression UnsafeBlockExpression LoopExpression IfExpression MatchExpression [expr .intro] An expression may have two roles: it always produces a value , and it may have effects (otherwise known as “side effects”). [expr .evaluation] An expression evaluates to a value, and has effects during evaluation . [expr .operands] Many expressions contain sub-expressions, called the operands of the expression. [expr .behavior] The meaning of each kind of expression dictates several things: Whether or not to evaluate the operands when evaluating the expression The order in which to evaluate the operands How to combine the operands’ values to obtain the value of the expression [expr .structure] In this way, the structure of expressions dictates the structure of execution. Blocks are just another kind of expression, so blocks, statements, expressions, and blocks again can recursively nest inside each other to an arbitrary depth. Note We give names to the operands of expressions so that we may discuss them, but these names are not stable and may be changed. [expr .precedence] Expression precedence The precedence of Rust operators and expressions is ordered as follows, going from strong to weak. Binary Operators at the same precedence level are grouped in the order given by their associativity. Operator/Expression Associativity Paths Method calls Field expressions left to right Function calls , array indexing ? Unary - ! * borrow as left to right * / % left to right + - left to right << >> left to right & left to right ^ left to right | left to right == != < > <= >= Require parentheses && left to right || left to right .. ..= Require parentheses = += -= *= /= %= &= |= ^= <<= >>= right to left return break closures [expr .operand-order] Evaluation order of operands [expr .operand-order .default] The following list of expressions all evaluate their operands the same way, as described after the list. Other expressions either don’t take operands or evaluate them conditionally as described on their respective pages. Dereference expression Error propagation expression Negation expression Arithmetic and logical binary operators Comparison operators Type cast expression Grouped expression Array expression Await expression Index expression Tuple expression Tuple index expression Struct expression Call expression Method call expression Field expression Break expression Range expression Return expression [expr .operand-order .operands-before-primary] The operands of these expressions are evaluated prior to applying the effects of the expression. Expressions taking multiple operands are evaluated left to right as written in the source code. Note Which subexpressions are the operands of an expression is determined by expression precedence as per the previous section. For example, the two next method calls will always be called in the same order: #![allow(unused)] fn main() { // Using vec instead of array to avoid references // since there is no stable owned array iterator // at the time this example was written. let mut one_two = vec![1, 2].into_iter(); assert_eq!( (1, 2), (one_two.next().unwrap(), one_two.next().unwrap()) ); } Note Since this is applied recursively, these expressions are also evaluated from innermost to outermost, ignoring siblings until there are no inner subexpressions. [expr .place-value] Place expressions and value expressions [expr .place-value .intro] Expressions are divided into two main categories: place expressions and value expressions; there is also a third, minor category of expressions called assignee expressions. Within each expression, operands may likewise occur in either place context or value context. The evaluation of an expression depends both on its own category and the context it occurs within. [expr .place-value .place-memory-location] A place expression is an expression that represents a memory location. [expr .place-value .place-expr-kinds] These expressions are paths which refer to local variables, static variables , dereferences ( *expr ), array indexing expressions ( expr[expr] ), field references ( expr.f ) and parenthesized place expressions. [expr .place-value .value-expr-kinds] All other expressions are value expressions. [expr .place-value .value-result] A value expression is an expression that represents an actual value. [expr .place-value .place-context] The following contexts are place expression contexts: The left operand of a compound assignment expression. The operand of a unary borrow , raw borrow or dereference operator. The operand of a field expression. The indexed operand of an array indexing expression. The operand of any implicit borrow . The initializer of a let statement . The scrutinee of an if let , match , or while let expression. The base of a functional update struct expression. Note Historically, place expressions were called lvalues and value expressions were called rvalues . [expr .place-value .assignee] An assignee expression is an expression that appears in the left operand of an assignment expression. Explicitly, the assignee expressions are: Place expressions. Underscores . Tuples of assignee expressions. Slices of assignee expressions. Tuple structs of assignee expressions. Structs of assignee expressions (with optionally named fields). Unit structs [expr .place-value .parenthesis] Arbitrary parenthesisation is permitted inside assignee expressions. [expr .move] Moved and copied types [expr .move .intro] When a place expression is evaluated in a value expression context, or is bound by value in a pattern, it denotes the value held in that memory location. [expr .move .copy] If the type of that value implements Copy , then the value will be copied. [expr .move .requires-sized] In the remaining situations, if that type is Sized , then it may be possible to move the value. [expr .move .movable-place] Only the following place expressions may be moved out of: Variables which are not currently borrowed. Temporary values . Fields of a place expression which can be moved out of and don’t implement Drop . The result of dereferencing an expression with type Box<T> and that can also be moved out of. [expr .move .deinitialization] After moving out of a place expression that evaluates to a local variable, the location is deinitialized and cannot be read from again until it is reinitialized. [expr .move .place-invalid] In all other cases, trying to use a place expression in a value expression context is an error. [expr .mut] Mutability [expr .mut .intro] For a place expression to be assigned to, mutably borrowed , implicitly mutably borrowed , or bound to a pattern containing ref mut , it must be mutable . We call these mutable place expressions . In contrast, other place expressions are called immutable place expressions . [expr .mut .valid-places] The following expressions can be mutable place expression contexts: Mutable variables which are not currently borrowed. Mutable static items . Temporary values . Fields : this evaluates the subexpression in a mutable place expression context. Dereferences of a *mut T pointer. Dereference of a variable, or field of a variable, with type &mut T . Note: This is an exception to the requirement of the next rule. Dereferences of a type that implements DerefMut : this then requires that the value being dereferenced is evaluated in a mutable place expression context. Array indexing of a type that implements IndexMut : this then evaluates the value being indexed, but not the index, in mutable place expression context. [expr .temporary] Temporaries When using a value expression in most place expression contexts, a temporary unnamed memory location is created and initialized to that value. The expression evaluates to that location instead, except if promoted to a static . The drop scope of the temporary is usually the end of the enclosing statement. [expr .super-macros] Super macros [expr .super-macros .intro] Certain built-in macros may create temporaries whose scopes may be extended . These temporaries are super temporaries and these macros are super macros . Invocations of these macros are super macro call expressions . Arguments to these macros may be super operands . Note When a super macro call expression is an extending expression , its super operands are extending expressions and the scopes of the super temporaries are extended . See destructors.scope.lifetime-extension.exprs . [expr .super-macros .format_args] format_args! [expr .super-macros .format_args .super-operands] Except for the format string argument, all arguments passed to format_args! are super operands . #![allow(unused)] fn main() { fn temp() -> String { String::from("") } // Due to the call being an extending expression and the argument // being a super operand, the inner block is an extending expression, // so the scope of the temporary created in its trailing expression // is extended. let _ = format_args!("{}", { &temp() }); // OK } [expr .super-macros .format_args .super-temporaries] The super operands of format_args! are implicitly borrowed and are therefore place expression contexts . When a value expression is passed as an argument, it creates a super temporary . #![allow(unused)] fn main() { fn temp() -> String { String::from("") } let x = format_args!("{}", temp()); x; // <-- The temporary is extended, allowing use here. } The expansion of a call to format_args! sometimes creates other internal super temporaries . #![allow(unused)] fn main() { let x = { // This call creates an internal temporary. let x = format_args!("{:?}", 0); x // <-- The temporary is extended, allowing its use here. }; // <-- The temporary is dropped here. x; // ERROR } #![allow(unused)] fn main() { // This call doesn't create an internal temporary. let x = { let x = format_args!("{}", 0); x }; x; // OK } Note The details of when format_args! does or does not create internal temporaries are currently unspecified. [expr .super-macros .pin] pin! [expr .super-macros .pin .super-operands] The argument to pin! is a super operand . #![allow(unused)] fn main() { use core::pin::pin; fn temp() {} // As above for `format_args!`. let _ = pin!({ &temp() }); // OK } [expr .super-macros .pin .super-temporaries] The argument to pin! is a value expression context and creates a super temporary . #![allow(unused)] fn main() { use core::pin::pin; fn temp() {} // The argument is evaluated into a super temporary. let x = pin!(temp()); // The temporary is extended, allowing its use here. x; // OK } [expr .implicit-borrow] Implicit borrows [expr .implicit-borrow-intro] Certain expressions will treat an expression as a place expression by implicitly borrowing it. For example, it is possible to compare two unsized slices for equality directly, because the == operator implicitly borrows its operands: #![allow(unused)] fn main() { let c = [1, 2, 3]; let d = vec![1, 2, 3]; let a: &[i32]; let b: &[i32]; a = &c; b = &d; // ... *a == *b; // Equivalent form: ::std::cmp::PartialEq::eq(&*a, &*b); } [expr .implicit-borrow .application] Implicit borrows may be taken in the following expressions: Left operand in method-call expressions. Left operand in field expressions. Left operand in call expressions . Left operand in array indexing expressions. Operand of the dereference operator ( * ). Operands of comparison . Left operands of the compound assignment . Arguments to format_args! except the format string. [expr .overload] Overloading traits Many of the following operators and expressions can also be overloaded for other types using traits in std::ops or std::cmp . These traits also exist in core::ops and core::cmp with the same names. [expr .attr] Expression attributes [expr .attr .restriction] Outer attributes before an expression are allowed only in a few specific cases: Before an expression used as a statement . Elements of array expressions , tuple expressions , call expressions , and tuple-style struct expressions. The tail expression of block expressions . [expr .attr .never-before] They are never allowed before: Range expressions. Binary operator expressions ( ArithmeticOrLogicalExpression , ComparisonExpression , LazyBooleanExpression , TypeCastExpression , AssignmentExpression , CompoundAssignmentExpression ). | 2026-01-13T09:29:14 |
https://www.mkdocs.org/about/release-notes/ | Release Notes - MkDocs MkDocs Home Getting Started User Guide User Guide Installation Writing Your Docs Choosing Your Theme Customizing Your Theme Localizing Your Theme Configuration Command Line Interface Deploying Your Docs Developer Guide Developer Guide Themes Translations Plugins API Reference About Release Notes Contributing License Search Previous Next Edit on GitHub Release Notes Upgrading Maintenance team Version 1.6.1 (2024-08-30) Version 1.6.0 (2024-04-20) Version 1.5.3 (2023-09-18) Version 1.5.2 (2023-08-02) Version 1.5.1 (2023-07-28) Version 1.5.0 (2023-07-26) Version 1.4.3 (2023-05-02) Version 1.4.2 (2022-11-01) Version 1.4.1 (2022-10-15) Version 1.4.0 (2022-09-27) Version 1.3.1 (2022-07-19) Version 1.3.0 (2022-03-26) Version 1.2.4 (2022-03-26) Version 1.2.3 (2021-10-12) Version 1.2.2 (2021-07-18) Version 1.2.1 (2021-06-09) Version 1.2 (2021-06-04) Version 1.1.2 (2020-05-14) Version 1.1.1 (2020-05-12) Version 1.1 (2020-02-22) Version 1.0.4 (2018-09-07) Version 1.0.3 (2018-08-29) Version 1.0.2 (2018-08-22) Version 1.0.1 (2018-08-13) Version 1.0 (2018-08-03) Version 0.17.5 (2018-07-06) Version 0.17.4 (2018-06-08) Version 0.17.3 (2018-03-07) Version 0.17.2 (2017-11-15) Version 0.17.1 (2017-10-30) Version 0.17.0 (2017-10-19) Version 0.16.3 (2017-04-04) Version 0.16.2 (2017-03-13) Version 0.16.1 (2016-12-22) Version 0.16 (2016-11-04) Version 0.15.3 (2016-02-18) Version 0.15.2 (2016-02-08) Version 0.15.1 (2016-01-30) Version 0.15.0 (2016-01-21) Version 0.14.0 (2015-06-09) Version 0.13.3 (2015-06-02) Version 0.13.2 (2015-05-30) Version 0.13.1 (2015-05-27) Version 0.13.0 (2015-05-26) Version 0.12.2 (2015-04-22) Version 0.12.1 (2015-04-14) Version 0.12.0 (2015-04-14) Version 0.11.1 (2014-11-20) Version 0.11.0 (2014-11-18) Version 0.10.0 (2014-10-29) Release Notes Upgrading To upgrade MkDocs to the latest version, use pip: pip install -U mkdocs You can determine your currently installed version using mkdocs --version : $ mkdocs --version mkdocs, version 1.5.0 from /path/to/mkdocs (Python 3.10) Maintenance team The current and past members of the MkDocs team. @tomchristie @d0ugal @waylan @oprypin @ultrabug Version 1.6.1 (2024-08-30) Fixed Fix build error when environment variable SOURCE_DATE_EPOCH=0 is set. #3795 Fix build error when mkdocs_theme.yml config is empty. #3700 Support python -W and PYTHONWARNINGS instead of overriding the configuration. #3809 Support running with Docker under strict mode, by removing 0.0.0.0 dev server warning. #3784 Drop unnecessary changefreq from sitemap.xml . #3629 Fix JavaScript console error when closing menu dropdown. #3774 Fix JavaScript console error that occur on repeated clicks. #3730 Fix JavaScript console error that can occur on dropdown selections. #3694 Added Added translations for Dutch. #3804 Added and updated translations for Chinese (Simplified). #3684 Version 1.6.0 (2024-04-20) Local preview mkdocs serve no longer locks up the browser when more than 5 tabs are open. This is achieved by closing the polling connection whenever a tab becomes inactive. Background tabs will no longer auto-reload either - that will instead happen as soon the tab is opened again. Context: #3391 New flag serve --open to open the site in a browser. After the first build is finished, this flag will cause the default OS Web browser to be opened at the home page of the local site. Context: #3500 Drafts Changed from version 1.5 The exclude_docs config was split up into two separate concepts. The exclude_docs config no longer has any special behavior for mkdocs serve - it now always completely excludes the listed documents from the site. If you wish to use the "drafts" functionality like the exclude_docs key used to do in MkDocs 1.5, please switch to the new config key draft_docs . See documentation . Other changes: Reduce warning levels when a "draft" page has a link to a non-existent file. Context: #3449 Update to deduction of page titles MkDocs 1.5 had a change in behavior in deducing the page titles from the first heading. Unfortunately this could cause unescaped HTML tags or entities to appear in edge cases. Now tags are always fully sanitized from the title. Though it still remains the case that Page.title is expected to contain HTML entities and is passed directly to the themes. Images (notably, emojis in some extensions) get preserved in the title only through their alt attribute's value. Context: #3564 , #3578 Themes Built-in themes now also support Polish language ( #3613 ) "readthedocs" theme Fix: "readthedocs" theme can now correctly handle deeply nested nav configurations (over 2 levels deep), without confusedly expanding all sections and jumping around vertically. ( #3464 ) Fix: "readthedocs" theme now shows a link to the repository (with a generic logo) even when isn't one of the 3 known hosters. ( #3435 ) "readthedocs" theme now also has translation for the word "theme" in the footer that mistakenly always remained in English. ( #3613 , #3625 ) "mkdocs" theme The "mkdocs" theme got a big update to a newer version of Bootstrap, meaning a slight overhaul of styles. Colors (most notably of admonitions) have much better contrast. The "mkdocs" theme now has support for dark mode - both automatic (based on the OS/browser setting) and with a manual toggle. Both of these options are not enabled by default and need to be configured explicitly. See color_mode , user_color_mode_toggle in documentation . Possible breaking change jQuery is no longer included into the "mkdocs" theme. If you were relying on it in your scripts, you will need to separately add it first (into mkdocs.yml) as an extra script: extra_javascript: - https://code.jquery.com/jquery-3.7.1.min.js Or even better if the script file is copied and included from your docs dir. Context: #3493 , #3649 Configuration New " enabled " setting for all plugins You may have seen some plugins take up the convention of having a setting enabled: false (or usually controlled through an environment variable) to make the plugin do nothing. Now every plugin has this setting. Plugins can still choose to implement this config themselves and decide how it behaves (and unless they drop older versions of MkDocs, they still should for now), but now there's always a fallback for every plugin. See documentation . Context: #3395 Validation Validation of hyperlinks between pages Absolute links Historically, within Markdown, MkDocs only recognized relative links that lead to another physical *.md document (or media file). This is a good convention to follow because then the source pages are also freely browsable without MkDocs, for example on GitHub. Whereas absolute links were left unmodified (making them often not work as expected or, more recently, warned against). If you dislike having to always use relative links, now you can opt into absolute links and have them work correctly. If you set the setting validation.links.absolute_links to the new value relative_to_docs , all Markdown links starting with / will be understood as being relative to the docs_dir root. The links will then be validated for correctness according to all the other rules that were already working for relative links in prior versions of MkDocs. For the HTML output, these links will still be turned relative so that the site still works reliably. So, now any document (e.g. "dir1/foo.md") can link to the document "dir2/bar.md" as [link](/dir2/bar.md) , in addition to the previously only correct way [link](../dir2/bar.md) . You have to enable the setting, though. The default is still to just skip any processing of such links. See documentation . Context: #3485 Absolute links within nav Absolute links within the nav: config were also always skipped. It is now possible to also validate them in the same way with validation.nav.absolute_links . Though it makes a bit less sense because then the syntax is simply redundant with the syntax that comes without the leading slash. Anchors There is a new config setting that is recommended to enable warnings for: validation: anchors: warn Example of a warning that this can produce: WARNING - Doc file 'foo/example.md' contains a link '../bar.md#some-heading', but the doc 'foo/bar.md' does not contain an anchor '#some-heading'. Any of the below methods of declaring an anchor will be detected by MkDocs: ## Heading producing an anchor ## Another heading {#custom-anchor-for-heading-using-attr-list} <a id="raw-anchor"></a> [](){#markdown-anchor-using-attr-list} Plugins and extensions that insert anchors, in order to be compatible with this, need to be developed as treeprocessors that insert etree elements as their mode of operation, rather than raw HTML which is undetectable for this purpose. If you as a user are dealing with falsely reported missing anchors and there's no way to resolve this, you can choose to disable these messages by setting this option to ignore (and they are at INFO level by default anyway). See documentation . Context: #3463 Other changes: When the nav config is not specified at all, the not_in_nav setting (originally added in 1.5.0) gains an additional behavior: documents covered by not_in_nav will not be part of the automatically deduced navigation. Context: #3443 Fix: the !relative YAML tag for markdown_extensions (originally added in 1.5.0) - it was broken in many typical use cases. See documentation . Context: #3466 Config validation now exits on first error, to avoid showing bizarre secondary errors. Context: #3437 MkDocs used to shorten error messages for unexpected errors such as "file not found", but that is no longer the case, the full error message and stack trace will be possible to see (unless the error has a proper handler, of course). Context: #3445 Upgrades for plugin developers Plugins can add multiple handlers for the same event type, at multiple priorities See mkdocs.plugins.CombinedEvent in documentation . Context: #3448 Enabling true generated files and expanding the File API See documentation . There is a new pair of attributes File.content_string / content_bytes that becomes the official API for obtaining the content of a file and is used by MkDocs itself. This replaces the old approach where one had to manually read the file located at File.abs_src_path , although that is still the primary action that these new attributes do under the hood. The content of a File can be backed by a string and no longer has to be a real existing file at abs_src_path . It is possible to set the attribute File.content_string or File.content_bytes and it will take precedence over abs_src_path . Further, abs_src_path is no longer guaranteed to be present and can be None instead. MkDocs itself still uses physical files in all cases, but eventually plugins will appear that don't populate this attribute. There is a new constructor File.generated() that should be used by plugins instead of the File() constructor. It is much more convenient because one doesn't need to manually look up the values such as docs_dir and use_directory_urls . Its signature is one of: f = File.generated(config: MkDocsConfig, src_uri: str, content: str | bytes) f = File.generated(config: MkDocsConfig, src_uri: str, abs_src_path: str) This way, it is now extremely easy to add a virtual file even from a hook: def on_files(files: Files, config: MkDocsConfig): files.append(File.generated(config, 'fake/path.md', content="Hello, world!")) For large content it is still best to use physical files, but one no longer needs to manipulate the path by providing a fake unused docs_dir . There is a new attribute File.generated_by that arose by convention - for generated files it should be set to the name of the plugin (the key in the plugins: collection) that produced this file. This attribute is populated automatically when using the File.generated() constructor. It is possible to set the edit_uri attribute of a File , for example from a plugin or hook, to make it different from the default (equal to src_uri ), and this will be reflected in the edit link of the document. This can be useful because some pages aren't backed by a real file and are instead created dynamically from some other source file or script. So a hook could set the edit_uri to that source file or script accordingly. The File object now stores its original src_dir , dest_dir , use_directory_urls values as attributes. Fields of File are computed on demand but cached. Only the three above attributes are primary ones, and partly also dest_uri . This way, it is possible to, for example, overwrite dest_uri of a File , and abs_dest_path will be calculated based on it. However you need to clear the attribute first using del f.abs_dest_path , because the values are cached. File instances are now hashable (can be used as keys of a dict ). Two files can no longer be considered "equal" unless it's the exact same instance of File . Other changes: The internal storage of File objects inside a Files object has been reworked, so any plugins that choose to access Files._files will get a deprecation warning. The order of File objects inside a Files collection is no longer significant when automatically inferring the nav . They get forcibly sorted according to the default alphabetic order. Context: #3451 , #3463 Hooks and debugging Hook files can now import adjacent *.py files using the import statement. Previously this was possible to achieve only through a sys.path workaround. See the new mention in documentation . Context: #3568 Verbose -v log shows the sequence of plugin events in more detail - shows each invoked plugin one by one, not only the event type. Context: #3444 Deprecations Python 3.7 is no longer supported, Python 3.12 is officially supported. Context: #3429 The theme config file mkdocs_theme.yml no longer executes YAML tags. Context: #3465 The plugin event on_page_read_source is soft-deprecated because there is always a better alternative to it (see the new File API or just on_page_markdown , depending on the desired interaction). When multiple plugins/hooks apply this event handler, they trample over each other, so now there is a warning in that case. See documentation . Context: #3503 API deprecations It is no longer allowed to set File.page to a type other than Page or a subclass thereof. Context: #3443 - following the deprecation in version 1.5.3 and #3381 . Theme._vars is deprecated - use theme['foo'] instead of theme._vars['foo'] utils : modified_time() , get_html_path() , get_url_path() , is_html_file() , is_template_file() are removed. path_to_url() is deprecated. LiveReloadServer.watch() no longer accepts a custom callback. Context: #3429 Misc The sitemap.xml.gz file is slightly more reproducible and no longer changes on every build, but instead only once per day (upon a date change). Context: #3460 Other small improvements; see commit log . Version 1.5.3 (2023-09-18) Fix mkdocs serve sometimes locking up all browser tabs when navigating quickly ( #3390 ) Add many new supported languages for "search" plugin - update lunr-languages to 1.12.0 ( #3334 ) Bugfix (regression in 1.5.0): In "readthedocs" theme the styling of "breadcrumb navigation" was broken for nested pages ( #3383 ) Built-in themes now also support Chinese (Traditional, Taiwan) language ( #3154 ) Plugins can now set File.page to their own subclass of Page . There is also now a warning if File.page is set to anything other than a strict subclass of Page . ( #3367 , #3381 ) Note that just instantiating a Page sets the file automatically , so care needs to be taken not to create an unneeded Page . Other small improvements; see commit log . Version 1.5.2 (2023-08-02) Bugfix (regression in 1.5.0): Restore functionality of --no-livereload . ( #3320 ) Bugfix (regression in 1.5.0): The new page title detection would sometimes be unable to drop anchorlinks - fix that. ( #3325 ) Partly bring back pre-1.5 API: extra_javascript items will once again be mostly strings, and only sometimes ExtraScriptValue (when the extra script functionality is used). Plugins should be free to append strings to config.extra_javascript , but when reading the values, they must still make sure to read it as str(value) in case it is an ExtraScriptValue item. For querying the attributes such as .type you need to check isinstance first. Static type checking will guide you in that. ( #3324 ) See commit log . Version 1.5.1 (2023-07-28) Bugfix (regression in 1.5.0): Make it possible to treat ExtraScriptValue as a path. This lets some plugins still work despite the breaking change. Bugfix (regression in 1.5.0): Prevent errors for special setups that have 3 conflicting files, such as index.html , index.md and README.md ( #3314 ) See commit log . Version 1.5.0 (2023-07-26) New command mkdocs get-deps This command guesses the Python dependencies that a MkDocs site requires in order to build. It simply prints the PyPI packages that need to be installed. In the terminal it can be combined directly with an installation command as follows: pip install $(mkdocs get-deps) The idea is that right after running this command, you can directly follow it up with mkdocs build and it will almost always "just work", without needing to think which dependencies to install. The way it works is by scanning mkdocs.yml for themes: , plugins: , markdown_extensions: items and doing a reverse lookup based on a large list of known projects (catalog, see below). Of course, you're welcome to use a "virtualenv" with such a command. Also note that for environments that require stability (for example CI) directly installing deps in this way is not a very reliable approach as it precludes dependency pinning. The command allows overriding which config file is used (instead of mkdocs.yml in the current directory) as well as which catalog of projects is used (instead of downloading it from the default location). See mkdocs get-deps --help . Context: #3205 MkDocs has an official catalog of plugins Check out https://github.com/mkdocs/catalog and add all your general-purpose plugins, themes and extensions there, so that they can be looked up through mkdocs get-deps . This was renamed from "best-of-mkdocs" and received significant updates. In addition to pip installation commands, the page now shows the config boilerplate needed to add a plugin. Expanded validation of links Validated links in Markdown As you may know, within Markdown, MkDocs really only recognizes relative links that lead to another physical *.md document (or media file). This is a good convention to follow because then the source pages are also freely browsable without MkDocs, for example on GitHub. MkDocs knows that in the output it should turn those *.md links into *.html as appropriate, and it would also always tell you if such a link doesn't actually lead to an existing file. However, the checks for links were really loose and had many concessions. For example, links that started with / ("absolute") and links that ended with / were left as is and no warning was shown, which allowed such very fragile links to sneak into site sources: links that happen to work right now but get no validation and links that confusingly need an extra level of .. with use_directory_urls enabled. Now, in addition to validating relative links, MkDocs will print INFO messages for unrecognized types of links (including absolute links). They look like this: INFO - Doc file 'example.md' contains an absolute link '/foo/bar/', it was left as is. Did you mean 'foo/bar.md'? If you don't want any changes, not even the INFO messages, and wish to revert to the silence from MkDocs 1.4, add the following configs to mkdocs.yml ( not recommended): validation: absolute_links: ignore unrecognized_links: ignore If, on the opposite end, you want these to print WARNING messages and cause mkdocs build --strict to fail, you are recommended to configure these to warn instead. See documentation for actual recommended settings and more details. Context: #3283 Validated links in the nav Links to documents in the nav configuration now also have configurable validation, though with no changes to the defaults. You are welcomed to turn on validation for files that were forgotten and excluded from the nav. Example: validation: nav: omitted_files: warn absolute_links: warn This can make the following message appear with the WARNING level (as opposed to INFO as the only option previously), thus being caught by mkdocs --strict : INFO - The following pages exist in the docs directory, but are not included in the "nav" configuration: ... See documentation . Context: #3283 , #1755 Mark docs as intentionally "not in nav" There is a new config not_in_nav . With it, you can mark particular patterns of files as exempt from the above omitted_files warning type; no messages will be printed for them anymore. (As a corollary, setting this config to * is the same as ignoring omitted_files altogether.) This is useful if you generally like these warnings about files that were forgotten from the nav, but still have some pages that you knowingly excluded from the nav and just want to build and copy them. The not_in_nav config is a set of gitignore-like patterns. See the next section for an explanation of another such config. See documentation . Context: #3224 , #1888 Excluded doc files There is a new config exclude_docs that tells MkDocs to ignore certain files under docs_dir and not copy them to the built site as part of the build. Historically MkDocs would always ignore file names starting with a dot, and that's all. Now this is all configurable: you can un-ignore these and/or ignore more patterns of files. The exclude_docs config follows the .gitignore pattern format and is specified as a multiline YAML string. For example: exclude_docs: | *.py # Excludes e.g. docs/hooks/foo.py /requirements.txt # Excludes docs/requirements.txt Validation of links (described above) is also affected by exclude_docs . During mkdocs serve the messages explain the interaction, whereas during mkdocs build excluded files are as good as nonexistent. As an additional related change, if you have a need to have both README.md and index.md files in a directory but publish only one of them, you can now use this feature to explicitly ignore one of them and avoid warnings. See documentation . Context: #3224 Drafts Dropped from version 1.6: The exclude_docs config no longer applies the "drafts" functionality for mkdocs serve . This was renamed to draft_docs . The exclude_docs config has another behavior: all excluded Markdown pages will still be previewable in mkdocs serve only, just with a "DRAFT" marker on top. Then they will of course be excluded from mkdocs build or gh-deploy . If you don't want mkdocs serve to have any special behaviors and instead want it to perform completely normal builds, use the new flag mkdocs serve --clean . See documentation . Context: #3224 mkdocs serve no longer exits after build errors If there was an error (from the config or a plugin) during a site re-build, mkdocs serve used to exit after printing a stack trace. Now it will simply freeze the server until the author edits the files to fix the problem, and then will keep reloading. But errors on the first build still cause mkdocs serve to exit, as before. Context: #3255 Page titles will be deduced from any style of heading MkDocs always had the ability to infer the title of a page (if it's not specified in the nav ) based on the first line of the document, if it had a <h1> heading that had to written starting with the exact character # . Now any style of Markdown heading is understood ( #1886 ). Due to the previous simplistic parsing, it was also impossible to use attr_list attributes in that first heading ( #3136 ). Now that is also fixed. Markdown extensions can use paths relative to the current document This is aimed at extensions such as pymdownx.snippets or markdown_include.include : you can now specify their include paths to be relative to the currently rendered Markdown document, or relative to the docs_dir . Any other extension can of course also make use of the new !relative YAML tag. markdown_extensions: - pymdownx.snippets: base_path: !relative See documentation . Context: #2154 , #3258 <script> tags can specify type="module" and other attributes In extra_javascript , if you use the .mjs file extension or explicitly specify a type: module key, the script will be added with the type="module" attribute. defer: true and async: true keys are also available. See updated documentation for extra_javascript . At first this is only supported in built-in themes, other themes need to follow up, see below. Context: #3237 Changes for theme developers (action required!) Using the construct {% for script in extra_javascript %} is now fully obsolete because it cannot allow customizing the attributes of the <script> tag. It will keep working but blocks some of MkDocs' features. Instead, you now need to use config.extra_javascript (which was already the case for a while) and couple it with the new script_tag filter: {%- for script in config.extra_javascript %} {{ script | script_tag }} {%- endfor %} See documentation . Upgrades for plugin developers Breaking change: config.extra_javascript is no longer a plain list of strings, but instead a list of ExtraScriptValue items. So you can no longer treat the list values as strings. If you want to keep compatibility with old versions, just always reference the items as str(item) instead. And you can still append plain strings to the list if you wish. See information about <script> tags above. Context: #3237 File has a new attribute inclusion . Its value is calculated from both the exclude_docs and not_in_nav configs, and implements their behavior. Plugins can read this value or write to it. New File instances by default follow whatever the configs say, but plugins can choose to make this decision explicitly, per file. When creating a File , one can now set a dest_uri directly, rather than having to update it (and other dependent attributes) after creation. Context A new config option was added - DictOfItems . Similarly to ListOfItems , it validates a mapping of config options that all have the same type. Keys are arbitrary but always strings. Context: #3242 A new function get_plugin_logger was added. In order to opt into a standardized way for plugins to log messages, please use the idiom: log = mkdocs.plugins.get_plugin_logger(__name__) ... log.info("Hello, world") Context: #3245 SubConfig config option can be conveniently subclassed with a particular type of config specified. For example, class ExtraScript(SubConfig[ExtraScriptValue]): . To see how this is useful, search for this class in code. Context Bugfix: SubConfig had a bug where paths (from FilesystemObject options) were not made relative to the main config file as intended, because config_file_path was not properly inherited to it. This is now fixed. Context: #3265 Config members now have a way to avoid clashing with Python's reserved words. This is achieved by stripping a trailing underscore from each member's name. Example of adding an async boolean option that can be set by the user as async: true and read programmatically as config.async_ : class ExampleConfig(Config): async_ = Type(bool, default=False) Previously making a config key with a reserved name was impossible with new-style schemas. Context Theme has its attributes properly declared and gained new attributes theme.locale , theme.custom_dir . Some type annotations were made more precise. For example: The context parameter has gained the type TemplateContext ( TypedDict ). Context The classes Page , Section , Link now have a common base class StructureItem . Context Some methods stopped accepting Config and only accept MkDocsConfig as was originally intended. Context config.mdx_configs got a proper type. Context: #3229 Theme updates Built-in themes mostly stopped relying on <script defer> . This may affect some usages of extra_javascript , mainly remove the need for custom handling of "has the page fully loaded yet". Context: #3237 "mkdocs" theme now has a styling for > blockquotes, previously they were not distinguished at all. Context: #3291 "readthedocs" theme was updated to v1.2.0 according to upstream, with improved styles for <kbd> and breadcrumb navigation. Context: #3058 Both built-in themes had their version of highlight.js updated to 11.8.0, and jQuery updated to 3.6.0. Bug fixes Relative paths in the nav can traverse above the root Regression in 1.2 - relative paths in the nav could no longer traverse above the site's root and were truncated to the root. Although such traversal is discouraged and produces a warning, this was a documented behavior. The behavior is now restored. Context: #2752 , #3010 MkDocs can accept the config from stdin This can be used for config overrides on the fly. See updated section at the bottom of Configuration Inheritance . The command to use this is mkdocs build -f - . In previous versions doing this led to an error. Context New command line flags mkdocs --no-color build disables color output and line wrapping. This option is also available through an environment variable NO_COLOR=true . Context: #3282 mkdocs build --no-strict overrides the strict config to false . Context: #3254 mkdocs build -f - (described directly above). mkdocs serve --clean (described above). mkdocs serve --dirty is the new name of mkdocs serve --dirtyreload . Deprecations extra_javascript underwent a change that can break plugins in rare cases, and it requires attention from theme developers. See respective entries above. Python-Markdown was unpinned from <3.4 . That version is known to remove functionality. If you are affected by those removals, you can still choose to pin the version for yourself: Markdown <3.4 . Context: #3222 , #2892 mkdocs.utils.warning_filter now shows a warning about being deprecated. It does nothing since MkDocs 1.2. Consider get_plugin_logger or just logging under mkdocs.plugins.* instead. Context: #3008 Accessing the _vars attribute of a Theme is deprecated - just access the keys directly. Accessing the user_configs attribute of a Config is deprecated. Note: instead of config.user_configs[*]['theme']['custom_dir'] , please use the new attribute config.theme.custom_dir . Other small improvements; see commit log . Version 1.4.3 (2023-05-02) Bugfix: for the hooks feature, modules no longer fail to load if using some advanced Python features like dataclasses ( #3193 ) Bugfix: Don't create None sitemap entries if the page has no populated URL - affects sites that exclude some files from navigation ( 07a297b ) "readthedocs" theme: Accessibility: add aria labels to Home logo ( #3129 ) and search inputs ( #3046 ) "readthedocs" theme now supports hljs_style: config, same as "mkdocs" theme ( #3199 ) Translations: Built-in themes now also support Indonesian language ( #3154 ) Fixed zh_CN translation ( #3125 ) tr_TR translation becomes just tr - usage should remain unaffected ( #3195 ) See commit log . Version 1.4.2 (2022-11-01) Officially support Python 3.11 ( #3020 ) Tip: Simply upgrading to Python 3.11 can cut off 10-15% of your site's build time. Support multiple instances of the same plugin ( #3027 ) If a plugin is specified multiple times in the list under the plugins: config, that will create 2 (or more) instances of the plugin with their own config each. Previously this case was unforeseen and, as such, bugged. Now even though this works, by default a warning will appear from MkDocs anyway, unless the plugin adds a class variable supports_multiple_instances = True . Bugfix (regression in 1.4.1): Don't error when a plugin puts a plain string into warnings ( #3016 ) Bugfix: Relative links will always render with a trailing slash ( #3022 ) Previously under use_directory_urls , links from a sub-page to the main index page rendered as e.g. <a href="../.."> even though in all other cases the links look like <a href="../../"> . This caused unwanted behavior on some combinations of Web browsers and servers. Now this special-case bug was removed. Built-in "mkdocs" theme now also supports Norwegian language ( #3024 ) Plugin-related warnings look more readable ( #3016 ) See commit log . Version 1.4.1 (2022-10-15) Support theme-namespaced plugin loading ( #2998 ) Plugins' entry points can be named as 'sometheme/someplugin'. That will have the following outcome: If the current theme is 'sometheme', the plugin 'sometheme/someplugin' will always be preferred over 'someplugin'. If the current theme isn't 'sometheme', the only way to use this plugin is by specifying plugins: [sometheme/someplugin] . One can also specify plugins: ['/someplugin'] instead of plugins: ['someplugin'] to definitely avoid the theme-namespaced plugin. Bugfix: mkdocs serve will work correctly with non-ASCII paths and redirects ( #3001 ) Windows: 'colorama' is now a dependency of MkDocs, to ensure colorful log output ( #2987 ) Plugin-related config options have more reliable validation and error reporting ( #2997 ) Translation sub-commands of setup.py were completely dropped. See documentation [1] [2] for their new replacements ( #2990 ) The 'mkdocs' package (wheel and source) is now produced by Hatch build system and pyproject.toml instead of setup.py ( #2988 ) Other small improvements; see commit log . Version 1.4.0 (2022-09-27) Feature upgrades Hooks ( #2978 ) The new hooks: config allows you to add plugin-like event handlers from local Python files, without needing to set up and install an actual plugin. See documentation . edit_uri flexibility ( #2927 ) There is a new edit_uri_template: config. It works like edit_uri but more generally covers ways to construct an edit URL. See documentation . Additionally, the edit_uri functionality will now fully work even if repo_url is omitted ( #2928 ) Upgrades for plugin developers Note This release has big changes to the implementation of plugins and their configs. But, the intention is to have zero breaking changes in all reasonably common use cases. Or at the very least if a code fix is required, there should always be a way to stay compatible with older MkDocs versions. Please report if this release breaks something. Customize event order for plugin event handlers ( #2973 ) Plugins can now choose to set a priority value for their event handlers. This can override the old behavior where for each event type, the handlers are called in the order that their plugins appear in the plugins config . If this is set, events with higher priority are called first. Events without a chosen priority get a default of 0. Events that have the same priority are ordered as they appear in the config. Recommended priority values: 100 "first", 50 "early", 0 "default", -50 "late", -100 "last". As different plugins discover more precise relations to each other, the values should be further tweaked. See documentation . New events that persist across builds in mkdocs serve ( #2972 ) The new events are on_startup and on_shutdown . They run at the very beginning and very end of an mkdocs invocation. on_startup also receives information on how mkdocs was invoked (e.g. serve --dirtyreload ). See documentation . Replace File.src_path to not deal with backslashes ( #2930 ) The property src_path uses backslashes on Windows, which doesn't make sense as it's a virtual path. To not make a breaking change, there's no change to how this property is used, but now you should: Use File.src_uri instead of File.src_path and File.dest_uri instead of File.dest_path . These consistently use forward slashes, and are now the definitive source that MkDocs itself uses. See source code . As a related tip: you should also stop using os.path.* or pathlib.Path() to deal with these paths, and instead use posixpath.* or pathlib.PurePosixPath() MkDocs is type-annotated, ready for use with mypy ( #2941 , #2970 ) Type annotations for event handler methods ( #2931 ) MkDocs' plugin event methods now have type annotations. You might have been adding annotations to events already, but now they will be validated to match the original. See source code and documentation . One big update is that now you should annotate method parameters more specifically as config: defaults.MkDocsConfig instead of config: base.Config . This not only makes it clear that it is the main config of MkDocs itself , but also provides type-safe access through attributes of the object (see next section). See source code and documentation . Rework ConfigOption schemas as class-based ( #2962 ) When developing a plugin, the settings that it accepts used to be specified in the config_scheme variable on the plugin class. This approach is now soft-deprecated, and instead you should specify the config in a sub-class of base.Config . Old example: from mkdocs import plugins from mkdocs.config import base, config_options class MyPlugin(plugins.BasePlugin): config_scheme = ( ('foo', config_options.Type(int)), ('bar', config_options.Type(str, default='')), ) def on_page_markdown(self, markdown: str, *, config: base.Config, **kwargs): if self.config['foo'] < 5: if config['site_url'].startswith('http:'): return markdown + self.config['baz'] This code snippet actually has many mistakes but it will pass all type checks and silently run and even succeed in some cases. So, on to the new equivalent example, changed to new-style schema and attribute-based access: (Complaints from "mypy" added inline) from mkdocs import plugins from mkdocs.config import base, config_options as c class MyPluginConfig(base.Config): foo = c.Optional(c.Type(int)) bar = c.Type(str, default='') class MyPlugin(plugins.BasePlugin[MyPluginConfig]): def on_page_markdown(self, markdown: str, *, config: defaults.MkDocsConfig, **kwargs): if self.config.foo < 5: # Error, `foo` might be `None`, need to check first. if config.site_url.startswith('http:'): # Error, MkDocs' `site_url` also might be `None`. return markdown + self.config.baz # Error, no such attribute `baz`! This lets you notice the errors from a static type checker before running the code and fix them as such: class MyPlugin(plugins.BasePlugin[MyPluginConfig]): def on_page_markdown(self, markdown: str, *, config: defaults.MkDocsConfig, **kwargs): if self.config.foo is not None and self.config.foo < 5: # OK, `int < int` is valid. if (config.site_url or '').startswith('http:'): # OK, `str.startswith(str)` is valid. return markdown + self.config.bar # OK, `str + str` is valid. See documentation . Also notice that we had to explicitly mark the config attribute foo as Optional . The new-style config has all attributes marked as required by default, and specifying required=False or required=True is not allowed! New: config_options.Optional ( #2962 ) Wrapping something into Optional is conceptually similar to "I want the default to be None " -- and you have to express it like that, because writing default=None doesn't actually work. Breaking change: the method BaseConfigOption.is_required() was removed. Use .required instead. ( #2938 ) And even the required property should be mostly unused now. For class-based configs, there's a new definition for whether an option is "required": It has no default, and It is not wrapped into config_options.Optional . New: config_options.ListOfItems ( #2938 ) Defines a list of items that each must adhere to the same constraint. Kind of like a validated Type(list) Examples how to express a list of integers (with from mkdocs.config import config_options as c ): Description Code entry Required to specify foo = c.ListOfItems(c.Type(int)) Optional, default is [] foo = c.ListOfItems(c.Type(int), default=[]) Optional, default is None foo = c.Optional(c.ListOfItems(c.Type(int))) See more examples in documentation . Updated: config_options.SubConfig ( #2807 ) SubConfig used to silently ignore all validation of its config options. Now you should pass validate=True to it or just use new class-based configs where this became the default. So, it can be used to validate a nested sub-dict with all keys pre-defined and value types strictly validated. See examples in documentation . Other changes to config options URL 's default is now None instead of '' . This can still be checked for truthiness in the same way - if config.some_url: ( #2962 ) FilesystemObject is no longer abstract and can be used directly, standing for "file or directory" with optional existence checking ( #2938 ) Bug fixes: Fix SubConfig , ConfigItems , MarkdownExtensions to not leak values across different instances ( #2916 , #2290 ) SubConfig raises the correct kind of validation error without a stack trace ( #2938 ) Fix dot-separated redirect in config_options.Deprecated(moved_to) ( #2963 ) Tweaked logic for handling ConfigOption.default ( #2938 ) Deprecated config option classes: ConfigItems ( #2983 ), OptionallyRequired ( #2962 ), RepoURL ( #2927 ) Theme updates Styles of admonitions in "MkDocs" theme ( #2981 ): Update colors to increase contrast Apply admonition styles also to <details> tag, to support Markdown extensions that provide it ( pymdownx.details , callouts ) Built-in themes now also support these languages: Russian ( #2976 ) Turkish (Turkey) ( #2946 ) Ukrainian ( #2980 ) Future compatibility extra_css: and extra_javascript: warn if a backslash \ is passed to them. ( #2930 , #2984 ) Show DeprecationWarning s as INFO messages. ( #2907 ) If any plugin or extension that you use relies on deprecated functionality of other libraries, it is at risk of breaking in the near future. Plugin developers should address these in a timely manner. Avoid a dependency on importlib_metadata starting from Python 3.10 ( #2959 ) Drop support for Python 3.6 ( #2948 ) Incompatible changes to public APIs mkdocs.utils : create_media_urls and normalize_url warn if a backslash \ is passed to them. ( #2930 ) is_markdown_file stops accepting case-insensitive variants such as .MD , which is how MkDocs build was already operating. ( #2912 ) Hard-deprecated: modified_time , reduce_list , get_html_path , get_url_path , is_html_file , is_template_file . ( #2912 ) Miscellaneous If a plugin adds paths to watch in LiveReloadServer , it can now unwatch them. ( #2777 ) Bugfix (regression in 1.2): Support listening on an IPv6 address in mkdocs serve . ( #2951 ) Other small improvements; see commit log . Version 1.3.1 (2022-07-19) Pin Python-Markdown version to <3.4, thus excluding its latest release that breaks too many external extensions ( #2893 ) When a Markdown extension fails to load, print its name and traceback ( #2894 ) Bugfix for "readthedocs" theme (regression in 1.3.0): add missing space in breadcrumbs ( #2810 ) Bugfix: don't complain when a file "readme.md" (lowercase) exists, it's not recognized otherwise ( #2852 ) Built-in themes now also support these languages: Italian ( #2860 ) Other small improvements; see commit log . Version 1.3.0 (2022-03-26) Feature upgrades ReadTheDocs theme updated from v0.4.1 to v1.0.0 according to upstream ( #2585 ) The most notable changes: New option logo : Rather than displaying the site_name in the title, one can specify a path to an image to display instead. New option anonymize_ip for Google Analytics. Dependencies were upgraded: jQuery upgraded to 3.6.0, Modernizr.js dropped, and others. See documentation of config options for the theme Built-in themes now also support these languages: German ( #2633 ) Persian (Farsi) ( #2787 ) Support custom directories to watch when running mkdocs serve ( #2642 ) MkDocs by default watches the docs directory and the config file. Now there is a way to add more directories to watch for changes, either via the YAML watch key or the command line flag --watch . Normally MkDocs never reaches into any other directories (so this feature shouldn't be necessary), but some plugins and extensions may do so. See documentation . New --no-history option for gh_deploy ( #2594 ) Allows to discard the history of commits when deploying, and instead replace it with one root commit Bug fixes An XSS vulnerability when using the search function in built-in themes was fixed ( #2791 ) Setting the edit_uri option no longer erroneously adds a trailing slash to repo_url ( #2733 ) Miscellaneous Breaking change: the pages config option that was deprecated for a very long time now causes an error when used ( #2652 ) To fix the error, just change from pages to nav . Performance optimization: during startup of MkDocs, code and dependencies of other commands will not be imported ( #2714 ) The most visible effect of this is that dependencies of mkdocs serve will not be imported when mkdocs build is used. Recursively validate nav ( #2680 ) Validation of the nested nav structure has been reworked to report errors early and reliably. Some edge cases have been declared invalid. Other small improvements; see commit log . Version 1.2.4 (2022-03-26) Compatibility with Jinja2 3.1.0 ( #2800 ) Due to a breaking change in Jinja2, MkDocs would crash with the message AttributeError: module 'jinja2' has no attribute 'contextfilter' Version 1.2.3 (2021-10-12) Built-in themes now also support these languages: Simplified Chinese ( #2497 ) Japanese ( #2525 ) Brazilian Portuguese ( #2535 ) Spanish ( #2545 , previously #2396 ) Third-party plugins will take precedence over built-in plugins with the same name ( #2591 ) Bugfix: Fix ability to load translations for some languages: core support ( #2565 ) and search plugin support with fallbacks ( #2602 ) Bugfix (regression in 1.2): Prevent directory traversal in the dev server ( #2604 ) Bugfix (regression in 1.2): Prevent webserver warnings from being treated as a build failure in strict mode ( #2607 ) Bugfix: Correctly print colorful messages in the terminal on Windows ( #2606 ) Bugfix: Python version 3.10 was displayed incorrectly in --version ( #2618 ) Other small improvements; see commit log . Version 1.2.2 (2021-07-18) Bugfix (regression in 1.2): Fix serving files/paths with Unicode characters ( #2464 ) Bugfix (regression in 1.2): Revert livereload file watching to use polling observer ( #2477 ) This had to be done to reasonably support usages that span virtual filesystems such as non-native Docker and network mounts. This goes back to the polling approach, very similar to that was always used prior, meaning most of the same downsides with latency and CPU usage. Revert from 1.2: Remove the requirement of a site_url config and the restriction on use_directory_urls ( #2490 ) Bugfix (regression in 1.2): Don't require trailing slash in the URL when serving a directory index in mkdocs serve server ( #2507 ) Instead of showing a 404 error, detect if it's a directory and redirect to a path with a trailing slash added, like before. Bugfix: Fix gh_deploy with config-file in the current directory ( #2481 ) Bugfix: Fix reversed breadcrumbs in "readthedocs" theme ( #2179 ) Allow "mkdocs.yaml" as the file name when '--config' is not passed ( #2478 ) Stop treating ";" as a special character in URLs: urlparse -> urlsplit ( #2502 ) Improve build performance for sites with many pages (partly already done in 1.2) ( #2407 ) Version 1.2.1 (2021-06-09) Bugfix (regression in 1.2): Ensure 'gh-deploy' always pushes. Version 1.2 (2021-06-04) Major Additions to Version 1.2 Support added for Theme Localization ( #2299 ) The mkdocs and readthedocs themes now support language localization using the theme.locale parameter, which defaults to en (English). The only other supported languages in this release are fr (French) and es (Spanish). For details on using the provided translations, see the user guide . Note that translation will not happen by default. Users must first install the necessary dependencies with the following command: pip install 'mkdocs[i18n]' Translation contributions are welcome and detailed in the Translation Guide . Developers of third party themes may want to review the relevant section of the Theme Development Guide . Contributors who are updating the templates to the built-in themes should review the Contributing Guide . The lang setting of the search plugin now defaults to the language specified in theme.locale . Support added for Environment Variables in the configuration file ( #1954 ) Environments variables may now be specified in the configuration file with the !ENV tag. The value of the variable will be parsed by the YAML parser and converted to the appropriate type. somekey: !ENV VAR_NAME otherkey: !ENV [VAR_NAME, FALLBACK_VAR, 'default value'] See Environment Variables in the Configuration documentation for details. Support added for Configuration Inheritance ( #2218 ) A configuration file may now inherit from a parent configuration file. In the primary file set the INHERIT key to the relative path of the parent file. INHERIT: path/to/base.yml The two files will then be deep merged. See Configuration Inheritance for details. Update gh-deploy command ( #2170 ) The vendored (and modified) copy of ghp_import has been replaced with a dependency on the upstream library. As of version 1.0.0, ghp-import includes a Python API which makes it possible to call directly. MkDocs can now benefit from recent bug fixes and new features, including the following: A .nojekyll file is automatically included when deploying to GitHub Pages. The --shell flag is now available, which reportedly works better on Windows. Git author and committer environment variables should be respected ( #1383 ). Rework auto-reload and HTTP server for mkdocs serve ( #2385 ) mkdocs serve now uses a new underlying server + file | 2026-01-13T09:29:14 |
https://docs.serde.rs/serde_json/fn.from_reader.html | from_reader in serde_json - Rust Docs.rs serde_json-1.0.149 serde_json 1.0.149 Permalink Docs.rs crate page MIT OR Apache-2.0 Links Repository crates.io Source Owners dtolnay github:serde-rs:publish Dependencies indexmap ^2.2.3 normal optional itoa ^1.0 normal memchr ^2 normal serde_core ^1.0.220 normal zmij ^1.0 normal automod ^1.0.11 dev indoc ^2.0.2 dev ref-cast ^1.0.18 dev rustversion ^1.0.13 dev serde ^1.0.194 dev serde_bytes ^0.11.10 dev serde_derive ^1.0.166 dev serde_stacker ^0.1.8 dev trybuild ^1.0.108 dev serde ^1.0.220 normal Versions 100% of the crate is documented Platform x86_64-unknown-linux-gnu Feature flags docs.rs About docs.rs Badges Builds Metadata Shorthand URLs Download Rustdoc JSON Build queue Privacy policy Rust Rust website The Book Standard Library API Reference Rust by Example The Cargo Guide Clippy Documentation This old browser is unsupported and will most likely display funky things. from_reader serde_ json 1.0.149 from_ reader Sections Example Errors In crate serde_ json serde_json Function from_ reader Copy item path Source pub fn from_reader<R, T>(rdr: R) -> Result <T> where R: Read , T: DeserializeOwned , Available on crate feature std only. Expand description Deserialize an instance of type T from an I/O stream of JSON. The content of the I/O stream is deserialized directly from the stream without being buffered in memory by serde_json. When reading from a source against which short reads are not efficient, such as a File , you will want to apply your own buffering because serde_json will not buffer the input. See std::io::BufReader . It is expected that the input stream ends after the deserialized object. If the stream does not end, such as in the case of a persistent socket connection, this function will not return. It is possible instead to deserialize from a prefix of an input stream without looking for EOF by managing your own Deserializer . Note that counter to intuition, this function is usually slower than reading a file completely into memory and then applying from_str or from_slice on it. See issue #160 . § Example Reading the contents of a file. use serde::Deserialize; use std::error::Error; use std::fs::File; use std::io::BufReader; use std::path::Path; #[derive(Deserialize, Debug)] struct User { fingerprint: String, location: String, } fn read_user_from_file<P: AsRef<Path>>(path: P) -> Result <User, Box< dyn Error>> { // Open the file in read-only mode with buffer. let file = File::open(path) ? ; let reader = BufReader::new(file); // Read the JSON contents of the file as an instance of `User`. let u = serde_json::from_reader(reader) ? ; // Return the `User`. Ok (u) } fn main() { let u = read_user_from_file( "test.json" ).unwrap(); println! ( "{:#?}" , u); } Reading from a persistent socket connection. use serde::Deserialize; use std::error::Error; use std::io::BufReader; use std::net::{TcpListener, TcpStream}; #[derive(Deserialize, Debug)] struct User { fingerprint: String, location: String, } fn read_user_from_stream(stream: &mut BufReader<TcpStream>) -> Result <User, Box< dyn Error>> { let mut de = serde_json::Deserializer::from_reader(stream); let u = User::deserialize( &mut de) ? ; Ok (u) } fn main() { let listener = TcpListener::bind( "127.0.0.1:4000" ).unwrap(); for tcp_stream in listener.incoming() { let mut buffered = BufReader::new(tcp_stream.unwrap()); println! ( "{:#?}" , read_user_from_stream( &mut buffered)); } } § Errors This conversion can fail if the structure of the input does not match the structure expected by T , for example if T is a struct type but the input contains something other than a JSON map. It can also fail if the structure is correct but T ’s implementation of Deserialize decides that something is wrong with the data, for example required struct fields are missing from the JSON map or some number is too big to fit in the expected primitive type. | 2026-01-13T09:29:14 |
https://doc.rust-lang.org/std/error/trait.Error.html#method.source | Error in std::error - Rust This old browser is unsupported and will most likely display funky things. Error std 1.92.0 (ded5c06cf 2025-12-08) Error Sections Error source Example Provided Methods cause description provide source Methods downcast downcast downcast downcast_mut downcast_mut downcast_mut downcast_ref downcast_ref downcast_ref is is is sources Trait Implementations From<&str> From<&str> From<Cow<'b, str>> From<Cow<'b, str>> From<E> From<E> From<String> From<String> Implementors In std:: error std :: error Trait Error Copy item path 1.0.0 · Source pub trait Error: Debug + Display { // Provided methods fn source (&self) -> Option <&(dyn Error + 'static)> { ... } fn description (&self) -> & str { ... } fn cause (&self) -> Option <&dyn Error > { ... } fn provide <'a>(&'a self, request: &mut Request <'a>) { ... } } Expand description Error is a trait representing the basic expectations for error values, i.e., values of type E in Result<T, E> . Errors must describe themselves through the Display and Debug traits. Error messages are typically concise lowercase sentences without trailing punctuation: let err = "NaN" .parse::<u32>().unwrap_err(); assert_eq! (err.to_string(), "invalid digit found in string" ); § Error source Errors may provide cause information. Error::source() is generally used when errors cross “abstraction boundaries”. If one module must report an error that is caused by an error from a lower-level module, it can allow accessing that error via Error::source() . This makes it possible for the high-level module to provide its own errors while also revealing some of the implementation for debugging. In error types that wrap an underlying error, the underlying error should be either returned by the outer error’s Error::source() , or rendered by the outer error’s Display implementation, but not both. § Example Implementing the Error trait only requires that Debug and Display are implemented too. use std::error::Error; use std::fmt; use std::path::PathBuf; #[derive(Debug)] struct ReadConfigError { path: PathBuf } impl fmt::Display for ReadConfigError { fn fmt( & self , f: &mut fmt::Formatter< '_ >) -> fmt::Result { let path = self .path.display(); write! (f, "unable to read configuration at {path}" ) } } impl Error for ReadConfigError {} Provided Methods § 1.30.0 · Source fn source (&self) -> Option <&(dyn Error + 'static)> Returns the lower-level source of this error, if any. § Examples use std::error::Error; use std::fmt; #[derive(Debug)] struct SuperError { source: SuperErrorSideKick, } impl fmt::Display for SuperError { fn fmt( & self , f: &mut fmt::Formatter< '_ >) -> fmt::Result { write! (f, "SuperError is here!" ) } } impl Error for SuperError { fn source( & self ) -> Option < & ( dyn Error + 'static )> { Some ( & self .source) } } #[derive(Debug)] struct SuperErrorSideKick; impl fmt::Display for SuperErrorSideKick { fn fmt( & self , f: &mut fmt::Formatter< '_ >) -> fmt::Result { write! (f, "SuperErrorSideKick is here!" ) } } impl Error for SuperErrorSideKick {} fn get_super_error() -> Result <(), SuperError> { Err (SuperError { source: SuperErrorSideKick }) } fn main() { match get_super_error() { Err (e) => { println! ( "Error: {e}" ); println! ( "Caused by: {}" , e.source().unwrap()); } _ => println! ( "No error" ), } } 1.0.0 · Source fn description (&self) -> & str 👎 Deprecated since 1.42.0: use the Display impl or to_string() if let Err (e) = "xc" .parse::<u32>() { // Print `e` itself, no need for description(). eprintln! ( "Error: {e}" ); } 1.0.0 · Source fn cause (&self) -> Option <&dyn Error > 👎 Deprecated since 1.33.0: replaced by Error::source, which can support downcasting Source fn provide <'a>(&'a self, request: &mut Request <'a>) 🔬 This is a nightly-only experimental API. ( error_generic_member_access #99301 ) Provides type-based access to context intended for error reports. Used in conjunction with Request::provide_value and Request::provide_ref to extract references to member variables from dyn Error trait objects. § Example #![feature(error_generic_member_access)] use core::fmt; use core::error::{request_ref, Request}; #[derive(Debug)] enum MyLittleTeaPot { Empty, } #[derive(Debug)] struct MyBacktrace { // ... } impl MyBacktrace { fn new() -> MyBacktrace { // ... } } #[derive(Debug)] struct Error { backtrace: MyBacktrace, } impl fmt::Display for Error { fn fmt( & self , f: &mut fmt::Formatter< '_ >) -> fmt::Result { write! (f, "Example Error" ) } } impl std::error::Error for Error { fn provide< 'a >( & 'a self , request: &mut Request< 'a >) { request .provide_ref::<MyBacktrace>( & self .backtrace); } } fn main() { let backtrace = MyBacktrace::new(); let error = Error { backtrace }; let dyn_error = & error as & dyn std::error::Error; let backtrace_ref = request_ref::<MyBacktrace>(dyn_error).unwrap(); assert! (core::ptr::eq( & error.backtrace, backtrace_ref)); assert! (request_ref::<MyLittleTeaPot>(dyn_error).is_none()); } Implementations § Source § impl dyn Error 1.3.0 · Source pub fn is <T>(&self) -> bool where T: Error + 'static, Returns true if the inner type is the same as T . 1.3.0 · Source pub fn downcast_ref <T>(&self) -> Option < &T > where T: Error + 'static, Returns some reference to the inner value if it is of type T , or None if it isn’t. 1.3.0 · Source pub fn downcast_mut <T>(&mut self) -> Option < &mut T > where T: Error + 'static, Returns some mutable reference to the inner value if it is of type T , or None if it isn’t. Source § impl dyn Error + Send 1.3.0 · Source pub fn is <T>(&self) -> bool where T: Error + 'static, Forwards to the method defined on the type dyn Error . 1.3.0 · Source pub fn downcast_ref <T>(&self) -> Option < &T > where T: Error + 'static, Forwards to the method defined on the type dyn Error . 1.3.0 · Source pub fn downcast_mut <T>(&mut self) -> Option < &mut T > where T: Error + 'static, Forwards to the method defined on the type dyn Error . Source § impl dyn Error + Send + Sync 1.3.0 · Source pub fn is <T>(&self) -> bool where T: Error + 'static, Forwards to the method defined on the type dyn Error . 1.3.0 · Source pub fn downcast_ref <T>(&self) -> Option < &T > where T: Error + 'static, Forwards to the method defined on the type dyn Error . 1.3.0 · Source pub fn downcast_mut <T>(&mut self) -> Option < &mut T > where T: Error + 'static, Forwards to the method defined on the type dyn Error . Source § impl dyn Error Source pub fn sources (&self) -> Source <'_> ⓘ 🔬 This is a nightly-only experimental API. ( error_iter #58520 ) Returns an iterator starting with the current error and continuing with recursively calling Error::source . If you want to omit the current error and only use its sources, use skip(1) . § Examples #![feature(error_iter)] use std::error::Error; use std::fmt; #[derive(Debug)] struct A; #[derive(Debug)] struct B( Option <Box< dyn Error + 'static >>); impl fmt::Display for A { fn fmt( & self , f: &mut fmt::Formatter< '_ >) -> fmt::Result { write! (f, "A" ) } } impl fmt::Display for B { fn fmt( & self , f: &mut fmt::Formatter< '_ >) -> fmt::Result { write! (f, "B" ) } } impl Error for A {} impl Error for B { fn source( & self ) -> Option < & ( dyn Error + 'static )> { self . 0 .as_ref().map(|e| e.as_ref()) } } let b = B( Some (Box::new(A))); // let err : Box<Error> = b.into(); // or let err = & b as & dyn Error; let mut iter = err.sources(); assert_eq! ( "B" .to_string(), iter.next().unwrap().to_string()); assert_eq! ( "A" .to_string(), iter.next().unwrap().to_string()); assert! (iter.next().is_none()); assert! (iter.next().is_none()); Source § impl dyn Error 1.3.0 · Source pub fn downcast <T>(self: Box <dyn Error >) -> Result < Box <T>, Box <dyn Error >> where T: Error + 'static, Attempts to downcast the box to a concrete type. Source § impl dyn Error + Send 1.3.0 · Source pub fn downcast <T>( self: Box <dyn Error + Send >, ) -> Result < Box <T>, Box <dyn Error + Send >> where T: Error + 'static, Attempts to downcast the box to a concrete type. Source § impl dyn Error + Send + Sync 1.3.0 · Source pub fn downcast <T>( self: Box <dyn Error + Send + Sync >, ) -> Result < Box <T>, Box <dyn Error + Send + Sync >> where T: Error + 'static, Attempts to downcast the box to a concrete type. Trait Implementations § 1.6.0 · Source § impl<'a> From <& str > for Box <dyn Error + 'a> Source § fn from (err: & str ) -> Box <dyn Error + 'a> Converts a str into a box of dyn Error . § Examples use std::error::Error; let a_str_error = "a str error" ; let a_boxed_error = Box::< dyn Error>::from(a_str_error); assert! (size_of::<Box< dyn Error>>() == size_of_val( & a_boxed_error)) 1.0.0 · Source § impl<'a> From <& str > for Box <dyn Error + Send + Sync + 'a> Source § fn from (err: & str ) -> Box <dyn Error + Send + Sync + 'a> Converts a str into a box of dyn Error + Send + Sync . § Examples use std::error::Error; let a_str_error = "a str error" ; let a_boxed_error = Box::< dyn Error + Send + Sync>::from(a_str_error); assert! ( size_of::<Box< dyn Error + Send + Sync>>() == size_of_val( & a_boxed_error)) 1.22.0 · Source § impl<'a, 'b> From < Cow <'b, str >> for Box <dyn Error + 'a> Source § fn from (err: Cow <'b, str >) -> Box <dyn Error + 'a> Converts a Cow into a box of dyn Error . § Examples use std::error::Error; use std::borrow::Cow; let a_cow_str_error = Cow::from( "a str error" ); let a_boxed_error = Box::< dyn Error>::from(a_cow_str_error); assert! (size_of::<Box< dyn Error>>() == size_of_val( & a_boxed_error)) 1.22.0 · Source § impl<'a, 'b> From < Cow <'b, str >> for Box <dyn Error + Send + Sync + 'a> Source § fn from (err: Cow <'b, str >) -> Box <dyn Error + Send + Sync + 'a> Converts a Cow into a box of dyn Error + Send + Sync . § Examples use std::error::Error; use std::borrow::Cow; let a_cow_str_error = Cow::from( "a str error" ); let a_boxed_error = Box::< dyn Error + Send + Sync>::from(a_cow_str_error); assert! ( size_of::<Box< dyn Error + Send + Sync>>() == size_of_val( & a_boxed_error)) 1.0.0 · Source § impl<'a, E> From <E> for Box <dyn Error + 'a> where E: Error + 'a, Source § fn from (err: E) -> Box <dyn Error + 'a> Converts a type of Error into a box of dyn Error . § Examples use std::error::Error; use std::fmt; #[derive(Debug)] struct AnError; impl fmt::Display for AnError { fn fmt( & self , f: &mut fmt::Formatter< '_ >) -> fmt::Result { write! (f, "An error" ) } } impl Error for AnError {} let an_error = AnError; assert! ( 0 == size_of_val( & an_error)); let a_boxed_error = Box::< dyn Error>::from(an_error); assert! (size_of::<Box< dyn Error>>() == size_of_val( & a_boxed_error)) 1.0.0 · Source § impl<'a, E> From <E> for Box <dyn Error + Send + Sync + 'a> where E: Error + Send + Sync + 'a, Source § fn from (err: E) -> Box <dyn Error + Send + Sync + 'a> Converts a type of Error + Send + Sync into a box of dyn Error + Send + Sync . § Examples use std::error::Error; use std::fmt; #[derive(Debug)] struct AnError; impl fmt::Display for AnError { fn fmt( & self , f: &mut fmt::Formatter< '_ >) -> fmt::Result { write! (f, "An error" ) } } impl Error for AnError {} unsafe impl Send for AnError {} unsafe impl Sync for AnError {} let an_error = AnError; assert! ( 0 == size_of_val( & an_error)); let a_boxed_error = Box::< dyn Error + Send + Sync>::from(an_error); assert! ( size_of::<Box< dyn Error + Send + Sync>>() == size_of_val( & a_boxed_error)) 1.6.0 · Source § impl<'a> From < String > for Box <dyn Error + 'a> Source § fn from (str_err: String ) -> Box <dyn Error + 'a> Converts a String into a box of dyn Error . § Examples use std::error::Error; let a_string_error = "a string error" .to_string(); let a_boxed_error = Box::< dyn Error>::from(a_string_error); assert! (size_of::<Box< dyn Error>>() == size_of_val( & a_boxed_error)) 1.0.0 · Source § impl<'a> From < String > for Box <dyn Error + Send + Sync + 'a> Source § fn from (err: String ) -> Box <dyn Error + Send + Sync + 'a> Converts a String into a box of dyn Error + Send + Sync . § Examples use std::error::Error; let a_string_error = "a string error" .to_string(); let a_boxed_error = Box::< dyn Error + Send + Sync>::from(a_string_error); assert! ( size_of::<Box< dyn Error + Send + Sync>>() == size_of_val( & a_boxed_error)) Implementors § 1.65.0 · Source § impl ! Error for & str 1.8.0 · Source § impl Error for Infallible 1.0.0 · Source § impl Error for VarError 1.17.0 · Source § impl Error for FromBytesWithNulError 1.89.0 · Source § impl Error for std::fs:: TryLockError 1.86.0 · Source § impl Error for GetDisjointMutError 1.15.0 · Source § impl Error for RecvTimeoutError 1.0.0 · Source § impl Error for TryRecvError Source § impl Error for ! Source § impl Error for AllocError 1.28.0 · Source § impl Error for LayoutError 1.34.0 · Source § impl Error for TryFromSliceError 1.13.0 · Source § impl Error for BorrowError 1.13.0 · Source § impl Error for BorrowMutError 1.34.0 · Source § impl Error for CharTryFromError 1.9.0 · Source § impl Error for DecodeUtf16Error 1.20.0 · Source § impl Error for ParseCharError 1.59.0 · Source § impl Error for TryFromCharError Source § impl Error for UnorderedKeyError 1.57.0 · Source § impl Error for TryReserveError 1.0.0 · Source § impl Error for JoinPathsError 1.69.0 · Source § impl Error for FromBytesUntilNulError 1.58.0 · Source § impl Error for FromVecWithNulError 1.7.0 · Source § impl Error for IntoStringError 1.0.0 · Source § impl Error for NulError 1.11.0 · Source § impl Error for std::fmt:: Error 1.0.0 · Source § impl Error for std::io:: Error 1.56.0 · Source § impl Error for WriterPanicked 1.4.0 · Source § impl Error for AddrParseError 1.0.0 · Source § impl Error for ParseFloatError 1.0.0 · Source § impl Error for ParseIntError 1.34.0 · Source § impl Error for TryFromIntError 1.63.0 · Source § impl Error for InvalidHandleError Available on Windows only. 1.63.0 · Source § impl Error for NullHandleError Available on Windows only. Source § impl Error for NormalizeError 1.7.0 · Source § impl Error for StripPrefixError Source § impl Error for ExitStatusError 1.0.0 · Source § impl Error for ParseBoolError 1.0.0 · Source § impl Error for Utf8Error 1.0.0 · Source § impl Error for FromUtf8Error 1.0.0 · Source § impl Error for FromUtf16Error 1.0.0 · Source § impl Error for RecvError 1.26.0 · Source § impl Error for AccessError 1.8.0 · Source § impl Error for SystemTimeError 1.66.0 · Source § impl Error for TryFromFloatSecsError Source § impl<'a, K, V> Error for std::collections::btree_map:: OccupiedError <'a, K, V> where K: Debug + Ord , V: Debug , Source § impl<'a, K: Debug , V: Debug > Error for std::collections::hash_map:: OccupiedError <'a, K, V> 1.51.0 · Source § impl<'a, T> Error for &'a T where T: Error + ? Sized , 1.8.0 · Source § impl<E> Error for Box <E> where E: Error , 1.0.0 · Source § impl<T> Error for std::sync:: TryLockError <T> Source § impl<T> Error for SendTimeoutError <T> 1.0.0 · Source § impl<T> Error for TrySendError <T> Source § impl<T> Error for ThinBox <T> where T: Error + ? Sized , 1.0.0 · Source § impl<T> Error for SendError <T> 1.52.0 · Source § impl<T> Error for Arc <T> where T: Error + ? Sized , 1.0.0 · Source § impl<T> Error for PoisonError <T> 1.0.0 · Source § impl<W: Send + Debug > Error for IntoInnerError <W> | 2026-01-13T09:29:14 |
https://www.linkedin.com/products/categories/network-management-software | Best Network Management Software | Products | LinkedIn Skip to main content LinkedIn Expand search This button displays the currently selected search type. When expanded it provides a list of search options that will switch the search inputs to match the current selection. Jobs People Learning Clear text Clear text Clear text Clear text Clear text Join now Sign in Clear text Used by Used by Network Engineer (32) Network Specialist (23) Network Administrator (21) Information Technology Manager (15) Chief Technology Officer (10) See all products Find top products in Network Management Software category Software used to automate administrative control of large computer networks. - Provision new devices and control configuration and updates - Detect performance bottlenecks, compliance issues, and misconfigured nodes - Map and discover network features to improve administrative remediation, maintenance, and reporting 132 results LG Electronics Private Network Solutions Network Management Software by LG Electronics LG Private Network Solutions offers a secure, scalable, and cost-effective on-premise Private 5G network designed to meet the connectivity demands of modern enterprises and system integrators. Our comprehensive approach ensures that businesses can harness the full potential of 5G technology without compromising on security or efficiency. For system integrators, our fully virtualized solution significantly reduces the Total Cost of Ownership (TCO). Use our innovative Front Haul Multiplexer to simplify RF design and flexible Cell-to-RU mapping to streamline deployment, accelerating timelines and boosting efficiency. Enterprise IT managers can gain unparalleled control over their private networks through our intuitive Private 5G Total Management System (PTMS). With a single, unified interface, you can effortlessly manage devices, diverse use cases, and network resources. Leverage LG's top-tier R&D and design for robust support, optimized performance, and reduced costs. View product Argo Smart Routing Network Management Software by Cloudflare The public Internet does its best to deliver your content — but it can’t account for network congestion, leading to slow load times and a degraded end-user experience. The Cloudflare network is different. It routes over 10 trillion global requests per month — providing Argo Smart Routing with a unique vantage point to detect real-time congestion and route web traffic across the fastest and most reliable network paths. On average, web assets perform 30% faster. View product Juniper Sky Enterprise Network Management Software by Juniper Networks Learn how Juniper Sky Enterprise simplifies cloud network management. Eliminate software maintenance cycles and dedicated hardware, and quickly manage your network through our intuitive UI. View product A2P SMS Network Management Software by Monty Mobile Reach customers directly, securely, and at scale. Our A2P messaging routes are built for reliability and deliverability. View product Network 360 Network Management Software by İnnova Bilişim Network 360 ile ağınıza bağlı tüm ekipmanları gerçek zamanlı izleyebilir ve yönetebilirsiniz. Ağa bağlı yönlendirici, anahtar, erişim noktası, Linux ve Windows sunucuların performansını gerçek zamanlı takip eden Network 360, ağ ekipmanların verimini, bellek kullanımını, disk alanını ve ICMP, SNMP veya WMI protokolleriyle algılanabilen tüm verilerini raporlar. View product Find products trusted by professionals in your network See which products are used by connections in your network and those that share similar job titles Sign in to view full insights Progress WhatsUp Gold Network Management Software by Progress Software WhatsUp Gold provides complete visibility into the status and performance of applications, network devices and servers in the cloud or on-premises. Discover Your Network: WhatsUp Gold’s powerful layer 2/3 discovery results in a detailed interactive map of your entire networked infrastructure. Monitor and map everything from the edge to the cloud including devices, wireless controllers, servers, virtual machines, applications, traffic flows and configurations across Windows, LAMP and Java environments. Get Real-time Alerts: Ensure optimal performance and availability to meet or beat SLAs. Manage networks, traffic, physical servers, VMs and applications with easy-to-use and customizable maps, dashboards and alerts. Click on any device in WhatsUp Gold to get immediate access to a wealth of related network monitoring settings and reports. Resolve Issues Quickly: Intuitive workflows and easy customization help you reduce MTTRs. WhatsUp Gold streamlines network monitoring workflows by let View product Entuity Network Management Software by Park Place Technologies With Entuity™ Software you can discover, monitor, manage, and optimize your entire network across countless devices supplied by a whole host of different vendors. Entuity™ supports thousands of devices out of the box across hundreds of vendors. The Entuity network monitoring tool automates network discovery and uses intuitive workflows that make it easy to see when something has gone wrong. Responsive dashboards allow you to take a high-level view to gauge your network health or drill down to the component level to quickly and efficiently fix network problems. View product NetworkAccess Network Management Software by Lepton Software NetworkAccess by Lepton offers fiber network management and engineering services to support informed business decisions throughout the organization. A true digital twin for your Fiber Network, NetworkAccess lets you plan, design, and roll out your network in a flash by: - Proactively planning the network to avoid any customer complaints - Delighting the customers and shortening your sales cycle - Encouraging maintenance teams to collaborate–plan, provision, and deploy on time - Optimizing operations using automation to remove inefficiencies and lower network downtimes Lepton’s NetworkAccess Fiber GeoSuite includes: - SmartLocator for enhanced customer experience - SmartSQ for client acquisition - SmartOps for operational efficiency - SmartInventory for network modeling and inventory management NetworkAccess is a unified GIS-based platform that enables telecom businesses to plan and design end-to-end networks. View product RUCKUS AI Network Management Software by RUCKUS Networks RUCKUS AI brings AI-driven service assurance, predictive analytics, and AIOps automation to enterprise networks. It continuously learns and optimizes performance, turning complex data into actionable insights for faster resolution and smarter operations. Powered by Machine Learning, Graph AI, and Digital Twin modeling, it delivers: - Proactive health monitoring - Predictive issue detection - Automated remediation - Explainable AI insights Seamlessly integrated across RUCKUS wired and wireless solutions, RUCKUS AI ensures exceptional performance, visibility, and reliability for any environment, from campuses and arenas to hotels and enterprises. View product nGeniusPULSE Network Management Software by NETSCOUT nGeniusPULSE provides 24x7 monitoring of critical applications and services from anywhere in the enterprise; in the Data Center, at remote branches, with remote workers, for IoT devices, and more. View product See more How it works Explore Discover the best product for your need from a growing catalog of 25,000 products and categories trusted by LinkedIn professionals Learn Evaluate new tools, explore trending products in your industry and see who in your network is skilled in the product Grow Join communities of product users to learn best practices, celebrate your progress and accelerate your career LinkedIn © 2026 About Accessibility User Agreement Privacy Policy Cookie Policy Copyright Policy Brand Policy Guest Controls Community Guidelines English Language | 2026-01-13T09:29:14 |
https://www.linkedin.com/products/categories/digital-analytics-software | Best Digital Analytics Software | Products | LinkedIn Skip to main content LinkedIn Expand search This button displays the currently selected search type. When expanded it provides a list of search options that will switch the search inputs to match the current selection. Jobs People Learning Clear text Clear text Clear text Clear text Clear text Join now Sign in Clear text Used by Used by Digital Marketing Manager (8) Chief Marketing Officer (8) Marketing Manager (7) Product Manager (6) Marketing Director (5) See all products Find top products in Digital Analytics Software category Software used to track information about website visitors. - Measure traffic in real time and over time - Capture number of unique visitors, sessions, and conversions - Gain insights with behavior funnels, entries, and exits - Analyze by segments such as demographics, device, and geography 84 results Business Analytics Digital Analytics Software by Dynatrace Dynatrace Business Analytics ties your IT metrics to business outcomes so you can prioritize what matters most. Optimize conversions, increase BizDevOps collaboration, and improve business KPIs with on-demand analysis of data across the entire customer journey. Turn your digital analytics into action with AI-assistance that provides instant answers and helps prevent issues before they impact user experience and business KPIs. View product Cloudflare Web Analytics Digital Analytics Software by Cloudflare Cloudflare Web Analytics provides free, privacy-first analytics without changing your DNS or using Cloudflare’s proxy. View your website’s page views and visits. View product HockeyStack Digital Analytics Software by HockeyStack HockeyStack enables marketing teams to drive pipeline efficiently and sales teams to close deals faster with modern attribution, holistic buyer journeys, and account insights. View product Compete Digital Analytics Software by C5i C5i Compete is an advanced AI-driven Digital Shelf Analytics platform designed to help global brands and retailers dominate the digital shelf. It offers a comprehensive 360° perspective across the 5Ps of marketing—Product, Price, Place, Promotion, and People—with real-time insights drawn from over 1,000 data sources. By blending granular product-level data with high-level market intelligence, Compete empowers both tactical moves and strategic decisions—from pricing and promotions to content performance, SEO, merchandising, and customer experience. With insights delivered 3X faster, C5i Compete has been proven to drive 36% sales growth and a 17% boost in share-of-search, helping brands amplify value, deepen customer loyalty, and accelerate revenue. View product Akamai Media Analytics Digital Analytics Software by Akamai Technologies Media Analytics solutions to help you gain visibility into the performance of streaming video and software delivery, so you can optimize your media CDN performance. View product Find products trusted by professionals in your network See which products are used by connections in your network and those that share similar job titles Sign in to view full insights Adverity Digital Analytics Software by Adverity Adverity is the essential marketing data and intelligence platform empowering brands and agencies to turn complex data into confident AI-powered decisions that drive business growth. View product WiFi Digital Analytics Software by Purple | B Corp™ Enterprise-class visitor analytics and engagement platform to improve the venue experience, build detailed visitor profiles and drive revenue through engagement, increasing return rates, and advertising opportunities Our cloud-based WiFi platform provides an overlay to your existing WiFi infrastructure, so no extra hardware is required. Setup is seriously quick - we’re talking under an hour - and everything is managed via an online portal. When visitors connect to WiFi, our captive portal captures key contact and demographic information - compliantly of course - which allows you to get to know your visitors, quickly analyze data, and follow up with personalized marketing campaigns. View product Siteimprove.ai Digital Analytics Software by Siteimprove Siteimprove.ai gives customers full visibility into how their content performs, not just with humans, but with AI-driven search. AI Agents help remediate content compliance issues and improve content performance with measurable ROI and continuous optimization. View product Chartbeat Digital Analytics Software by Chartbeat Chartbeat helps organizations measure the impact of their content in real time. See how we deliver real-time and historical analytics, content intelligence, and transformative optimization tools for digital media and publishing companies around the world. View product Analytics Suite Digital Analytics Software by AT Internet, a Piano company Measure and analyse your web and mobile traffic with AT Internet's digital analytics solution: reliable and GDPR-compliant data, hosted in Europe, for everyone in your company. View product See more How it works Explore Discover the best product for your need from a growing catalog of 25,000 products and categories trusted by LinkedIn professionals Learn Evaluate new tools, explore trending products in your industry and see who in your network is skilled in the product Grow Join communities of product users to learn best practices, celebrate your progress and accelerate your career LinkedIn © 2026 About Accessibility User Agreement Privacy Policy Cookie Policy Copyright Policy Brand Policy Guest Controls Community Guidelines English Language | 2026-01-13T09:29:14 |
https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/sys/conf/newvers.sh | CVS log for src/sys/conf/newvers.sh CVS log for src/sys/conf/newvers.sh Up to [local] / src / sys / conf Request diff between arbitrary revisions Default branch: MAIN Revision 1.212.2.1 / ( download ) - annotate - [select for diffs] , Thu Oct 23 21:23:34 2025 UTC (2 months, 2 weeks ago) by bluhm Branch: OPENBSD_7_8 Changes since 1.212: +3 -3 lines Diff to previous 1.212 ( colored ) next main 1.213 ( colored ) 7.8-stable Revision 1.213 / ( download ) - annotate - [select for diffs] , Wed Oct 8 21:55:19 2025 UTC (3 months ago) by jsg Branch: MAIN CVS Tags: HEAD Changes since 1.212: +3 -3 lines Diff to previous 1.212 ( colored ) 7.8-current ok deraadt@ Revision 1.212 / ( download ) - annotate - [select for diffs] , Tue Sep 30 14:49:51 2025 UTC (3 months, 1 week ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_7_8_BASE Branch point for: OPENBSD_7_8 Changes since 1.211: +3 -3 lines Diff to previous 1.211 ( colored ) move out of -beta Revision 1.211 / ( download ) - annotate - [select for diffs] , Wed Sep 10 16:00:04 2025 UTC (4 months ago) by deraadt Branch: MAIN Changes since 1.210: +4 -4 lines Diff to previous 1.210 ( colored ) crank to 7.8-beta Revision 1.209.4.1 / ( download ) - annotate - [select for diffs] , Mon Apr 28 13:06:32 2025 UTC (8 months, 2 weeks ago) by bluhm Branch: OPENBSD_7_7 Changes since 1.209: +3 -3 lines Diff to previous 1.209 ( colored ) next main 1.210 ( colored ) 7.7-stable Revision 1.210 / ( download ) - annotate - [select for diffs] , Sat Apr 12 02:13:14 2025 UTC (9 months ago) by deraadt Branch: MAIN Changes since 1.209: +3 -3 lines Diff to previous 1.209 ( colored ) now working on 7.7-current Revision 1.209 / ( download ) - annotate - [select for diffs] , Sun Mar 30 20:43:36 2025 UTC (9 months, 2 weeks ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_7_7_BASE Branch point for: OPENBSD_7_7 Changes since 1.208: +3 -3 lines Diff to previous 1.208 ( colored ) head out of -beta to 7.7 Revision 1.208 / ( download ) - annotate - [select for diffs] , Sat Mar 1 19:44:07 2025 UTC (10 months, 1 week ago) by deraadt Branch: MAIN Changes since 1.207: +4 -4 lines Diff to previous 1.207 ( colored ) move to 7.7-beta Revision 1.205.2.1 / ( download ) - annotate - [select for diffs] , Tue Oct 8 11:42:49 2024 UTC (15 months ago) by bluhm Branch: OPENBSD_7_6 Changes since 1.205: +3 -3 lines Diff to previous 1.205 ( colored ) next main 1.206 ( colored ) 7.6-stable Revision 1.207 / ( download ) - annotate - [select for diffs] , Mon Sep 23 21:05:28 2024 UTC (15 months, 2 weeks ago) by deraadt Branch: MAIN Changes since 1.206: +2 -2 lines Diff to previous 1.206 ( colored ) now hacking on 7.6-current (corrected) Revision 1.206 / ( download ) - annotate - [select for diffs] , Mon Sep 23 20:50:47 2024 UTC (15 months, 2 weeks ago) by deraadt Branch: MAIN Changes since 1.205: +2 -2 lines Diff to previous 1.205 ( colored ) now hacking on 7.6-current Revision 1.205 / ( download ) - annotate - [select for diffs] , Tue Sep 17 13:39:17 2024 UTC (15 months, 3 weeks ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_7_6_BASE Branch point for: OPENBSD_7_6 Changes since 1.204: +3 -3 lines Diff to previous 1.204 ( colored ) head into release Revision 1.204 / ( download ) - annotate - [select for diffs] , Wed Aug 7 15:59:24 2024 UTC (17 months ago) by deraadt Branch: MAIN Changes since 1.203: +4 -4 lines Diff to previous 1.203 ( colored ) crank to 7.6-beta, release date is vague Revision 1.202.2.1 / ( download ) - annotate - [select for diffs] , Wed Apr 3 20:36:37 2024 UTC (21 months, 1 week ago) by bluhm Branch: OPENBSD_7_5 Changes since 1.202: +3 -3 lines Diff to previous 1.202 ( colored ) next main 1.203 ( colored ) 7.5-stable Revision 1.203 / ( download ) - annotate - [select for diffs] , Tue Mar 12 01:20:30 2024 UTC (22 months ago) by deraadt Branch: MAIN Changes since 1.202: +3 -3 lines Diff to previous 1.202 ( colored ) moving on to 7.5-current Revision 1.202 / ( download ) - annotate - [select for diffs] , Thu Feb 29 17:05:10 2024 UTC (22 months, 2 weeks ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_7_5_BASE Branch point for: OPENBSD_7_5 Changes since 1.201: +3 -3 lines Diff to previous 1.201 ( colored ) move from 7.5-beta to 7.5 Revision 1.201 / ( download ) - annotate - [select for diffs] , Sat Feb 17 16:13:24 2024 UTC (22 months, 3 weeks ago) by deraadt Branch: MAIN Changes since 1.200: +4 -4 lines Diff to previous 1.200 ( colored ) move to 7.5-beta Revision 1.200 / ( download ) - annotate - [select for diffs] , Tue Jan 2 16:40:03 2024 UTC (2 years ago) by bluhm Branch: MAIN Changes since 1.199: +2 -3 lines Diff to previous 1.199 ( colored ) Revert chunk that I have commited by accident. Revision 1.199 / ( download ) - annotate - [select for diffs] , Tue Jan 2 16:32:47 2024 UTC (2 years ago) by bluhm Branch: MAIN Changes since 1.198: +3 -2 lines Diff to previous 1.198 ( colored ) Prevent simultaneous dt(4) open. Syskaller has hit the assertion "dtlookup(unit) == NULL" by opening dt(4) device in two parallel threads. Convert kassert into if condition. Move check that device is not used after sleep points in malloc. The list dtdev_list is protected by kernel lock which is released during sleep. Reported-by: syzbot+6d66c21f796c817948f0@syzkaller.appspotmail.com OK miod@ Revision 1.197.2.1 / ( download ) - annotate - [select for diffs] , Fri Oct 20 19:05:11 2023 UTC (2 years, 2 months ago) by bluhm Branch: OPENBSD_7_4 Changes since 1.197: +3 -3 lines Diff to previous 1.197 ( colored ) next main 1.198 ( colored ) 7.4-stable Revision 1.198 / ( download ) - annotate - [select for diffs] , Wed Oct 4 15:40:13 2023 UTC (2 years, 3 months ago) by bluhm Branch: MAIN Changes since 1.197: +3 -3 lines Diff to previous 1.197 ( colored ) base is unlocked, move to 7.4-current OK deraadt@ Revision 1.197 / ( download ) - annotate - [select for diffs] , Tue Sep 26 13:27:32 2023 UTC (2 years, 3 months ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_7_4_BASE Branch point for: OPENBSD_7_4 Changes since 1.196: +3 -3 lines Diff to previous 1.196 ( colored ) we are heading out of -beta Revision 1.196 / ( download ) - annotate - [select for diffs] , Mon Sep 18 13:16:13 2023 UTC (2 years, 3 months ago) by deraadt Branch: MAIN Changes since 1.195: +4 -4 lines Diff to previous 1.195 ( colored ) crank to 7.4-beta Revision 1.194.4.1 / ( download ) - annotate - [select for diffs] , Tue Apr 11 15:45:40 2023 UTC (2 years, 9 months ago) by bluhm Branch: OPENBSD_7_3 Changes since 1.194: +3 -3 lines Diff to previous 1.194 ( colored ) next main 1.195 ( colored ) 7.3-stable Revision 1.195 / ( download ) - annotate - [select for diffs] , Sat Mar 25 05:49:50 2023 UTC (2 years, 9 months ago) by deraadt Branch: MAIN Changes since 1.194: +3 -3 lines Diff to previous 1.194 ( colored ) we are now hacking on 7.3-current Revision 1.194 / ( download ) - annotate - [select for diffs] , Fri Mar 17 22:52:22 2023 UTC (2 years, 9 months ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_7_3_BASE Branch point for: OPENBSD_7_3 Changes since 1.193: +3 -3 lines Diff to previous 1.193 ( colored ) remove -beta tag Revision 1.193 / ( download ) - annotate - [select for diffs] , Sat Mar 4 14:49:37 2023 UTC (2 years, 10 months ago) by deraadt Branch: MAIN Changes since 1.192: +4 -4 lines Diff to previous 1.192 ( colored ) move to 7.3-beta Revision 1.191.2.1 / ( download ) - annotate - [select for diffs] , Thu Oct 20 09:44:17 2022 UTC (3 years, 2 months ago) by bluhm Branch: OPENBSD_7_2 Changes since 1.191: +3 -3 lines Diff to previous 1.191 ( colored ) next main 1.192 ( colored ) 7.2-stable Revision 1.192 / ( download ) - annotate - [select for diffs] , Tue Sep 27 02:39:24 2022 UTC (3 years, 3 months ago) by deraadt Branch: MAIN Changes since 1.191: +3 -3 lines Diff to previous 1.191 ( colored ) we are now working on 7.2-current Revision 1.191 / ( download ) - annotate - [select for diffs] , Sun Sep 11 14:27:09 2022 UTC (3 years, 4 months ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_7_2_BASE Branch point for: OPENBSD_7_2 Changes since 1.190: +3 -3 lines Diff to previous 1.190 ( colored ) drop the -beta Revision 1.190 / ( download ) - annotate - [select for diffs] , Wed Jul 20 15:12:38 2022 UTC (3 years, 5 months ago) by deraadt Branch: MAIN Changes since 1.189: +4 -4 lines Diff to previous 1.189 ( colored ) move to 7.2-beta. this gets done very early, to avoid finding out version number issues close to release Revision 1.188.4.1 / ( download ) - annotate - [select for diffs] , Thu Apr 21 21:44:09 2022 UTC (3 years, 8 months ago) by bluhm Branch: OPENBSD_7_1 Changes since 1.188: +3 -3 lines Diff to previous 1.188 ( colored ) next main 1.189 ( colored ) 7.1-stable Revision 1.189 / ( download ) - annotate - [select for diffs] , Tue Apr 5 16:25:30 2022 UTC (3 years, 9 months ago) by deraadt Branch: MAIN Changes since 1.188: +3 -3 lines Diff to previous 1.188 ( colored ) back to working on 7.1-current Revision 1.188 / ( download ) - annotate - [select for diffs] , Tue Mar 29 03:11:18 2022 UTC (3 years, 9 months ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_7_1_BASE Branch point for: OPENBSD_7_1 Changes since 1.187: +3 -3 lines Diff to previous 1.187 ( colored ) close enough to release, we drop -beta Revision 1.187 / ( download ) - annotate - [select for diffs] , Sun Feb 20 20:54:29 2022 UTC (3 years, 10 months ago) by sthen Branch: MAIN Changes since 1.186: +3 -3 lines Diff to previous 1.186 ( colored ) we should be 7.1-beta not 7.1-current Revision 1.186 / ( download ) - annotate - [select for diffs] , Sun Feb 20 17:11:05 2022 UTC (3 years, 10 months ago) by deraadt Branch: MAIN Changes since 1.185: +3 -3 lines Diff to previous 1.185 ( colored ) move to 7.1-beta Revision 1.184.2.1 / ( download ) - annotate - [select for diffs] , Fri Oct 22 16:05:34 2021 UTC (4 years, 2 months ago) by bluhm Branch: OPENBSD_7_0 Changes since 1.184: +3 -3 lines Diff to previous 1.184 ( colored ) next main 1.185 ( colored ) 7.0-stable Revision 1.185 / ( download ) - annotate - [select for diffs] , Wed Sep 22 18:21:35 2021 UTC (4 years, 3 months ago) by deraadt Branch: MAIN Changes since 1.184: +3 -3 lines Diff to previous 1.184 ( colored ) we are now working on 7.0-current Revision 1.184 / ( download ) - annotate - [select for diffs] , Mon Sep 13 04:02:15 2021 UTC (4 years, 4 months ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_7_0_BASE Branch point for: OPENBSD_7_0 Changes since 1.183: +3 -3 lines Diff to previous 1.183 ( colored ) take us out of beta Revision 1.183 / ( download ) - annotate - [select for diffs] , Tue Aug 17 15:03:55 2021 UTC (4 years, 4 months ago) by deraadt Branch: MAIN Changes since 1.182: +4 -4 lines Diff to previous 1.182 ( colored ) 7.0-beta Revision 1.182 / ( download ) - annotate - [select for diffs] , Sun May 2 22:10:13 2021 UTC (4 years, 8 months ago) by bluhm Branch: MAIN Changes since 1.181: +2 -1 lines Diff to previous 1.181 ( colored ) Put -stable template into #if 0 section of current newvers.sh. OK deraadt@ Revision 1.180.2.1 / ( download ) - annotate - [select for diffs] , Sun May 2 12:56:59 2021 UTC (4 years, 8 months ago) by bluhm Branch: OPENBSD_6_9 Changes since 1.180: +3 -2 lines Diff to previous 1.180 ( colored ) next main 1.181 ( colored ) 6.9-stable Revision 1.181 / ( download ) - annotate - [select for diffs] , Sun Apr 18 23:40:52 2021 UTC (4 years, 8 months ago) by deraadt Branch: MAIN Changes since 1.180: +3 -3 lines Diff to previous 1.180 ( colored ) post 6.9 development continues... Revision 1.180 / ( download ) - annotate - [select for diffs] , Sun Apr 4 23:03:07 2021 UTC (4 years, 9 months ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_6_9_BASE Branch point for: OPENBSD_6_9 Changes since 1.179: +3 -3 lines Diff to previous 1.179 ( colored ) leave -beta Revision 1.179 / ( download ) - annotate - [select for diffs] , Sat Feb 6 21:26:19 2021 UTC (4 years, 11 months ago) by deraadt Branch: MAIN Changes since 1.178: +4 -4 lines Diff to previous 1.178 ( colored ) 6.9-beta Revision 1.177.4.1 / ( download ) - annotate - [select for diffs] , Mon Oct 26 21:06:03 2020 UTC (5 years, 2 months ago) by bluhm Branch: OPENBSD_6_8 Changes since 1.177: +2 -2 lines Diff to previous 1.177 ( colored ) next main 1.178 ( colored ) 6.8-stable Revision 1.178 / ( download ) - annotate - [select for diffs] , Wed Sep 30 14:46:02 2020 UTC (5 years, 3 months ago) by jsg Branch: MAIN Changes since 1.177: +3 -3 lines Diff to previous 1.177 ( colored ) 6.8-current ok deraadt@ Revision 1.177 / ( download ) - annotate - [select for diffs] , Fri Sep 25 05:12:39 2020 UTC (5 years, 3 months ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_6_8_BASE Branch point for: OPENBSD_6_8 Changes since 1.176: +3 -3 lines Diff to previous 1.176 ( colored ) take us out of -beta Revision 1.176 / ( download ) - annotate - [select for diffs] , Mon Aug 31 16:08:28 2020 UTC (5 years, 4 months ago) by deraadt Branch: MAIN Changes since 1.175: +4 -4 lines Diff to previous 1.175 ( colored ) crank to 6.8-beta Revision 1.174.4.1 / ( download ) - annotate - [select for diffs] , Tue May 19 17:32:04 2020 UTC (5 years, 7 months ago) by bluhm Branch: OPENBSD_6_7 Changes since 1.174: +2 -2 lines Diff to previous 1.174 ( colored ) next main 1.175 ( colored ) 6.7-stable Revision 1.175 / ( download ) - annotate - [select for diffs] , Thu May 7 18:46:35 2020 UTC (5 years, 8 months ago) by deraadt Branch: MAIN Changes since 1.174: +3 -3 lines Diff to previous 1.174 ( colored ) post-6.7 development continues Revision 1.174 / ( download ) - annotate - [select for diffs] , Mon May 4 15:00:35 2020 UTC (5 years, 8 months ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_6_7_BASE Branch point for: OPENBSD_6_7 Changes since 1.173: +3 -3 lines Diff to previous 1.173 ( colored ) leave -beta. Revision 1.173 / ( download ) - annotate - [select for diffs] , Sun Apr 5 06:34:20 2020 UTC (5 years, 9 months ago) by deraadt Branch: MAIN Changes since 1.172: +4 -4 lines Diff to previous 1.172 ( colored ) crank to 6.7-beta Revision 1.171.2.1 / ( download ) - annotate - [select for diffs] , Tue Oct 22 12:21:46 2019 UTC (6 years, 2 months ago) by bluhm Branch: OPENBSD_6_6 Changes since 1.171: +2 -2 lines Diff to previous 1.171 ( colored ) next main 1.172 ( colored ) 6.6-stable Revision 1.172 / ( download ) - annotate - [select for diffs] , Sat Oct 12 14:42:51 2019 UTC (6 years, 3 months ago) by deraadt Branch: MAIN Changes since 1.171: +3 -3 lines Diff to previous 1.171 ( colored ) we are now hacking on 6.6-current Revision 1.171 / ( download ) - annotate - [select for diffs] , Tue Oct 1 17:19:03 2019 UTC (6 years, 3 months ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_6_6_BASE Branch point for: OPENBSD_6_6 Changes since 1.170: +3 -3 lines Diff to previous 1.170 ( colored ) stop this -current stuff Revision 1.170 / ( download ) - annotate - [select for diffs] , Sat Aug 10 11:49:50 2019 UTC (6 years, 5 months ago) by naddy Branch: MAIN Changes since 1.169: +2 -2 lines Diff to previous 1.169 ( colored ) really crank to 6.6-beta Revision 1.169 / ( download ) - annotate - [select for diffs] , Sat Aug 10 03:56:02 2019 UTC (6 years, 5 months ago) by deraadt Branch: MAIN Changes since 1.168: +3 -3 lines Diff to previous 1.168 ( colored ) move to 6.6-beta Revision 1.167.2.1 / ( download ) - annotate - [select for diffs] , Wed May 1 21:02:07 2019 UTC (6 years, 8 months ago) by bluhm Branch: OPENBSD_6_5 Changes since 1.167: +2 -2 lines Diff to previous 1.167 ( colored ) next main 1.168 ( colored ) 6.5-stable Revision 1.168 / ( download ) - annotate - [select for diffs] , Sat Apr 13 17:35:07 2019 UTC (6 years, 9 months ago) by deraadt Branch: MAIN Changes since 1.167: +3 -3 lines Diff to previous 1.167 ( colored ) unlock tree, we are now working on 6.5-current Revision 1.167 / ( download ) - annotate - [select for diffs] , Tue Apr 2 08:30:38 2019 UTC (6 years, 9 months ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_6_5_BASE Branch point for: OPENBSD_6_5 Changes since 1.166: +3 -3 lines Diff to previous 1.166 ( colored ) Move to 6.5 release rathe than -beta. That means "pkg_add -u -Dsnap" becomes the norm until release is out. Revision 1.166 / ( download ) - annotate - [select for diffs] , Tue Feb 26 22:24:41 2019 UTC (6 years, 10 months ago) by deraadt Branch: MAIN Changes since 1.165: +4 -4 lines Diff to previous 1.165 ( colored ) crank to 6.5-beta Revision 1.164.2.1 / ( download ) - annotate - [select for diffs] , Wed Oct 31 15:46:20 2018 UTC (7 years, 2 months ago) by bluhm Branch: OPENBSD_6_4 Changes since 1.164: +2 -2 lines Diff to previous 1.164 ( colored ) next main 1.165 ( colored ) 6.4-stable Revision 1.165 / ( download ) - annotate - [select for diffs] , Sat Oct 13 15:16:29 2018 UTC (7 years, 3 months ago) by deraadt Branch: MAIN Changes since 1.164: +3 -3 lines Diff to previous 1.164 ( colored ) we are now working on 6.4-current Revision 1.164 / ( download ) - annotate - [select for diffs] , Sat Sep 29 16:00:44 2018 UTC (7 years, 3 months ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_6_4_BASE Branch point for: OPENBSD_6_4 Changes since 1.163: +3 -3 lines Diff to previous 1.163 ( colored ) unmark -beta. There is still development happening, and we aren't locked in stone yet, but the clock starts ticking... Revision 1.163 / ( download ) - annotate - [select for diffs] , Fri Aug 10 20:27:01 2018 UTC (7 years, 5 months ago) by deraadt Branch: MAIN Changes since 1.162: +4 -4 lines Diff to previous 1.162 ( colored ) crank to 6.4-beta Revision 1.161.2.1 / ( download ) - annotate - [select for diffs] , Mon Apr 2 17:20:40 2018 UTC (7 years, 9 months ago) by bluhm Branch: OPENBSD_6_3 Changes since 1.161: +2 -2 lines Diff to previous 1.161 ( colored ) next main 1.162 ( colored ) 6.3-stable Revision 1.162 / ( download ) - annotate - [select for diffs] , Tue Mar 27 06:10:05 2018 UTC (7 years, 9 months ago) by deraadt Branch: MAIN Changes since 1.161: +3 -3 lines Diff to previous 1.161 ( colored ) take us to 6.3-current Revision 1.161 / ( download ) - annotate - [select for diffs] , Wed Mar 14 16:52:09 2018 UTC (7 years, 10 months ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_6_3_BASE Branch point for: OPENBSD_6_3 Changes since 1.160: +3 -3 lines Diff to previous 1.160 ( colored ) we head to release soon Revision 1.160 / ( download ) - annotate - [select for diffs] , Wed Feb 28 15:07:44 2018 UTC (7 years, 10 months ago) by deraadt Branch: MAIN Changes since 1.159: +2 -2 lines Diff to previous 1.159 ( colored ) oops, skipped a step cranking to 6.3-beta Revision 1.159 / ( download ) - annotate - [select for diffs] , Wed Feb 28 14:56:46 2018 UTC (7 years, 10 months ago) by deraadt Branch: MAIN Changes since 1.158: +3 -3 lines Diff to previous 1.158 ( colored ) move to 6.3-beta Revision 1.158 / ( download ) - annotate - [select for diffs] , Tue Feb 6 08:42:33 2018 UTC (7 years, 11 months ago) by tb Branch: MAIN Changes since 1.157: +3 -1 lines Diff to previous 1.157 ( colored ) Run newvers.sh with umask 007 to work around permission issues that cause 'make release' fail the first time around after building GENERIC if /usr/obj/ wasn't cleaned out properly. The proper fix would be to implement privdrop for kernel builds but this is trickier than it looks at first sight. discussed with deraadt Revision 1.155.2.1 / ( download ) - annotate - [select for diffs] , Mon Oct 9 17:15:23 2017 UTC (8 years, 3 months ago) by bluhm Branch: OPENBSD_6_2 Changes since 1.155: +2 -2 lines Diff to previous 1.155 ( colored ) next main 1.156 ( colored ) 6.2-stable Revision 1.157 / ( download ) - annotate - [select for diffs] , Wed Oct 4 17:59:41 2017 UTC (8 years, 3 months ago) by benno Branch: MAIN Changes since 1.156: +4 -1 lines Diff to previous 1.156 ( colored ) reminder to create <version>.html and roll errata pages for release. ok deraadt@ Revision 1.156 / ( download ) - annotate - [select for diffs] , Wed Oct 4 17:37:16 2017 UTC (8 years, 3 months ago) by deraadt Branch: MAIN Changes since 1.155: +3 -3 lines Diff to previous 1.155 ( colored ) 6.2-current, back to work Revision 1.155 / ( download ) - annotate - [select for diffs] , Mon Sep 25 06:45:54 2017 UTC (8 years, 3 months ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_6_2_BASE Branch point for: OPENBSD_6_2 Changes since 1.154: +3 -3 lines Diff to previous 1.154 ( colored ) take us out of -beta Revision 1.154 / ( download ) - annotate - [select for diffs] , Sun Aug 20 16:56:43 2017 UTC (8 years, 4 months ago) by deraadt Branch: MAIN Changes since 1.153: +4 -4 lines Diff to previous 1.153 ( colored ) crank to 6.2-beta Revision 1.152.4.1 / ( download ) - annotate - [select for diffs] , Tue May 2 07:35:55 2017 UTC (8 years, 8 months ago) by jsg Branch: OPENBSD_6_1 Changes since 1.152: +2 -2 lines Diff to previous 1.152 ( colored ) next main 1.153 ( colored ) 6.1-stable Revision 1.153 / ( download ) - annotate - [select for diffs] , Sun Apr 2 00:27:36 2017 UTC (8 years, 9 months ago) by deraadt Branch: MAIN Changes since 1.152: +3 -3 lines Diff to previous 1.152 ( colored ) unlock tree, we are now hacking on 6.1-current Revision 1.152 / ( download ) - annotate - [select for diffs] , Wed Mar 29 01:39:27 2017 UTC (8 years, 9 months ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_6_1_BASE Branch point for: OPENBSD_6_1 Changes since 1.151: +3 -3 lines Diff to previous 1.151 ( colored ) move to 6.1 release, drop -beta tag Revision 1.151 / ( download ) - annotate - [select for diffs] , Sat Mar 4 16:52:47 2017 UTC (8 years, 10 months ago) by deraadt Branch: MAIN Changes since 1.150: +4 -4 lines Diff to previous 1.150 ( colored ) crank to 6.1-beta Revision 1.150 / ( download ) - annotate - [select for diffs] , Tue Jan 24 11:59:41 2017 UTC (8 years, 11 months ago) by tb Branch: MAIN Changes since 1.149: +2 -2 lines Diff to previous 1.149 ( colored ) logname(1) uses getlogin(2) to determine the user associated with the current session. This way kernels built during 'make release' should again have names such as deraadt@... bluhm@... instead of build@... in most environments. Issue reported by bluhm on icb eons ago. ok deraadt Revision 1.149 / ( download ) - annotate - [select for diffs] , Sun Oct 16 17:31:36 2016 UTC (9 years, 2 months ago) by tb Branch: MAIN Changes since 1.148: +2 -2 lines Diff to previous 1.148 ( colored ) Strip trailing obj/ from kernel build directories, so kernels are again marked with GENERIC{,.MP} RAMDISK, etc. Problem noticed by several (jsg, semarie, ...) ok many (sthen, natano, millert, deraadt, ...) Explanations why quotes aren't necessary by even more. Thanks! Revision 1.148 / ( download ) - annotate - [select for diffs] , Thu Sep 1 14:12:07 2016 UTC (9 years, 4 months ago) by tedu Branch: MAIN Changes since 1.147: +2 -2 lines Diff to previous 1.147 ( colored ) make the version symbol a fixed size (512) to reduce the potential for bad effects when savecore reads beyond it ok deraadt (and thanks to bluhm for remembering that this happens) Revision 1.146.2.1 / ( download ) - annotate - [select for diffs] , Tue Aug 2 09:48:40 2016 UTC (9 years, 5 months ago) by benno Branch: OPENBSD_6_0 Changes since 1.146: +2 -2 lines Diff to previous 1.146 ( colored ) next main 1.147 ( colored ) OPENBSD_6_0 is now -stable ok deraadt@ Revision 1.147 / ( download ) - annotate - [select for diffs] , Tue Jul 26 17:57:14 2016 UTC (9 years, 5 months ago) by kettenis Branch: MAIN Changes since 1.146: +3 -3 lines Diff to previous 1.146 ( colored ) Welcome to 6.0-current. ok deraadt@ Revision 1.146 / ( download ) - annotate - [select for diffs] , Fri Jul 15 05:06:24 2016 UTC (9 years, 6 months ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_6_0_BASE Branch point for: OPENBSD_6_0 Changes since 1.145: +3 -3 lines Diff to previous 1.145 ( colored ) take us out of -beta Revision 1.145 / ( download ) - annotate - [select for diffs] , Wed May 11 18:01:33 2016 UTC (9 years, 8 months ago) by deraadt Branch: MAIN Changes since 1.144: +4 -4 lines Diff to previous 1.144 ( colored ) crank to 6.0-beta Revision 1.143.2.1 / ( download ) - annotate - [select for diffs] , Thu Mar 24 05:08:56 2016 UTC (9 years, 9 months ago) by jsg Branch: OPENBSD_5_9 Changes since 1.143: +2 -2 lines Diff to previous 1.143 ( colored ) next main 1.144 ( colored ) 5.9-stable Revision 1.144 / ( download ) - annotate - [select for diffs] , Thu Feb 25 00:31:25 2016 UTC (9 years, 10 months ago) by deraadt Branch: MAIN Changes since 1.143: +3 -3 lines Diff to previous 1.143 ( colored ) we are now hacking on 5.9-current Revision 1.143 / ( download ) - annotate - [select for diffs] , Mon Feb 1 22:15:30 2016 UTC (9 years, 11 months ago) by jsg Branch: MAIN CVS Tags: OPENBSD_5_9_BASE Branch point for: OPENBSD_5_9 Changes since 1.142: +3 -3 lines Diff to previous 1.142 ( colored ) move to -release mode requested by deraadt@ Revision 1.142 / ( download ) - annotate - [select for diffs] , Wed Jan 6 23:14:05 2016 UTC (10 years ago) by benno Branch: MAIN Changes since 1.141: +3 -1 lines Diff to previous 1.141 ( colored ) document the signify command for the next release, so that users can verify before the netx upgrade. document that signify.1 needs an edit bump once in a while. ok tedu@ florian@ Revision 1.141 / ( download ) - annotate - [select for diffs] , Sat Dec 19 19:44:09 2015 UTC (10 years ago) by deraadt Branch: MAIN Changes since 1.140: +4 -4 lines Diff to previous 1.140 ( colored ) move to 5.9-beta Revision 1.139.4.1 / ( download ) - annotate - [select for diffs] , Sat Sep 5 11:31:55 2015 UTC (10 years, 4 months ago) by sthen Branch: OPENBSD_5_8 Changes since 1.139: +2 -2 lines Diff to previous 1.139 ( colored ) next main 1.140 ( colored ) 5.8-stable Revision 1.140 / ( download ) - annotate - [select for diffs] , Mon Aug 10 20:31:00 2015 UTC (10 years, 5 months ago) by jca Branch: MAIN Changes since 1.139: +3 -3 lines Diff to previous 1.139 ( colored ) Back to -current. Revision 1.139 / ( download ) - annotate - [select for diffs] , Thu Jul 23 16:26:57 2015 UTC (10 years, 5 months ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_5_8_BASE Branch point for: OPENBSD_5_8 Changes since 1.138: +3 -3 lines Diff to previous 1.138 ( colored ) remove -beta tag. take that as a hint. Revision 1.138 / ( download ) - annotate - [select for diffs] , Wed Jun 17 19:52:18 2015 UTC (10 years, 6 months ago) by deraadt Branch: MAIN Changes since 1.137: +4 -4 lines Diff to previous 1.137 ( colored ) move to 5.8-beta. This is a bit earlier than normal... Revision 1.136.2.1 / ( download ) - annotate - [select for diffs] , Sun Mar 22 01:13:32 2015 UTC (10 years, 9 months ago) by tedu Branch: OPENBSD_5_7 Changes since 1.136: +2 -2 lines Diff to previous 1.136 ( colored ) next main 1.137 ( colored ) -stable Revision 1.137 / ( download ) - annotate - [select for diffs] , Mon Mar 9 20:08:55 2015 UTC (10 years, 10 months ago) by miod Branch: MAIN Changes since 1.136: +3 -3 lines Diff to previous 1.136 ( colored ) If my calculations are correct, when this baby hits 5.8... you're gonna see some serious shit. Revision 1.136 / ( download ) - annotate - [select for diffs] , Wed Mar 4 14:31:13 2015 UTC (10 years, 10 months ago) by jsg Branch: MAIN CVS Tags: OPENBSD_5_7_BASE Branch point for: OPENBSD_5_7 Changes since 1.135: +3 -3 lines Diff to previous 1.135 ( colored ) move to -release mode ok deraadt@ Revision 1.135 / ( download ) - annotate - [select for diffs] , Thu Jan 1 15:50:27 2015 UTC (11 years ago) by deraadt Branch: MAIN Changes since 1.134: +4 -4 lines Diff to previous 1.134 ( colored ) move to 5.7-beta Revision 1.133.4.1 / ( download ) - annotate - [select for diffs] , Sun Sep 7 03:07:16 2014 UTC (11 years, 4 months ago) by jsg Branch: OPENBSD_5_6 Changes since 1.133: +2 -2 lines Diff to previous 1.133 ( colored ) next main 1.134 ( colored ) 5.6-stable Revision 1.134 / ( download ) - annotate - [select for diffs] , Mon Aug 11 18:33:36 2014 UTC (11 years, 5 months ago) by miod Branch: MAIN Changes since 1.133: +3 -3 lines Diff to previous 1.133 ( colored ) -current dammit Revision 1.133 / ( download ) - annotate - [select for diffs] , Tue Jul 29 12:56:41 2014 UTC (11 years, 5 months ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_5_6_BASE Branch point for: OPENBSD_5_6 Changes since 1.132: +3 -3 lines Diff to previous 1.132 ( colored ) move to -release mode Revision 1.132 / ( download ) - annotate - [select for diffs] , Tue Jul 15 21:59:17 2014 UTC (11 years, 6 months ago) by deraadt Branch: MAIN Changes since 1.131: +4 -4 lines Diff to previous 1.131 ( colored ) crank to 5.6-beta Revision 1.130.4.1 / ( download ) - annotate - [select for diffs] , Sat May 3 19:32:01 2014 UTC (11 years, 8 months ago) by jsg Branch: OPENBSD_5_5 Changes since 1.130: +2 -2 lines Diff to previous 1.130 ( colored ) next main 1.131 ( colored ) 5.5-stable Revision 1.131 / ( download ) - annotate - [select for diffs] , Wed Mar 5 18:54:32 2014 UTC (11 years, 10 months ago) by chris Branch: MAIN Changes since 1.130: +3 -3 lines Diff to previous 1.130 ( colored ) We are now 5.5-current Revision 1.130 / ( download ) - annotate - [select for diffs] , Sat Feb 22 03:53:45 2014 UTC (11 years, 10 months ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_5_5_BASE Branch point for: OPENBSD_5_5 Changes since 1.129: +3 -3 lines Diff to previous 1.129 ( colored ) take us to -release mode Revision 1.129 / ( download ) - annotate - [select for diffs] , Sun Jan 12 11:26:08 2014 UTC (12 years ago) by deraadt Branch: MAIN Changes since 1.128: +4 -4 lines Diff to previous 1.128 ( colored ) crank to 5.5beta Revision 1.127.2.1 / ( download ) - annotate - [select for diffs] , Sun Nov 3 11:24:51 2013 UTC (12 years, 2 months ago) by sthen Branch: OPENBSD_5_4 Changes since 1.127: +2 -2 lines Diff to previous 1.127 ( colored ) next main 1.128 ( colored ) -stable, for mitja :) Revision 1.128 / ( download ) - annotate - [select for diffs] , Mon Jul 29 18:43:50 2013 UTC (12 years, 5 months ago) by kettenis Branch: MAIN Changes since 1.127: +3 -3 lines Diff to previous 1.127 ( colored ) and we're hacking on 5.4-current now Revision 1.127 / ( download ) - annotate - [select for diffs] , Wed Jul 17 13:35:57 2013 UTC (12 years, 6 months ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_5_4_BASE Branch point for: OPENBSD_5_4 Changes since 1.126: +3 -3 lines Diff to previous 1.126 ( colored ) no longer beta; get moving towards release Revision 1.126 / ( download ) - annotate - [select for diffs] , Sun Jul 7 18:11:50 2013 UTC (12 years, 6 months ago) by deraadt Branch: MAIN Changes since 1.125: +4 -4 lines Diff to previous 1.125 ( colored ) move to 5.4-beta Revision 1.123.2.1 / ( download ) - annotate - [select for diffs] , Sun May 5 19:41:53 2013 UTC (12 years, 8 months ago) by sthen Branch: OPENBSD_5_3 Changes since 1.123: +2 -2 lines Diff to previous 1.123 ( colored ) next main 1.124 ( colored ) switch to -stable suffix, reminded by mitja Revision 1.125 / ( download ) - annotate - [select for diffs] , Tue Apr 9 18:47:14 2013 UTC (12 years, 9 months ago) by mlarkin Branch: MAIN Changes since 1.124: +2 -2 lines Diff to previous 1.124 ( colored ) newvers.sh uses 'basename' to determine the directory name to stamp the kernel version ID with, but it did not account for spaces in the name, leading to version strings like "OpenBSD 5.3-current ()". Quote the call to basename to permit paths with spaces in the name. ok halex@, deraadt@ Revision 1.124 / ( download ) - annotate - [select for diffs] , Fri Mar 1 21:06:04 2013 UTC (12 years, 10 months ago) by guenther Branch: MAIN Changes since 1.123: +3 -3 lines Diff to previous 1.123 ( colored ) Antici pation: back to -current Revision 1.123 / ( download ) - annotate - [select for diffs] , Thu Feb 21 15:26:20 2013 UTC (12 years, 10 months ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_5_3_BASE Branch point for: OPENBSD_5_3 Changes since 1.122: +3 -3 lines Diff to previous 1.122 ( colored ) go to release Revision 1.122 / ( download ) - annotate - [select for diffs] , Thu Jan 31 23:30:40 2013 UTC (12 years, 11 months ago) by miod Branch: MAIN Changes since 1.121: +4 -4 lines Diff to previous 1.121 ( colored ) welcome to 5.3-BETA Revision 1.120.2.1 / ( download ) - annotate - [select for diffs] , Wed Dec 19 18:51:03 2012 UTC (13 years ago) by jj Branch: OPENBSD_5_2 Changes since 1.120: +2 -2 lines Diff to previous 1.120 ( colored ) next main 1.121 ( colored ) enter -stable. ok deraadt@, reported by Mitja M. Revision 1.121 / ( download ) - annotate - [select for diffs] , Thu Jul 26 15:51:22 2012 UTC (13 years, 5 months ago) by otto Branch: MAIN Changes since 1.120: +3 -3 lines Diff to previous 1.120 ( colored ) move to -current Revision 1.120 / ( download ) - annotate - [select for diffs] , Mon Jul 16 10:50:07 2012 UTC (13 years, 6 months ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_5_2_BASE Branch point for: OPENBSD_5_2 Changes since 1.119: +3 -3 lines Diff to previous 1.119 ( colored ) and we head towards release Revision 1.119 / ( download ) - annotate - [select for diffs] , Wed Jun 20 21:40:55 2012 UTC (13 years, 6 months ago) by deraadt Branch: MAIN Changes since 1.118: +4 -4 lines Diff to previous 1.118 ( colored ) move to 5.2-beta Revision 1.117.2.1 / ( download ) - annotate - [select for diffs] , Mon Apr 23 13:55:06 2012 UTC (13 years, 8 months ago) by henning Branch: OPENBSD_5_1 Changes since 1.117: +2 -2 lines Diff to previous 1.117 ( colored ) next main 1.118 ( colored ) enter -stable Revision 1.118 / ( download ) - annotate - [select for diffs] , Tue Feb 14 19:25:05 2012 UTC (13 years, 11 months ago) by kettenis Branch: MAIN Changes since 1.117: +3 -3 lines Diff to previous 1.117 ( colored ) we are now hacking on 5.1-current Revision 1.117 / ( download ) - annotate - [select for diffs] , Tue Feb 7 17:30:00 2012 UTC (13 years, 11 months ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_5_1_BASE Branch point for: OPENBSD_5_1 Changes since 1.116: +3 -3 lines Diff to previous 1.116 ( colored ) move out of -beta Revision 1.116 / ( download ) - annotate - [select for diffs] , Thu Jan 12 00:35:59 2012 UTC (14 years ago) by sthen Branch: MAIN Changes since 1.115: +2 -2 lines Diff to previous 1.115 ( colored ) s/5.0/5.1/, ok deraadt@ Revision 1.115 / ( download ) - annotate - [select for diffs] , Wed Jan 11 22:11:35 2012 UTC (14 years ago) by deraadt Branch: MAIN Changes since 1.114: +3 -3 lines Diff to previous 1.114 ( colored ) crank to 5.1-beta Revision 1.113.2.1 / ( download ) - annotate - [select for diffs] , Wed Oct 5 10:44:46 2011 UTC (14 years, 3 months ago) by henning Branch: OPENBSD_5_0 Changes since 1.113: +2 -2 lines Diff to previous 1.113 ( colored ) next main 1.114 ( colored ) enter -stable Revision 1.114 / ( download ) - annotate - [select for diffs] , Tue Aug 16 21:00:48 2011 UTC (14 years, 5 months ago) by kettenis Branch: MAIN Changes since 1.113: +3 -3 lines Diff to previous 1.113 ( colored ) we are now hacking on 5.0-current requested by deraadt@ Revision 1.113 / ( download ) - annotate - [select for diffs] , Wed Aug 3 18:45:55 2011 UTC (14 years, 5 months ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_5_0_BASE Branch point for: OPENBSD_5_0 Changes since 1.112: +3 -3 lines Diff to previous 1.112 ( colored ) move to release Revision 1.112 / ( download ) - annotate - [select for diffs] , Mon Jul 18 07:07:52 2011 UTC (14 years, 6 months ago) by deraadt Branch: MAIN Changes since 1.111: +4 -4 lines Diff to previous 1.111 ( colored ) take us to 5.0-beta Revision 1.110.2.1 / ( download ) - annotate - [select for diffs] , Wed Apr 20 14:16:54 2011 UTC (14 years, 8 months ago) by henning Branch: OPENBSD_4_9 Changes since 1.110: +2 -2 lines Diff to previous 1.110 ( colored ) next main 1.111 ( colored ) enter -stable Revision 1.111 / ( download ) - annotate - [select for diffs] , Wed Mar 2 01:58:39 2011 UTC (14 years, 10 months ago) by deraadt Branch: MAIN Changes since 1.110: +3 -3 lines Diff to previous 1.110 ( colored ) we are now hacking on 4.9-current Revision 1.110 / ( download ) - annotate - [select for diffs] , Tue Feb 15 07:14:45 2011 UTC (14 years, 11 months ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_4_9_BASE Branch point for: OPENBSD_4_9 Changes since 1.109: +3 -3 lines Diff to previous 1.109 ( colored ) move us to real 4.9 Revision 1.109 / ( download ) - annotate - [select for diffs] , Thu Jan 13 23:17:50 2011 UTC (15 years ago) by deraadt Branch: MAIN Changes since 1.108: +4 -4 lines Diff to previous 1.108 ( colored ) move to 4.9-current Revision 1.108 / ( download ) - annotate - [select for diffs] , Mon Oct 18 19:17:29 2010 UTC (15 years, 2 months ago) by deraadt Branch: MAIN Changes since 1.107: +1 -4 lines Diff to previous 1.107 ( colored ) tmac update no longer needed Revision 1.106.2.1 / ( download ) - annotate - [select for diffs] , Sat Oct 2 03:03:15 2010 UTC (15 years, 3 months ago) by william Branch: OPENBSD_4_8 Changes since 1.106: +2 -2 lines Diff to previous 1.106 ( colored ) next main 1.107 ( colored ) 4.8-stable ok deraadt Revision 1.107 / ( download ) - annotate - [select for diffs] , Thu Aug 12 00:25:24 2010 UTC (15 years, 5 months ago) by deraadt Branch: MAIN Changes since 1.106: +3 -3 lines Diff to previous 1.106 ( colored ) we are at -current again Revision 1.106 / ( download ) - annotate - [select for diffs] , Sun Aug 8 17:18:31 2010 UTC (15 years, 5 months ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_4_8_BASE Branch point for: OPENBSD_4_8 Changes since 1.105: +3 -3 lines Diff to previous 1.105 ( colored ) take us to release Revision 1.105 / ( download ) - annotate - [select for diffs] , Sat Jul 24 15:31:53 2010 UTC (15 years, 5 months ago) by deraadt Branch: MAIN Changes since 1.104: +4 -4 lines Diff to previous 1.104 ( colored ) move to 4.8-beta Revision 1.103.2.1 / ( download ) - annotate - [select for diffs] , Fri Jun 11 01:32:25 2010 UTC (15 years, 7 months ago) by william Branch: OPENBSD_4_7 Changes since 1.103: +2 -2 lines Diff to previous 1.103 ( colored ) next main 1.104 ( colored ) 4.7-stable; ok deraadt@ Revision 1.104 / ( download ) - annotate - [select for diffs] , Thu Mar 18 21:17:48 2010 UTC (15 years, 10 months ago) by otto Branch: MAIN Changes since 1.103: +5 -3 lines Diff to previous 1.103 ( colored ) move to 4.7-current Revision 1.103 / ( download ) - annotate - [select for diffs] , Fri Mar 5 10:59:35 2010 UTC (15 years, 10 months ago) by miod Branch: MAIN CVS Tags: OPENBSD_4_7_BASE Branch point for: OPENBSD_4_7 Changes since 1.102: +3 -3 lines Diff to previous 1.102 ( colored ) head towards release, correctly. tsk tsk tsk. Revision 1.102 / ( download ) - annotate - [select for diffs] , Fri Mar 5 08:54:01 2010 UTC (15 years, 10 months ago) by deraadt Branch: MAIN Changes since 1.101: +2 -2 lines Diff to previous 1.101 ( colored ) head towards release Revision 1.101 / ( download ) - annotate - [select for diffs] , Tue Jan 26 23:04:28 2010 UTC (15 years, 11 months ago) by miod Branch: MAIN Changes since 1.100: +4 -4 lines Diff to previous 1.100 ( colored ) 4.7-BETA (also, lo-carb and ozone layer friendly) Revision 1.99.4.1 / ( download ) - annotate - [select for diffs] , Sat Aug 8 10:41:41 2009 UTC (16 years, 5 months ago) by henning Branch: OPENBSD_4_6 Changes since 1.99: +2 -2 lines Diff to previous 1.99 ( colored ) next main 1.100 ( colored ) reveal identidy Revision 1.100 / ( download ) - annotate - [select for diffs] , Sun Jul 5 23:42:51 2009 UTC (16 years, 6 months ago) by dlg Branch: MAIN Changes since 1.99: +2 -2 lines Diff to previous 1.99 ( colored ) take us to 4.6-current Revision 1.99 / ( download ) - annotate - [select for diffs] , Wed Jul 1 15:10:25 2009 UTC (16 years, 6 months ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_4_6_BASE Branch point for: OPENBSD_4_6 Changes since 1.98: +3 -3 lines Diff to previous 1.98 ( colored ) take us to 4.6, though there will still be some changes Revision 1.98 / ( download ) - annotate - [select for diffs] , Sat Jun 20 23:38:12 2009 UTC (16 years, 6 months ago) by miod Branch: MAIN Changes since 1.97: +4 -6 lines Diff to previous 1.97 ( colored ) 4.6-BETA Revision 1.97 / ( download ) - annotate - [select for diffs] , Sun May 17 02:02:30 2009 UTC (16 years, 8 months ago) by deraadt Branch: MAIN Changes since 1.96: +1 -2 lines Diff to previous 1.96 ( colored ) the previous was a bug, and has been fixed Revision 1.96 / ( download ) - annotate - [select for diffs] , Sat May 16 22:24:11 2009 UTC (16 years, 8 months ago) by miod Branch: MAIN Changes since 1.95: +2 -1 lines Diff to previous 1.95 ( colored ) distrib/miniroot/install.sub now embeds the current version number in two places, update comments accordingly. Revision 1.94.2.1 / ( download ) - annotate - [select for diffs] , Fri May 1 05:42:44 2009 UTC (16 years, 8 months ago) by deraadt Branch: OPENBSD_4_5 Changes since 1.94: +2 -2 lines Diff to previous 1.94 ( colored ) next main 1.95 ( colored ) move OPENBSD_4_5 to -stable; Maurice Janssen Revision 1.95 / ( download ) - annotate - [select for diffs] , Sun Mar 1 02:21:07 2009 UTC (16 years, 10 months ago) by deraadt Branch: MAIN Changes since 1.94: +3 -3 lines Diff to previous 1.94 ( colored ) move to 4.5-current Revision 1.94 / ( download ) - annotate - [select for diffs] , Thu Feb 26 17:55:17 2009 UTC (16 years, 10 months ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_4_5_BASE Branch point for: OPENBSD_4_5 Changes since 1.93: +3 -3 lines Diff to previous 1.93 ( colored ) declare builds from around here to be 4.5 instead of 4.5-beta, though it is not really true since there are a few more (very important) things going in. Revision 1.93 / ( download ) - annotate - [select for diffs] , Sun Feb 8 21:02:22 2009 UTC (16 years, 11 months ago) by miod Branch: MAIN Changes since 1.92: +4 -4 lines Diff to previous 1.92 ( colored ) Move to 4.5-BETA Revision 1.91.2.1 / ( download ) - annotate - [select for diffs] , Sun Nov 2 03:54:55 2008 UTC (17 years, 2 months ago) by brad Branch: OPENBSD_4_4 Changes since 1.91: +3 -2 lines Diff to previous 1.91 ( colored ) next main 1.92 ( colored ) Here comes -stable. Revision 1.92 / ( download ) - annotate - [select for diffs] , Thu Aug 7 17:18:03 2008 UTC (17 years, 5 months ago) by deraadt Branch: MAIN Changes since 1.91: +3 -3 lines Diff to previous 1.91 ( colored ) we are at 4.4-current Revision 1.91 / ( download ) - annotate - [select for diffs] , Wed Aug 6 03:56:53 2008 UTC (17 years, 5 months ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_4_4_BASE Branch point for: OPENBSD_4_4 Changes since 1.90: +3 -3 lines Diff to previous 1.90 ( colored ) we are no longer in -beta Revision 1.90 / ( download ) - annotate - [select for diffs] , Wed Jul 2 00:13:32 2008 UTC (17 years, 6 months ago) by deraadt Branch: MAIN Changes since 1.89: +4 -4 lines Diff to previous 1.89 ( colored ) move to 4.4-beta Revision 1.88.2.1 / ( download ) - annotate - [select for diffs] , Wed Jun 4 09:26:46 2008 UTC (17 years, 7 months ago) by henning Branch: OPENBSD_4_3 Changes since 1.88: +2 -2 lines Diff to previous 1.88 ( colored ) next main 1.89 ( colored ) -stable; noticed by otto Revision 1.89 / ( download ) - annotate - [select for diffs] , Sat Mar 8 00:00:17 2008 UTC (17 years, 10 months ago) by deraadt Branch: MAIN Changes since 1.88: +3 -3 lines Diff to previous 1.88 ( colored ) move us to 4.3-current Revision 1.88 / ( download ) - annotate - [select for diffs] , Tue Mar 4 18:37:52 2008 UTC (17 years, 10 months ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_4_3_BASE Branch point for: OPENBSD_4_3 Changes since 1.87: +3 -3 lines Diff to previous 1.87 ( colored ) remove -beta Revision 1.87 / ( download ) - annotate - [select for diffs] , Wed Feb 20 17:46:51 2008 UTC (17 years, 10 months ago) by miod Branch: MAIN Changes since 1.86: +4 -4 lines Diff to previous 1.86 ( colored ) 4.3-beta Revision 1.85.2.1 / ( download ) - annotate - [select for diffs] , Thu Oct 11 11:30:19 2007 UTC (18 years, 3 months ago) by henning Branch: OPENBSD_4_2 Changes since 1.85: +2 -2 lines Diff to previous 1.85 ( colored ) next main 1.86 ( colored ) enter -stable Revision 1.86 / ( download ) - annotate - [select for diffs] , Tue Aug 21 18:53:28 2007 UTC (18 years, 4 months ago) by kettenis Branch: MAIN Changes since 1.85: +3 -3 lines Diff to previous 1.85 ( colored ) unlock tree, move towards 4.2-current requested by deraadt@ Revision 1.85 / ( download ) - annotate - [select for diffs] , Sun Aug 5 14:20:36 2007 UTC (18 years, 5 months ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_4_2_BASE Branch point for: OPENBSD_4_2 Changes since 1.84: +3 -3 lines Diff to previous 1.84 ( colored ) remove -beta Revision 1.84 / ( download ) - annotate - [select for diffs] , Wed Jul 25 20:07:27 2007 UTC (18 years, 5 months ago) by deraadt Branch: MAIN Changes since 1.83: +4 -4 lines Diff to previous 1.83 ( colored ) crank to 4.2-beta Revision 1.82.2.1 / ( download ) - annotate - [select for diffs] , Thu May 3 10:12:09 2007 UTC (18 years, 8 months ago) by henning Branch: OPENBSD_4_1 Changes since 1.82: +2 -2 lines Diff to previous 1.82 ( colored ) next main 1.83 ( colored ) enter -stable Revision 1.83 / ( download ) - annotate - [select for diffs] , Mon Mar 12 00:23:25 2007 UTC (18 years, 10 months ago) by deraadt Branch: MAIN Changes since 1.82: +4 -4 lines Diff to previous 1.82 ( colored ) unlock tree, move on towards 4.1-current Revision 1.82 / ( download ) - annotate - [select for diffs] , Thu Mar 1 16:33:08 2007 UTC (18 years, 10 months ago) by pvalchev Branch: MAIN CVS Tags: OPENBSD_4_1_BASE Branch point for: OPENBSD_4_1 Changes since 1.81: +3 -3 lines Diff to previous 1.81 ( colored ) strip off -beta; ok deraadt Revision 1.81 / ( download ) - annotate - [select for diffs] , Mon Feb 12 13:10:02 2007 UTC (18 years, 11 months ago) by henning Branch: MAIN Changes since 1.80: +4 -4 lines Diff to previous 1.80 ( colored ) 4.1-beta Revision 1.78.2.1 / ( download ) - annotate - [select for diffs] , Thu Nov 2 01:49:04 2006 UTC (19 years, 2 months ago) by brad Branch: OPENBSD_4_0 Changes since 1.78: +3 -2 lines Diff to previous 1.78 ( colored ) next main 1.79 ( colored ) -stable Revision 1.80 / ( download ) - annotate - [select for diffs] , Sun Sep 17 16:47:27 2006 UTC (19 years, 4 months ago) by steven Branch: MAIN Changes since 1.79: +2 -2 lines Diff to previous 1.79 ( colored ) 4.0-current. yes deraadt Revision 1.79 / ( download ) - annotate - [select for diffs] , Sun Sep 17 16:25:30 2006 UTC (19 years, 4 months ago) by deraadt Branch: MAIN Changes since 1.78: +4 -4 lines Diff to previous 1.78 ( colored ) moving to 4.1-current Revision 1.78 / ( download ) - annotate - [select for diffs] , Mon Aug 28 21:16:16 2006 UTC (19 years, 4 months ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_4_0_BASE Branch point for: OPENBSD_4_0 Changes since 1.77: +3 -3 lines Diff to previous 1.77 ( colored ) move to official 4.0 Revision 1.77 / ( download ) - annotate - [select for diffs] , Wed Jul 26 20:34:11 2006 UTC (19 years, 5 months ago) by deraadt Branch: MAIN Changes since 1.76: +4 -4 lines Diff to previous 1.76 ( colored ) crank to 4.0-beta Revision 1.74.2.1 / ( download ) - annotate - [select for diffs] , Mon May 1 16:01:21 2006 UTC (19 years, 8 months ago) by brad Branch: OPENBSD_3_9 Changes since 1.74: +3 -2 lines Diff to previous 1.74 ( colored ) next main 1.75 ( colored ) -stable Revision 1.76 / ( download ) - annotate - [select for diffs] , Sat Mar 4 11:40:22 2006 UTC (19 years, 10 months ago) by grange Branch: MAIN Changes since 1.75: +3 -3 lines Diff to previous 1.75 ( colored ) -current, not -beta. Revision 1.75 / ( download ) - annotate - [select for diffs] , Sat Mar 4 02:56:10 2006 UTC (19 years, 10 months ago) by deraadt Branch: MAIN Changes since 1.74: +3 -3 lines Diff to previous 1.74 ( colored ) move to 3.9-current Revision 1.74 / ( download ) - annotate - [select for diffs] , Mon Feb 27 01:43:27 2006 UTC (19 years, 10 months ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_3_9_BASE Branch point for: OPENBSD_3_9 Changes since 1.73: +3 -3 lines Diff to previous 1.73 ( colored ) stop being -beta Revision 1.73 / ( download ) - annotate - [select for diffs] , Thu Jan 19 03:30:04 2006 UTC (19 years, 11 months ago) by deraadt Branch: MAIN Changes since 1.72: +4 -4 lines Diff to previous 1.72 ( colored ) crank to 3.8-beta Revision 1.71.2.1 / ( download ) - annotate - [select for diffs] , Tue Nov 1 01:07:32 2005 UTC (20 years, 2 months ago) by brad Branch: OPENBSD_3_8 Changes since 1.71: +3 -2 lines Diff to previous 1.71 ( colored ) next main 1.72 ( colored ) and here comes -stable Revision 1.72 / ( download ) - annotate - [select for diffs] , Mon Sep 5 20:43:25 2005 UTC (20 years, 4 months ago) by miod Branch: MAIN Changes since 1.71: +3 -3 lines Diff to previous 1.71 ( colored ) On the road again. Revision 1.71 / ( download ) - annotate - [select for diffs] , Sat Aug 27 16:47:04 2005 UTC (20 years, 4 months ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_3_8_BASE Branch point for: OPENBSD_3_8 Changes since 1.70: +3 -3 lines Diff to previous 1.70 ( colored ) remove -beta tag Revision 1.70 / ( download ) - annotate - [select for diffs] , Tue Aug 9 00:46:15 2005 UTC (20 years, 5 months ago) by deraadt Branch: MAIN Changes since 1.69: +4 -4 lines Diff to previous 1.69 ( colored ) move to 3.8-beta Revision 1.68.2.1 / ( download ) - annotate - [select for diffs] , Sun May 22 21:34:52 2005 UTC (20 years, 7 months ago) by brad Branch: OPENBSD_3_7 Changes since 1.68: +3 -2 lines Diff to previous 1.68 ( colored ) next main 1.69 ( colored ) and here comes -stable Revision 1.69 / ( download ) - annotate - [select for diffs] , Mon Mar 21 22:29:45 2005 UTC (20 years, 9 months ago) by miod Branch: MAIN Changes since 1.68: +3 -3 lines Diff to previous 1.68 ( colored ) Voltage reinforcements. Revision 1.68 / ( download ) - annotate - [select for diffs] , Tue Mar 15 21:26:50 2005 UTC (20 years, 10 months ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_3_7_BASE Branch point for: OPENBSD_3_7 Changes since 1.67: +3 -3 lines Diff to previous 1.67 ( colored ) tag for release, more things coming, but ports needs this Revision 1.67 / ( download ) - annotate - [select for diff | 2026-01-13T09:29:14 |
https://th-th.facebook.com/login/?next=https%3A%2F%2Fl.facebook.com%2Fl.php%3Fu%3Dhttps%253A%252F%252Fwww.instagram.com%252F%26amp%253Bh%3DAT01G6_nw6Bh-5sCbp2-aSr0g4Qn7kzux3KaClq4B-Ydqu_2cilx63HukRJNrpVSfO5KTOnvI2cAQAO9cOP5vcEy6U8cteIXFwQYm9A31sMi4P1LSY6nof6oJFyCIthvYsIp7MuPsMmVpsdU | Facebook Facebook อีเมลหรือโทรศัพท์ รหัสผ่าน ลืมบัญชีใช่หรือไม่ สร้างบัญชีใหม่ คุณถูกบล็อกชั่วคราว คุณถูกบล็อกชั่วคราว ดูเหมือนว่าคุณจะใช้คุณสมบัตินี้ในทางที่ผิดโดยการใช้เร็วเกินไป คุณถูกบล็อกจากการใช้โดยชั่วคราว Back ภาษาไทย 한국어 English (US) Tiếng Việt Bahasa Indonesia Español 中文(简体) 日本語 Português (Brasil) Français (France) Deutsch สมัคร เข้าสู่ระบบ Messenger Facebook Lite วิดีโอ Meta Pay Meta Store Meta Quest Ray-Ban Meta Meta AI เนื้อหาเพิ่มเติมจาก Meta AI Instagram Threads ศูนย์ข้อมูลการลงคะแนนเสียง นโยบายความเป็นส่วนตัว ศูนย์ความเป็นส่วนตัว เกี่ยวกับ สร้างโฆษณา สร้างเพจ ผู้พัฒนา ร่วมงานกับ Facebook คุกกี้ ตัวเลือกโฆษณา เงื่อนไข ความช่วยเหลือ การอัพโหลดผู้ติดต่อและผู้ที่ไม่ได้ใช้บริการ การตั้งค่า บันทึกกิจกรรม Meta © 2026 | 2026-01-13T09:29:14 |
https://doc.rust-lang.org/std/error/trait.Error.html | Error in std::error - Rust This old browser is unsupported and will most likely display funky things. Error std 1.92.0 (ded5c06cf 2025-12-08) Error Sections Error source Example Provided Methods cause description provide source Methods downcast downcast downcast downcast_mut downcast_mut downcast_mut downcast_ref downcast_ref downcast_ref is is is sources Trait Implementations From<&str> From<&str> From<Cow<'b, str>> From<Cow<'b, str>> From<E> From<E> From<String> From<String> Implementors In std:: error std :: error Trait Error Copy item path 1.0.0 · Source pub trait Error: Debug + Display { // Provided methods fn source (&self) -> Option <&(dyn Error + 'static)> { ... } fn description (&self) -> & str { ... } fn cause (&self) -> Option <&dyn Error > { ... } fn provide <'a>(&'a self, request: &mut Request <'a>) { ... } } Expand description Error is a trait representing the basic expectations for error values, i.e., values of type E in Result<T, E> . Errors must describe themselves through the Display and Debug traits. Error messages are typically concise lowercase sentences without trailing punctuation: let err = "NaN" .parse::<u32>().unwrap_err(); assert_eq! (err.to_string(), "invalid digit found in string" ); § Error source Errors may provide cause information. Error::source() is generally used when errors cross “abstraction boundaries”. If one module must report an error that is caused by an error from a lower-level module, it can allow accessing that error via Error::source() . This makes it possible for the high-level module to provide its own errors while also revealing some of the implementation for debugging. In error types that wrap an underlying error, the underlying error should be either returned by the outer error’s Error::source() , or rendered by the outer error’s Display implementation, but not both. § Example Implementing the Error trait only requires that Debug and Display are implemented too. use std::error::Error; use std::fmt; use std::path::PathBuf; #[derive(Debug)] struct ReadConfigError { path: PathBuf } impl fmt::Display for ReadConfigError { fn fmt( & self , f: &mut fmt::Formatter< '_ >) -> fmt::Result { let path = self .path.display(); write! (f, "unable to read configuration at {path}" ) } } impl Error for ReadConfigError {} Provided Methods § 1.30.0 · Source fn source (&self) -> Option <&(dyn Error + 'static)> Returns the lower-level source of this error, if any. § Examples use std::error::Error; use std::fmt; #[derive(Debug)] struct SuperError { source: SuperErrorSideKick, } impl fmt::Display for SuperError { fn fmt( & self , f: &mut fmt::Formatter< '_ >) -> fmt::Result { write! (f, "SuperError is here!" ) } } impl Error for SuperError { fn source( & self ) -> Option < & ( dyn Error + 'static )> { Some ( & self .source) } } #[derive(Debug)] struct SuperErrorSideKick; impl fmt::Display for SuperErrorSideKick { fn fmt( & self , f: &mut fmt::Formatter< '_ >) -> fmt::Result { write! (f, "SuperErrorSideKick is here!" ) } } impl Error for SuperErrorSideKick {} fn get_super_error() -> Result <(), SuperError> { Err (SuperError { source: SuperErrorSideKick }) } fn main() { match get_super_error() { Err (e) => { println! ( "Error: {e}" ); println! ( "Caused by: {}" , e.source().unwrap()); } _ => println! ( "No error" ), } } 1.0.0 · Source fn description (&self) -> & str 👎 Deprecated since 1.42.0: use the Display impl or to_string() if let Err (e) = "xc" .parse::<u32>() { // Print `e` itself, no need for description(). eprintln! ( "Error: {e}" ); } 1.0.0 · Source fn cause (&self) -> Option <&dyn Error > 👎 Deprecated since 1.33.0: replaced by Error::source, which can support downcasting Source fn provide <'a>(&'a self, request: &mut Request <'a>) 🔬 This is a nightly-only experimental API. ( error_generic_member_access #99301 ) Provides type-based access to context intended for error reports. Used in conjunction with Request::provide_value and Request::provide_ref to extract references to member variables from dyn Error trait objects. § Example #![feature(error_generic_member_access)] use core::fmt; use core::error::{request_ref, Request}; #[derive(Debug)] enum MyLittleTeaPot { Empty, } #[derive(Debug)] struct MyBacktrace { // ... } impl MyBacktrace { fn new() -> MyBacktrace { // ... } } #[derive(Debug)] struct Error { backtrace: MyBacktrace, } impl fmt::Display for Error { fn fmt( & self , f: &mut fmt::Formatter< '_ >) -> fmt::Result { write! (f, "Example Error" ) } } impl std::error::Error for Error { fn provide< 'a >( & 'a self , request: &mut Request< 'a >) { request .provide_ref::<MyBacktrace>( & self .backtrace); } } fn main() { let backtrace = MyBacktrace::new(); let error = Error { backtrace }; let dyn_error = & error as & dyn std::error::Error; let backtrace_ref = request_ref::<MyBacktrace>(dyn_error).unwrap(); assert! (core::ptr::eq( & error.backtrace, backtrace_ref)); assert! (request_ref::<MyLittleTeaPot>(dyn_error).is_none()); } Implementations § Source § impl dyn Error 1.3.0 · Source pub fn is <T>(&self) -> bool where T: Error + 'static, Returns true if the inner type is the same as T . 1.3.0 · Source pub fn downcast_ref <T>(&self) -> Option < &T > where T: Error + 'static, Returns some reference to the inner value if it is of type T , or None if it isn’t. 1.3.0 · Source pub fn downcast_mut <T>(&mut self) -> Option < &mut T > where T: Error + 'static, Returns some mutable reference to the inner value if it is of type T , or None if it isn’t. Source § impl dyn Error + Send 1.3.0 · Source pub fn is <T>(&self) -> bool where T: Error + 'static, Forwards to the method defined on the type dyn Error . 1.3.0 · Source pub fn downcast_ref <T>(&self) -> Option < &T > where T: Error + 'static, Forwards to the method defined on the type dyn Error . 1.3.0 · Source pub fn downcast_mut <T>(&mut self) -> Option < &mut T > where T: Error + 'static, Forwards to the method defined on the type dyn Error . Source § impl dyn Error + Send + Sync 1.3.0 · Source pub fn is <T>(&self) -> bool where T: Error + 'static, Forwards to the method defined on the type dyn Error . 1.3.0 · Source pub fn downcast_ref <T>(&self) -> Option < &T > where T: Error + 'static, Forwards to the method defined on the type dyn Error . 1.3.0 · Source pub fn downcast_mut <T>(&mut self) -> Option < &mut T > where T: Error + 'static, Forwards to the method defined on the type dyn Error . Source § impl dyn Error Source pub fn sources (&self) -> Source <'_> ⓘ 🔬 This is a nightly-only experimental API. ( error_iter #58520 ) Returns an iterator starting with the current error and continuing with recursively calling Error::source . If you want to omit the current error and only use its sources, use skip(1) . § Examples #![feature(error_iter)] use std::error::Error; use std::fmt; #[derive(Debug)] struct A; #[derive(Debug)] struct B( Option <Box< dyn Error + 'static >>); impl fmt::Display for A { fn fmt( & self , f: &mut fmt::Formatter< '_ >) -> fmt::Result { write! (f, "A" ) } } impl fmt::Display for B { fn fmt( & self , f: &mut fmt::Formatter< '_ >) -> fmt::Result { write! (f, "B" ) } } impl Error for A {} impl Error for B { fn source( & self ) -> Option < & ( dyn Error + 'static )> { self . 0 .as_ref().map(|e| e.as_ref()) } } let b = B( Some (Box::new(A))); // let err : Box<Error> = b.into(); // or let err = & b as & dyn Error; let mut iter = err.sources(); assert_eq! ( "B" .to_string(), iter.next().unwrap().to_string()); assert_eq! ( "A" .to_string(), iter.next().unwrap().to_string()); assert! (iter.next().is_none()); assert! (iter.next().is_none()); Source § impl dyn Error 1.3.0 · Source pub fn downcast <T>(self: Box <dyn Error >) -> Result < Box <T>, Box <dyn Error >> where T: Error + 'static, Attempts to downcast the box to a concrete type. Source § impl dyn Error + Send 1.3.0 · Source pub fn downcast <T>( self: Box <dyn Error + Send >, ) -> Result < Box <T>, Box <dyn Error + Send >> where T: Error + 'static, Attempts to downcast the box to a concrete type. Source § impl dyn Error + Send + Sync 1.3.0 · Source pub fn downcast <T>( self: Box <dyn Error + Send + Sync >, ) -> Result < Box <T>, Box <dyn Error + Send + Sync >> where T: Error + 'static, Attempts to downcast the box to a concrete type. Trait Implementations § 1.6.0 · Source § impl<'a> From <& str > for Box <dyn Error + 'a> Source § fn from (err: & str ) -> Box <dyn Error + 'a> Converts a str into a box of dyn Error . § Examples use std::error::Error; let a_str_error = "a str error" ; let a_boxed_error = Box::< dyn Error>::from(a_str_error); assert! (size_of::<Box< dyn Error>>() == size_of_val( & a_boxed_error)) 1.0.0 · Source § impl<'a> From <& str > for Box <dyn Error + Send + Sync + 'a> Source § fn from (err: & str ) -> Box <dyn Error + Send + Sync + 'a> Converts a str into a box of dyn Error + Send + Sync . § Examples use std::error::Error; let a_str_error = "a str error" ; let a_boxed_error = Box::< dyn Error + Send + Sync>::from(a_str_error); assert! ( size_of::<Box< dyn Error + Send + Sync>>() == size_of_val( & a_boxed_error)) 1.22.0 · Source § impl<'a, 'b> From < Cow <'b, str >> for Box <dyn Error + 'a> Source § fn from (err: Cow <'b, str >) -> Box <dyn Error + 'a> Converts a Cow into a box of dyn Error . § Examples use std::error::Error; use std::borrow::Cow; let a_cow_str_error = Cow::from( "a str error" ); let a_boxed_error = Box::< dyn Error>::from(a_cow_str_error); assert! (size_of::<Box< dyn Error>>() == size_of_val( & a_boxed_error)) 1.22.0 · Source § impl<'a, 'b> From < Cow <'b, str >> for Box <dyn Error + Send + Sync + 'a> Source § fn from (err: Cow <'b, str >) -> Box <dyn Error + Send + Sync + 'a> Converts a Cow into a box of dyn Error + Send + Sync . § Examples use std::error::Error; use std::borrow::Cow; let a_cow_str_error = Cow::from( "a str error" ); let a_boxed_error = Box::< dyn Error + Send + Sync>::from(a_cow_str_error); assert! ( size_of::<Box< dyn Error + Send + Sync>>() == size_of_val( & a_boxed_error)) 1.0.0 · Source § impl<'a, E> From <E> for Box <dyn Error + 'a> where E: Error + 'a, Source § fn from (err: E) -> Box <dyn Error + 'a> Converts a type of Error into a box of dyn Error . § Examples use std::error::Error; use std::fmt; #[derive(Debug)] struct AnError; impl fmt::Display for AnError { fn fmt( & self , f: &mut fmt::Formatter< '_ >) -> fmt::Result { write! (f, "An error" ) } } impl Error for AnError {} let an_error = AnError; assert! ( 0 == size_of_val( & an_error)); let a_boxed_error = Box::< dyn Error>::from(an_error); assert! (size_of::<Box< dyn Error>>() == size_of_val( & a_boxed_error)) 1.0.0 · Source § impl<'a, E> From <E> for Box <dyn Error + Send + Sync + 'a> where E: Error + Send + Sync + 'a, Source § fn from (err: E) -> Box <dyn Error + Send + Sync + 'a> Converts a type of Error + Send + Sync into a box of dyn Error + Send + Sync . § Examples use std::error::Error; use std::fmt; #[derive(Debug)] struct AnError; impl fmt::Display for AnError { fn fmt( & self , f: &mut fmt::Formatter< '_ >) -> fmt::Result { write! (f, "An error" ) } } impl Error for AnError {} unsafe impl Send for AnError {} unsafe impl Sync for AnError {} let an_error = AnError; assert! ( 0 == size_of_val( & an_error)); let a_boxed_error = Box::< dyn Error + Send + Sync>::from(an_error); assert! ( size_of::<Box< dyn Error + Send + Sync>>() == size_of_val( & a_boxed_error)) 1.6.0 · Source § impl<'a> From < String > for Box <dyn Error + 'a> Source § fn from (str_err: String ) -> Box <dyn Error + 'a> Converts a String into a box of dyn Error . § Examples use std::error::Error; let a_string_error = "a string error" .to_string(); let a_boxed_error = Box::< dyn Error>::from(a_string_error); assert! (size_of::<Box< dyn Error>>() == size_of_val( & a_boxed_error)) 1.0.0 · Source § impl<'a> From < String > for Box <dyn Error + Send + Sync + 'a> Source § fn from (err: String ) -> Box <dyn Error + Send + Sync + 'a> Converts a String into a box of dyn Error + Send + Sync . § Examples use std::error::Error; let a_string_error = "a string error" .to_string(); let a_boxed_error = Box::< dyn Error + Send + Sync>::from(a_string_error); assert! ( size_of::<Box< dyn Error + Send + Sync>>() == size_of_val( & a_boxed_error)) Implementors § 1.65.0 · Source § impl ! Error for & str 1.8.0 · Source § impl Error for Infallible 1.0.0 · Source § impl Error for VarError 1.17.0 · Source § impl Error for FromBytesWithNulError 1.89.0 · Source § impl Error for std::fs:: TryLockError 1.86.0 · Source § impl Error for GetDisjointMutError 1.15.0 · Source § impl Error for RecvTimeoutError 1.0.0 · Source § impl Error for TryRecvError Source § impl Error for ! Source § impl Error for AllocError 1.28.0 · Source § impl Error for LayoutError 1.34.0 · Source § impl Error for TryFromSliceError 1.13.0 · Source § impl Error for BorrowError 1.13.0 · Source § impl Error for BorrowMutError 1.34.0 · Source § impl Error for CharTryFromError 1.9.0 · Source § impl Error for DecodeUtf16Error 1.20.0 · Source § impl Error for ParseCharError 1.59.0 · Source § impl Error for TryFromCharError Source § impl Error for UnorderedKeyError 1.57.0 · Source § impl Error for TryReserveError 1.0.0 · Source § impl Error for JoinPathsError 1.69.0 · Source § impl Error for FromBytesUntilNulError 1.58.0 · Source § impl Error for FromVecWithNulError 1.7.0 · Source § impl Error for IntoStringError 1.0.0 · Source § impl Error for NulError 1.11.0 · Source § impl Error for std::fmt:: Error 1.0.0 · Source § impl Error for std::io:: Error 1.56.0 · Source § impl Error for WriterPanicked 1.4.0 · Source § impl Error for AddrParseError 1.0.0 · Source § impl Error for ParseFloatError 1.0.0 · Source § impl Error for ParseIntError 1.34.0 · Source § impl Error for TryFromIntError 1.63.0 · Source § impl Error for InvalidHandleError Available on Windows only. 1.63.0 · Source § impl Error for NullHandleError Available on Windows only. Source § impl Error for NormalizeError 1.7.0 · Source § impl Error for StripPrefixError Source § impl Error for ExitStatusError 1.0.0 · Source § impl Error for ParseBoolError 1.0.0 · Source § impl Error for Utf8Error 1.0.0 · Source § impl Error for FromUtf8Error 1.0.0 · Source § impl Error for FromUtf16Error 1.0.0 · Source § impl Error for RecvError 1.26.0 · Source § impl Error for AccessError 1.8.0 · Source § impl Error for SystemTimeError 1.66.0 · Source § impl Error for TryFromFloatSecsError Source § impl<'a, K, V> Error for std::collections::btree_map:: OccupiedError <'a, K, V> where K: Debug + Ord , V: Debug , Source § impl<'a, K: Debug , V: Debug > Error for std::collections::hash_map:: OccupiedError <'a, K, V> 1.51.0 · Source § impl<'a, T> Error for &'a T where T: Error + ? Sized , 1.8.0 · Source § impl<E> Error for Box <E> where E: Error , 1.0.0 · Source § impl<T> Error for std::sync:: TryLockError <T> Source § impl<T> Error for SendTimeoutError <T> 1.0.0 · Source § impl<T> Error for TrySendError <T> Source § impl<T> Error for ThinBox <T> where T: Error + ? Sized , 1.0.0 · Source § impl<T> Error for SendError <T> 1.52.0 · Source § impl<T> Error for Arc <T> where T: Error + ? Sized , 1.0.0 · Source § impl<T> Error for PoisonError <T> 1.0.0 · Source § impl<W: Send + Debug > Error for IntoInnerError <W> | 2026-01-13T09:29:14 |
https://doc.rust-lang.org/std/marker/trait.Sync.html | Sync in std::marker - Rust This old browser is unsupported and will most likely display funky things. Sync std 1.92.0 (ded5c06cf 2025-12-08) Sync Implementors Auto Implementors In std:: marker std :: marker Trait Sync Copy item path 1.0.0 · Source pub unsafe auto trait Sync { } Expand description Types for which it is safe to share references between threads. This trait is automatically implemented when the compiler determines it’s appropriate. The precise definition is: a type T is Sync if and only if &T is Send . In other words, if there is no possibility of undefined behavior (including data races) when passing &T references between threads. As one would expect, primitive types like u8 and f64 are all Sync , and so are simple aggregate types containing them, like tuples, structs and enums. More examples of basic Sync types include “immutable” types like &T , and those with simple inherited mutability, such as Box<T> , Vec<T> and most other collection types. (Generic parameters need to be Sync for their container to be Sync .) A somewhat surprising consequence of the definition is that &mut T is Sync (if T is Sync ) even though it seems like that might provide unsynchronized mutation. The trick is that a mutable reference behind a shared reference (that is, & &mut T ) becomes read-only, as if it were a & &T . Hence there is no risk of a data race. A shorter overview of how Sync and Send relate to referencing: &T is Send if and only if T is Sync &mut T is Send if and only if T is Send &T and &mut T are Sync if and only if T is Sync Types that are not Sync are those that have “interior mutability” in a non-thread-safe form, such as Cell and RefCell . These types allow for mutation of their contents even through an immutable, shared reference. For example the set method on Cell<T> takes &self , so it requires only a shared reference &Cell<T> . The method performs no synchronization, thus Cell cannot be Sync . Another example of a non- Sync type is the reference-counting pointer Rc . Given any reference &Rc<T> , you can clone a new Rc<T> , modifying the reference counts in a non-atomic way. For cases when one does need thread-safe interior mutability, Rust provides atomic data types , as well as explicit locking via sync::Mutex and sync::RwLock . These types ensure that any mutation cannot cause data races, hence the types are Sync . Likewise, sync::Arc provides a thread-safe analogue of Rc . Any types with interior mutability must also use the cell::UnsafeCell wrapper around the value(s) which can be mutated through a shared reference. Failing to doing this is undefined behavior . For example, transmute -ing from &T to &mut T is invalid. See the Nomicon for more details about Sync . Implementors § 1.26.0 · Source § impl ! Sync for Args 1.26.0 · Source § impl ! Sync for ArgsOs 1.0.0 · Source § impl ! Sync for Arguments <'_> Source § impl ! Sync for LocalWaker Source § impl Sync for core::ffi::c_str:: Bytes <'_> 1.0.0 · Source § impl Sync for TypeId 1.63.0 · Source § impl Sync for BorrowedHandle <'_> Available on Windows only. 1.63.0 · Source § impl Sync for HandleOrInvalid Available on Windows only. 1.63.0 · Source § impl Sync for HandleOrNull Available on Windows only. 1.63.0 · Source § impl Sync for OwnedHandle Available on Windows only. 1.10.0 · Source § impl Sync for Location <'_> 1.6.0 · Source § impl Sync for std::string:: Drain <'_> 1.0.0 · Source § impl Sync for AtomicBool 1.34.0 · Source § impl Sync for AtomicI8 1.34.0 · Source § impl Sync for AtomicI16 1.34.0 · Source § impl Sync for AtomicI32 1.34.0 · Source § impl Sync for AtomicI64 1.0.0 · Source § impl Sync for AtomicIsize 1.34.0 · Source § impl Sync for AtomicU8 1.34.0 · Source § impl Sync for AtomicU16 1.34.0 · Source § impl Sync for AtomicU32 1.34.0 · Source § impl Sync for AtomicU64 1.0.0 · Source § impl Sync for AtomicUsize 1.36.0 · Source § impl Sync for Waker 1.44.0 · Source § impl<'a> Sync for IoSlice <'a> 1.44.0 · Source § impl<'a> Sync for IoSliceMut <'a> Source § impl<Dyn> Sync for DynMetadata <Dyn> where Dyn: ? Sized , 1.0.0 · Source § impl<T> ! Sync for *const T where T: ? Sized , 1.0.0 · Source § impl<T> ! Sync for *mut T where T: ? Sized , 1.0.0 · Source § impl<T> ! Sync for Cell <T> where T: ? Sized , 1.70.0 · Source § impl<T> ! Sync for OnceCell <T> 1.0.0 · Source § impl<T> ! Sync for RefCell <T> where T: ? Sized , 1.0.0 · Source § impl<T> ! Sync for UnsafeCell <T> where T: ? Sized , 1.25.0 · Source § impl<T> ! Sync for NonNull <T> where T: ? Sized , NonNull pointers are not Sync because the data they reference may be aliased. 1.0.0 · Source § impl<T> ! Sync for std::sync::mpsc:: Receiver <T> Source § impl<T> Sync for ThinBox <T> where T: Sync + ? Sized , ThinBox<T> is Sync if T is Sync because the data is owned. Source § impl<T> Sync for SyncUnsafeCell <T> where T: Sync + ? Sized , 1.0.0 · Source § impl<T> Sync for std::collections::linked_list:: Iter <'_, T> where T: Sync , 1.0.0 · Source § impl<T> Sync for std::collections::linked_list:: IterMut <'_, T> where T: Sync , 1.28.0 · Source § impl<T> Sync for NonZero <T> where T: ZeroablePrimitive + Sync , Source § impl<T> Sync for UnsafePinned <T> where T: Sync + ? Sized , 1.31.0 · Source § impl<T> Sync for ChunksExactMut <'_, T> where T: Sync , 1.0.0 · Source § impl<T> Sync for ChunksMut <'_, T> where T: Sync , 1.0.0 · Source § impl<T> Sync for std::slice:: Iter <'_, T> where T: Sync , 1.0.0 · Source § impl<T> Sync for std::slice:: IterMut <'_, T> where T: Sync , 1.31.0 · Source § impl<T> Sync for RChunksExactMut <'_, T> where T: Sync , 1.31.0 · Source § impl<T> Sync for RChunksMut <'_, T> where T: Sync , 1.0.0 · Source § impl<T> Sync for AtomicPtr <T> Source § impl<T> Sync for Exclusive <T> where T: ? Sized , 1.29.0 · Source § impl<T> Sync for JoinHandle <T> 1.0.0 · Source § impl<T, A> ! Sync for Rc <T, A> where A: Allocator , T: ? Sized , Source § impl<T, A> ! Sync for UniqueRc <T, A> where A: Allocator , T: ? Sized , 1.4.0 · Source § impl<T, A> ! Sync for std::rc:: Weak <T, A> where A: Allocator , T: ? Sized , Source § impl<T, A> Sync for std::collections::linked_list:: Cursor <'_, T, A> where T: Sync , A: Allocator + Sync , Source § impl<T, A> Sync for std::collections::linked_list:: CursorMut <'_, T, A> where T: Sync , A: Allocator + Sync , 1.0.0 · Source § impl<T, A> Sync for LinkedList <T, A> where T: Sync , A: Allocator + Sync , 1.6.0 · Source § impl<T, A> Sync for std::collections::vec_deque:: Drain <'_, T, A> where T: Sync , A: Allocator + Sync , 1.0.0 · Source § impl<T, A> Sync for Arc <T, A> where T: Sync + Send + ? Sized , A: Allocator + Sync , Source § impl<T, A> Sync for UniqueArc <T, A> where T: Sync + Send + ? Sized , A: Allocator + Sync , 1.4.0 · Source § impl<T, A> Sync for std::sync:: Weak <T, A> where T: Sync + Send + ? Sized , A: Allocator + Sync , 1.6.0 · Source § impl<T, A> Sync for std::vec:: Drain <'_, T, A> where T: Sync , A: Sync + Allocator , 1.0.0 · Source § impl<T, A> Sync for std::vec:: IntoIter <T, A> where T: Sync , A: Allocator + Sync , Source § impl<T: Send + ? Sized > Sync for ReentrantLock <T> Source § impl<T: Send > Sync for std::sync::mpmc:: Receiver <T> Source § impl<T: Send > Sync for std::sync::mpmc:: Sender <T> 1.72.0 · Source § impl<T: Send > Sync for std::sync::mpsc:: Sender <T> 1.70.0 · Source § impl<T: Sync + Send > Sync for OnceLock <T> 1.80.0 · Source § impl<T: Sync + Send , F: Send > Sync for LazyLock <T, F> Source § impl<T: ? Sized + Send + Sync > Sync for std::sync::nonpoison:: RwLock <T> 1.0.0 · Source § impl<T: ? Sized + Send + Sync > Sync for std::sync:: RwLock <T> Source § impl<T: ? Sized + Send > Sync for std::sync::nonpoison:: Mutex <T> T must be Send for Mutex to be Sync . This ensures that the protected data can be accessed safely from multiple threads without causing data races or other unsafe behavior. Mutex<T> provides mutable access to T to one thread at a time. However, it’s essential for T to be Send because it’s not safe for non- Send structures to be accessed in this manner. For instance, consider Rc , a non-atomic reference counted smart pointer, which is not Send . With Rc , we can have multiple copies pointing to the same heap allocation with a non-atomic reference count. If we were to use Mutex<Rc<_>> , it would only protect one instance of Rc from shared access, leaving other copies vulnerable to potential data races. Also note that it is not necessary for T to be Sync as &T is only made available to one thread at a time if T is not Sync . 1.0.0 · Source § impl<T: ? Sized + Send > Sync for std::sync:: Mutex <T> T must be Send for Mutex to be Sync . This ensures that the protected data can be accessed safely from multiple threads without causing data races or other unsafe behavior. Mutex<T> provides mutable access to T to one thread at a time. However, it’s essential for T to be Send because it’s not safe for non- Send structures to be accessed in this manner. For instance, consider Rc , a non-atomic reference counted smart pointer, which is not Send . With Rc , we can have multiple copies pointing to the same heap allocation with a non-atomic reference count. If we were to use Mutex<Rc<_>> , it would only protect one instance of Rc from shared access, leaving other copies vulnerable to potential data races. Also note that it is not necessary for T to be Sync as &T is only made available to one thread at a time if T is not Sync . Source § impl<T: ? Sized + Sync > Sync for std::sync::nonpoison:: MappedMutexGuard <'_, T> Source § impl<T: ? Sized + Sync > Sync for std::sync::nonpoison:: MappedRwLockReadGuard <'_, T> Source § impl<T: ? Sized + Sync > Sync for std::sync::nonpoison:: MappedRwLockWriteGuard <'_, T> Source § impl<T: ? Sized + Sync > Sync for std::sync::nonpoison:: MutexGuard <'_, T> T must be Sync for a MutexGuard<T> to be Sync because it is possible to get a &T from &MutexGuard (via Deref ). Source § impl<T: ? Sized + Sync > Sync for std::sync::nonpoison:: RwLockReadGuard <'_, T> Source § impl<T: ? Sized + Sync > Sync for std::sync::nonpoison:: RwLockWriteGuard <'_, T> Source § impl<T: ? Sized + Sync > Sync for std::sync:: MappedMutexGuard <'_, T> Source § impl<T: ? Sized + Sync > Sync for std::sync:: MappedRwLockReadGuard <'_, T> Source § impl<T: ? Sized + Sync > Sync for std::sync:: MappedRwLockWriteGuard <'_, T> 1.19.0 · Source § impl<T: ? Sized + Sync > Sync for std::sync:: MutexGuard <'_, T> T must be Sync for a MutexGuard<T> to be Sync because it is possible to get a &T from &MutexGuard (via Deref ). Source § impl<T: ? Sized + Sync > Sync for ReentrantLockGuard <'_, T> 1.23.0 · Source § impl<T: ? Sized + Sync > Sync for std::sync:: RwLockReadGuard <'_, T> 1.23.0 · Source § impl<T: ? Sized + Sync > Sync for std::sync:: RwLockWriteGuard <'_, T> Auto implementors § § impl ! Sync for Vars § impl ! Sync for VarsOs § impl ! Sync for OnceState § impl ! Sync for RawWaker § impl Sync for AsciiChar § impl Sync for BacktraceStatus § impl Sync for std::cmp:: Ordering § impl Sync for TryReserveErrorKind § impl Sync for Infallible § impl Sync for VarError § impl Sync for FromBytesWithNulError § impl Sync for c_void § impl Sync for std::fmt:: Alignment § impl Sync for DebugAsHex § impl Sync for Sign § impl Sync for std::fs:: TryLockError § impl Sync for AtomicOrdering § impl Sync for BasicBlock § impl Sync for UnwindTerminateReason § impl Sync for ErrorKind § impl Sync for SeekFrom § impl Sync for IpAddr § impl Sync for Ipv6MulticastScope § impl Sync for Shutdown § impl Sync for std::net:: SocketAddr § impl Sync for FpCategory § impl Sync for IntErrorKind § impl Sync for OneSidedRangeBound § impl Sync for AncillaryError § impl Sync for BacktraceStyle § impl Sync for GetDisjointMutError § impl Sync for SearchStep § impl Sync for std::sync::atomic:: Ordering § impl Sync for RecvTimeoutError § impl Sync for TryRecvError § impl Sync for bool § impl Sync for char § impl Sync for f16 § impl Sync for f32 § impl Sync for f64 § impl Sync for f128 § impl Sync for i8 § impl Sync for i16 § impl Sync for i32 § impl Sync for i64 § impl Sync for i128 § impl Sync for isize § impl Sync for ! § impl Sync for str § impl Sync for u8 § impl Sync for u16 § impl Sync for u32 § impl Sync for u64 § impl Sync for u128 § impl Sync for () § impl Sync for usize § impl Sync for AllocError § impl Sync for Global § impl Sync for Layout § impl Sync for LayoutError § impl Sync for System § impl Sync for TryFromSliceError § impl Sync for std::ascii:: EscapeDefault § impl Sync for Backtrace § impl Sync for BacktraceFrame § impl Sync for ByteStr § impl Sync for ByteString § impl Sync for BorrowError § impl Sync for BorrowMutError § impl Sync for CharTryFromError § impl Sync for DecodeUtf16Error § impl Sync for std::char:: EscapeDebug § impl Sync for std::char:: EscapeDefault § impl Sync for std::char:: EscapeUnicode § impl Sync for ParseCharError § impl Sync for ToLowercase § impl Sync for ToUppercase § impl Sync for TryFromCharError § impl Sync for UnorderedKeyError § impl Sync for TryReserveError § impl Sync for JoinPathsError § impl Sync for CStr § impl Sync for CString § impl Sync for FromBytesUntilNulError § impl Sync for FromVecWithNulError § impl Sync for IntoStringError § impl Sync for NulError § impl Sync for OsStr § impl Sync for OsString § impl Sync for std::fmt:: Error § impl Sync for FormattingOptions § impl Sync for DirBuilder § impl Sync for DirEntry § impl Sync for File § impl Sync for FileTimes § impl Sync for FileType § impl Sync for Metadata § impl Sync for OpenOptions § impl Sync for Permissions § impl Sync for ReadDir § impl Sync for DefaultHasher § impl Sync for RandomState § impl Sync for SipHasher § impl Sync for ReturnToArg § impl Sync for UnwindActionArg § impl Sync for std::io:: Empty § impl Sync for std::io:: Error § impl Sync for PipeReader § impl Sync for PipeWriter § impl Sync for std::io:: Repeat § impl Sync for Sink § impl Sync for Stderr § impl Sync for Stdin § impl Sync for Stdout § impl Sync for WriterPanicked § impl Sync for Assume § impl Sync for AddrParseError § impl Sync for IntoIncoming § impl Sync for Ipv4Addr § impl Sync for Ipv6Addr § impl Sync for SocketAddrV4 § impl Sync for SocketAddrV6 § impl Sync for TcpListener § impl Sync for TcpStream § impl Sync for UdpSocket § impl Sync for ParseFloatError § impl Sync for ParseIntError § impl Sync for TryFromIntError § impl Sync for RangeFull § impl Sync for OwnedFd § impl Sync for PidFd § impl Sync for stat § impl Sync for std::os::unix::net:: SocketAddr § impl Sync for SocketCred § impl Sync for UCred § impl Sync for UnixDatagram § impl Sync for UnixListener § impl Sync for UnixStream § impl Sync for InvalidHandleError § impl Sync for NullHandleError § impl Sync for OwnedSocket § impl Sync for NormalizeError § impl Sync for Path § impl Sync for PathBuf § impl Sync for StripPrefixError § impl Sync for Child § impl Sync for ChildStderr § impl Sync for ChildStdin § impl Sync for ChildStdout § impl Sync for Command § impl Sync for ExitCode § impl Sync for ExitStatus § impl Sync for ExitStatusError § impl Sync for Output § impl Sync for Stdio § impl Sync for std::ptr:: Alignment § impl Sync for DefaultRandomSource § impl Sync for ParseBoolError § impl Sync for Utf8Error § impl Sync for FromUtf8Error § impl Sync for FromUtf16Error § impl Sync for IntoChars § impl Sync for String § impl Sync for RecvError § impl Sync for std::sync::nonpoison:: Condvar § impl Sync for WouldBlock § impl Sync for Barrier § impl Sync for BarrierWaitResult § impl Sync for std::sync:: Condvar § impl Sync for std::sync:: Once § impl Sync for WaitTimeoutResult § impl Sync for RawWakerVTable § impl Sync for AccessError § impl Sync for Builder § impl Sync for Thread § impl Sync for ThreadId § impl Sync for Duration § impl Sync for Instant § impl Sync for SystemTime § impl Sync for SystemTimeError § impl Sync for TryFromFloatSecsError § impl Sync for PhantomPinned § impl<'a> ! Sync for Request <'a> § impl<'a> ! Sync for Formatter <'a> § impl<'a> ! Sync for StderrLock <'a> § impl<'a> ! Sync for StdoutLock <'a> § impl<'a> ! Sync for ProcThreadAttributeListBuilder <'a> § impl<'a> ! Sync for PanicHookInfo <'a> § impl<'a> ! Sync for CommandArgs <'a> § impl<'a> ! Sync for Context <'a> § impl<'a> ! Sync for ContextBuilder <'a> § impl<'a> Sync for AncillaryData <'a> § impl<'a> Sync for Component <'a> § impl<'a> Sync for Prefix <'a> § impl<'a> Sync for Utf8Pattern <'a> § impl<'a> Sync for SplitPaths <'a> § impl<'a> Sync for std::ffi::os_str:: Display <'a> § impl<'a> Sync for BorrowedCursor <'a> § impl<'a> Sync for StdinLock <'a> § impl<'a> Sync for std::net:: Incoming <'a> § impl<'a> Sync for std::os::unix::net:: Incoming <'a> § impl<'a> Sync for Messages <'a> § impl<'a> Sync for ScmCredentials <'a> § impl<'a> Sync for ScmRights <'a> § impl<'a> Sync for SocketAncillary <'a> § impl<'a> Sync for EncodeWide <'a> § impl<'a> Sync for ProcThreadAttributeList <'a> § impl<'a> Sync for Ancestors <'a> § impl<'a> Sync for Components <'a> § impl<'a> Sync for std::path:: Display <'a> § impl<'a> Sync for std::path:: Iter <'a> § impl<'a> Sync for PrefixComponent <'a> § impl<'a> Sync for CommandEnvs <'a> § impl<'a> Sync for EscapeAscii <'a> § impl<'a> Sync for CharSearcher <'a> § impl<'a> Sync for std::str:: Bytes <'a> § impl<'a> Sync for CharIndices <'a> § impl<'a> Sync for Chars <'a> § impl<'a> Sync for EncodeUtf16 <'a> § impl<'a> Sync for std::str:: EscapeDebug <'a> § impl<'a> Sync for std::str:: EscapeDefault <'a> § impl<'a> Sync for std::str:: EscapeUnicode <'a> § impl<'a> Sync for std::str:: Lines <'a> § impl<'a> Sync for LinesAny <'a> § impl<'a> Sync for SplitAsciiWhitespace <'a> § impl<'a> Sync for SplitWhitespace <'a> § impl<'a> Sync for Utf8Chunk <'a> § impl<'a> Sync for Utf8Chunks <'a> § impl<'a> Sync for PhantomContravariantLifetime <'a> § impl<'a> Sync for PhantomCovariantLifetime <'a> § impl<'a> Sync for PhantomInvariantLifetime <'a> § impl<'a, 'b> ! Sync for DebugList <'a, 'b> § impl<'a, 'b> ! Sync for DebugMap <'a, 'b> § impl<'a, 'b> ! Sync for DebugSet <'a, 'b> § impl<'a, 'b> ! Sync for DebugStruct <'a, 'b> § impl<'a, 'b> ! Sync for DebugTuple <'a, 'b> § impl<'a, 'b> Sync for CharSliceSearcher <'a, 'b> § impl<'a, 'b> Sync for StrSearcher <'a, 'b> § impl<'a, 'b, const N: usize > Sync for CharArrayRefSearcher <'a, 'b, N> § impl<'a, 'f> ! Sync for VaList <'a, 'f> § impl<'a, A> Sync for std::option:: Iter <'a, A> where A: Sync , § impl<'a, A> Sync for std::option:: IterMut <'a, A> where A: Sync , § impl<'a, B> Sync for Cow <'a, B> where <B as ToOwned >:: Owned : Sync , B: Sync + ? Sized , § impl<'a, F> Sync for CharPredicateSearcher <'a, F> where F: Sync , § impl<'a, I> Sync for ByRefSized <'a, I> where I: Sync , § impl<'a, I, A> Sync for Splice <'a, I, A> where I: Sync , <I as Iterator >:: Item : Sync , A: Sync , § impl<'a, K> Sync for std::collections::btree_set:: Cursor <'a, K> where K: Sync , § impl<'a, K> Sync for std::collections::hash_set:: Drain <'a, K> where K: Sync , § impl<'a, K> Sync for std::collections::hash_set:: Iter <'a, K> where K: Sync , § impl<'a, K, A> Sync for std::collections::btree_set:: CursorMut <'a, K, A> where A: Sync , K: Sync , § impl<'a, K, A> Sync for std::collections::btree_set:: CursorMutKey <'a, K, A> where A: Sync , K: Sync , § impl<'a, K, F> Sync for std::collections::hash_set:: ExtractIf <'a, K, F> where F: Sync , K: Sync , § impl<'a, K, V> Sync for std::collections::hash_map:: Entry <'a, K, V> where K: Sync , V: Sync , § impl<'a, K, V> Sync for std::collections::btree_map:: Cursor <'a, K, V> where K: Sync , V: Sync , § impl<'a, K, V> Sync for std::collections::btree_map:: Iter <'a, K, V> where K: Sync , V: Sync , § impl<'a, K, V> Sync for std::collections::btree_map:: IterMut <'a, K, V> where K: Sync , V: Sync , § impl<'a, K, V> Sync for std::collections::btree_map:: Keys <'a, K, V> where K: Sync , V: Sync , § impl<'a, K, V> Sync for std::collections::btree_map:: Range <'a, K, V> where K: Sync , V: Sync , § impl<'a, K, V> Sync for RangeMut <'a, K, V> where K: Sync , V: Sync , § impl<'a, K, V> Sync for std::collections::btree_map:: Values <'a, K, V> where K: Sync , V: Sync , § impl<'a, K, V> Sync for std::collections::btree_map:: ValuesMut <'a, K, V> where K: Sync , V: Sync , § impl<'a, K, V> Sync for std::collections::hash_map:: Drain <'a, K, V> where K: Sync , V: Sync , § impl<'a, K, V> Sync for std::collections::hash_map:: Iter <'a, K, V> where K: Sync , V: Sync , § impl<'a, K, V> Sync for std::collections::hash_map:: IterMut <'a, K, V> where K: Sync , V: Sync , § impl<'a, K, V> Sync for std::collections::hash_map:: Keys <'a, K, V> where K: Sync , V: Sync , § impl<'a, K, V> Sync for std::collections::hash_map:: OccupiedEntry <'a, K, V> where K: Sync , V: Sync , § impl<'a, K, V> Sync for std::collections::hash_map:: OccupiedError <'a, K, V> where V: Sync , K: Sync , § impl<'a, K, V> Sync for std::collections::hash_map:: VacantEntry <'a, K, V> where K: Sync , V: Sync , § impl<'a, K, V> Sync for std::collections::hash_map:: Values <'a, K, V> where K: Sync , V: Sync , § impl<'a, K, V> Sync for std::collections::hash_map:: ValuesMut <'a, K, V> where K: Sync , V: Sync , § impl<'a, K, V, A> Sync for std::collections::btree_map:: Entry <'a, K, V, A> where K: Sync , A: Sync , V: Sync , § impl<'a, K, V, A> Sync for std::collections::btree_map:: CursorMut <'a, K, V, A> where A: Sync , K: Sync , V: Sync , § impl<'a, K, V, A> Sync for std::collections::btree_map:: CursorMutKey <'a, K, V, A> where A: Sync , K: Sync , V: Sync , § impl<'a, K, V, A> Sync for std::collections::btree_map:: OccupiedEntry <'a, K, V, A> where A: Sync , K: Sync , V: Sync , § impl<'a, K, V, A> Sync for std::collections::btree_map:: OccupiedError <'a, K, V, A> where V: Sync , A: Sync , K: Sync , § impl<'a, K, V, A> Sync for std::collections::btree_map:: VacantEntry <'a, K, V, A> where K: Sync , A: Sync , V: Sync , § impl<'a, K, V, F> Sync for std::collections::hash_map:: ExtractIf <'a, K, V, F> where F: Sync , K: Sync , V: Sync , § impl<'a, K, V, R, F, A> Sync for std::collections::btree_map:: ExtractIf <'a, K, V, R, F, A> where F: Sync , A: Sync , R: Sync , K: Sync , V: Sync , § impl<'a, P> Sync for MatchIndices <'a, P> where <P as Pattern >:: Searcher <'a>: Sync , § impl<'a, P> Sync for Matches <'a, P> where <P as Pattern >:: Searcher <'a>: Sync , § impl<'a, P> Sync for RMatchIndices <'a, P> where <P as Pattern >:: Searcher <'a>: Sync , § impl<'a, P> Sync for RMatches <'a, P> where <P as Pattern >:: Searcher <'a>: Sync , § impl<'a, P> Sync for std::str:: RSplit <'a, P> where <P as Pattern >:: Searcher <'a>: Sync , § impl<'a, P> Sync for std::str:: RSplitN <'a, P> where <P as Pattern >:: Searcher <'a>: Sync , § impl<'a, P> Sync for RSplitTerminator <'a, P> where <P as Pattern >:: Searcher <'a>: Sync , § impl<'a, P> Sync for std::str:: Split <'a, P> where <P as Pattern >:: Searcher <'a>: Sync , § impl<'a, P> Sync for std::str:: SplitInclusive <'a, P> where <P as Pattern >:: Searcher <'a>: Sync , § impl<'a, P> Sync for std::str:: SplitN <'a, P> where <P as Pattern >:: Searcher <'a>: Sync , § impl<'a, P> Sync for SplitTerminator <'a, P> where <P as Pattern >:: Searcher <'a>: Sync , § impl<'a, T> ! Sync for std::sync::mpsc:: Iter <'a, T> § impl<'a, T> ! Sync for std::sync::mpsc:: TryIter <'a, T> § impl<'a, T> Sync for std::collections::binary_heap:: Iter <'a, T> where T: Sync , § impl<'a, T> Sync for std::collections::btree_set:: Iter <'a, T> where T: Sync , § impl<'a, T> Sync for std::collections::btree_set:: Range <'a, T> where T: Sync , § impl<'a, T> Sync for std::collections::btree_set:: SymmetricDifference <'a, T> where T: Sync , § impl<'a, T> Sync for std::collections::btree_set:: Union <'a, T> where T: Sync , § impl<'a, T> Sync for std::collections::vec_deque:: Iter <'a, T> where T: Sync , § impl<'a, T> Sync for std::collections::vec_deque:: IterMut <'a, T> where T: Sync , § impl<'a, T> Sync for std::result:: Iter <'a, T> where T: Sync , § impl<'a, T> Sync for std::result:: IterMut <'a, T> where T: Sync , § impl<'a, T> Sync for Chunks <'a, T> where T: Sync , § impl<'a, T> Sync for ChunksExact <'a, T> where T: Sync , § impl<'a, T> Sync for RChunks <'a, T> where T: Sync , § impl<'a, T> Sync for RChunksExact <'a, T> where T: Sync , § impl<'a, T> Sync for Windows <'a, T> where T: Sync , § impl<'a, T> Sync for std::sync::mpmc:: Iter <'a, T> where T: Send , § impl<'a, T> Sync for std::sync::mpmc:: TryIter <'a, T> where T: Send , § impl<'a, T, A> Sync for std::collections::btree_set:: Entry <'a, T, A> where A: Sync , T: Sync , § impl<'a, T, A> Sync for std::collections::binary_heap:: Drain <'a, T, A> where T: Sync , A: Sync , § impl<'a, T, A> Sync for DrainSorted <'a, T, A> where A: Sync , T: Sync , § impl<'a, T, A> Sync for std::collections::binary_heap:: PeekMut <'a, T, A> where A: Sync , T: Sync , § impl<'a, T, A> Sync for std::collections::btree_set:: Difference <'a, T, A> where T: Sync , A: Sync , § impl<'a, T, A> Sync for std::collections::btree_set:: Intersection <'a, T, A> where T: Sync , A: Sync , § impl<'a, T, A> Sync for std::collections::btree_set:: OccupiedEntry <'a, T, A> where A: Sync , T: Sync , § impl<'a, T, A> Sync for std::collections::btree_set:: VacantEntry <'a, T, A> where T: Sync , A: Sync , § impl<'a, T, A> Sync for std::vec:: PeekMut <'a, T, A> where A: Sync , T: Sync , § impl<'a, T, F, A = Global > ! Sync for std::collections::linked_list:: ExtractIf <'a, T, F, A> § impl<'a, T, F, A> Sync for std::vec:: ExtractIf <'a, T, F, A> where F: Sync , A: Sync , T: Sync , § impl<'a, T, P> Sync for ChunkBy <'a, T, P> where P: Sync , T: Sync , § impl<'a, T, P> Sync for ChunkByMut <'a, T, P> where P: Sync , T: Sync , § impl<'a, T, P> Sync for std::slice:: RSplit <'a, T, P> where P: Sync , T: Sync , § impl<'a, T, P> Sync for RSplitMut <'a, T, P> where P: Sync , T: Sync , § impl<'a, T, P> Sync for std::slice:: RSplitN <'a, T, P> where P: Sync , T: Sync , § impl<'a, T, P> Sync for RSplitNMut <'a, T, P> where P: Sync , T: Sync , § impl<'a, T, P> Sync for std::slice:: Split <'a, T, P> where P: Sync , T: Sync , § impl<'a, T, P> Sync for std::slice:: SplitInclusive <'a, T, P> where P: Sync , T: Sync , § impl<'a, T, P> Sync for SplitInclusiveMut <'a, T, P> where P: Sync , T: Sync , § impl<'a, T, P> Sync for SplitMut <'a, T, P> where P: Sync , T: Sync , § impl<'a, T, P> Sync for std::slice:: SplitN <'a, T, P> where P: Sync , T: Sync , § impl<'a, T, P> Sync for SplitNMut <'a, T, P> where P: Sync , T: Sync , § impl<'a, T, R, F, A> Sync for std::collections::btree_set:: ExtractIf <'a, T, R, F, A> where F: Sync , A: Sync , R: Sync , T: Sync , § impl<'a, T, S> Sync for std::collections::hash_set:: Entry <'a, T, S> where T: Sync , S: Sync , § impl<'a, T, S> Sync for std::collections::hash_set:: Difference <'a, T, S> where S: Sync , T: Sync , § impl<'a, T, S> Sync for std::collections::hash_set:: Intersection <'a, T, S> where S: Sync , T: Sync , § impl<'a, T, S> Sync for std::collections::hash_set:: OccupiedEntry <'a, T, S> where T: Sync , S: Sync , § impl<'a, T, S> Sync for std::collections::hash_set:: SymmetricDifference <'a, T, S> where S: Sync , T: Sync , § impl<'a, T, S> Sync for std::collections::hash_set:: Union <'a, T, S> where S: Sync , T: Sync , § impl<'a, T, S> Sync for std::collections::hash_set:: VacantEntry <'a, T, S> where T: Sync , S: Sync , § impl<'a, T, const N: usize > Sync for ArrayWindows <'a, T, N> where T: Sync , § impl<'a, const N: usize > Sync for CharArraySearcher <'a, N> § impl<'b, T> ! Sync for Ref <'b, T> § impl<'b, T> ! Sync for RefMut <'b, T> § impl<'data> Sync for BorrowedBuf <'data> § impl<'f> ! Sync for VaListImpl <'f> § impl<'fd> Sync for BorrowedFd <'fd> § impl<'scope, 'env> Sync for Scope <'scope, 'env> § impl<'scope, T> Sync for ScopedJoinHandle <'scope, T> where T: Send , § impl<'socket> Sync for BorrowedSocket <'socket> § impl<A> Sync for std::iter:: Repeat <A> where A: Sync , § impl<A> Sync for RepeatN <A> where A: Sync , § impl<A> Sync for std::option:: IntoIter <A> where A: Sync , § impl<A> Sync for IterRange <A> where A: Sync , § impl<A> Sync for IterRangeFrom <A> where A: Sync , § impl<A> Sync for IterRangeInclusive <A> where A: Sync , § impl<A, B> Sync for std::iter:: Chain <A, B> where A: Sync , B: Sync , § impl<A, B> Sync for Zip <A, B> where A: Sync , B: Sync , § impl<B> Sync for std::io:: Lines <B> where B: Sync , § impl<B> Sync for std::io:: Split <B> where B: Sync , § impl<B, C> Sync for ControlFlow <B, C> where C: Sync , B: Sync , § impl<E> Sync for Report <E> where E: Sync , § impl<F> Sync for std::fmt:: FromFn <F> where F: Sync , § impl<F> Sync for PollFn <F> where F: Sync , § impl<F> Sync for std::iter:: FromFn <F> where F: Sync , § impl<F> Sync for OnceWith <F> where F: Sync , § impl<F> Sync for RepeatWith <F> where F: Sync , § impl<G> Sync for FromCoroutine <G> where G: Sync , § impl<H> Sync for BuildHasherDefault <H> § impl<I> Sync for FromIter <I> where I: Sync , § impl<I> Sync for DecodeUtf16 <I> where I: Sync , § impl<I> Sync for Cloned <I> where I: Sync , § impl<I> Sync for Copied <I> where I: Sync , § impl<I> Sync for Cycle <I> where I: Sync , § impl<I> Sync for Enumerate <I> where I: Sync , § impl<I> Sync for Flatten <I> where <<I as Iterator >:: Item as IntoIterator >:: IntoIter : Sync , I: Sync , § impl<I> Sync for Fuse <I> where I: Sync , § impl<I> Sync for Intersperse <I> where <I as Iterator >:: Item : Sized + Sync , I: Sync , § impl<I> Sync for Peekable <I> where I: Sync , <I as Iterator >:: Item : Sync , § impl<I> Sync for Skip <I> where I: Sync , § impl<I> Sync for StepBy <I> where I: Sync , § impl<I> Sync for std::iter:: Take <I> where I: Sync , § impl<I, F> Sync for FilterMap <I, F> where I: Sync , F: Sync , § impl<I, F> Sync for Inspect <I, F> where I: Sync , F: Sync , § impl<I, F> Sync for Map <I, F> where I: Sync , F: Sync , § impl<I, F, const N: usize > Sync for MapWindows <I, F, N> where F: Sync , I: Sync , <I as Iterator >:: Item : Sync , § impl<I, G> Sync for IntersperseWith <I, G> where G: Sync , <I as Iterator >:: Item : Sync , I: Sync , § impl<I, P> Sync for Filter <I, P> where I: Sync , P: Sync , § impl<I, P> Sync for MapWhile <I, P> where I: Sync , P: Sync , § impl<I, P> Sync for SkipWhile <I, P> where I: Sync , P: Sync , § impl<I, P> Sync for TakeWhile <I, P> where I: Sync , P: Sync , § impl<I, St, F> Sync for Scan <I, St, F> where I: Sync , F: Sync , St: Sync , § impl<I, U, F> Sync for FlatMap <I, U, F> where <U as IntoIterator >:: IntoIter : Sync , I: Sync , F: Sync , § impl<I, const N: usize > Sync for ArrayChunks <I, N> where I: Sync , <I as Iterator >:: Item : Sync , § impl<Idx> Sync for std::ops:: Range <Idx> where Idx: Sync , § impl<Idx> Sync for std::ops:: RangeFrom <Idx> where Idx: Sync , § impl<Idx> Sync for std::ops:: RangeInclusive <Idx> where Idx: Sync , § impl<Idx> Sync for RangeTo <Idx> where Idx: Sync , § impl<Idx> Sync for std::ops:: RangeToInclusive <Idx> where Idx: Sync , § impl<Idx> Sync for std::range:: Range <Idx> where Idx: Sync , § impl<Idx> Sync for std::range:: RangeFrom <Idx> where Idx: Sync , § impl<Idx> Sync for std::range:: RangeInclusive <Idx> where Idx: Sync , § impl<Idx> Sync for std::range:: RangeToInclusive <Idx> where Idx: Sync , § impl<K> Sync for std::collections::hash_set:: IntoIter <K> where K: Sync , § impl<K, V> Sync for std::collections::hash_map:: IntoIter <K, V> where K: Sync , V: Sync , § impl<K, V> Sync for std::collections::hash_map:: IntoKeys <K, V> where K: Sync , V: Sync , § impl<K, V> Sync for std::collections::hash_map:: IntoValues <K, V> where K: Sync , V: Sync , § impl<K, V, A> Sync for std::collections::btree_map:: IntoIter <K, V, A> where A: Sync , K: Sync , V: Sync , § impl<K, V, A> Sync for std::collections::btree_map:: IntoKeys <K, V, A> where A: Sync , K: Sync , V: Sync , § impl<K, V, A> Sync for std::collections::btree_map:: IntoValues <K, V, A> where A: Sync , K: Sync , V: Sync , § impl<K, V, A> Sync for BTreeMap <K, V, A> where A: Sync , K: Sync , V: Sync , § impl<K, V, S> Sync for HashMap <K, V, S> where S: Sync , K: Sync , V: Sync , § impl<Ptr> Sync for Pin <Ptr> where Ptr: Sync , § impl<R> Sync for BufReader <R> where R: Sync + ? Sized , § impl<R> Sync for std::io:: Bytes <R> where R: Sync , § impl<Ret, T> Sync for fn(T₁, T₂, …, Tₙ) -> Ret § impl<T> ! Sync for std::sync::mpsc:: IntoIter <T> § impl<T> Sync for Bound <T> where T: Sync , § impl<T> Sync for Option <T> where T: Sync , § impl<T> Sync for std::sync:: TryLockError <T> where T: Sync , § impl<T> Sync for SendTimeoutError <T> where T: Sync , § impl<T> Sync for TrySendError <T> where T: Sync , § impl<T> Sync for Poll <T> where T: Sync , § impl<T> Sync for [T] where T: Sync , § impl<T> Sync for (T₁, T₂, …, Tₙ) where T: Sync , § impl<T> Sync for Reverse <T> where T: Sync , § impl<T> Sync for Pending <T> § impl<T> Sync for Ready <T> where T: Sync , § impl<T> Sync for std::io:: Cursor <T> where T: Sync , § impl<T> Sync for std::io:: Take <T> where T: Sync , § impl<T> Sync for std::iter:: Empty <T> § impl<T> Sync for std::iter:: Once <T> where T: Sync , § impl<T> Sync for Rev <T> where T: Sync , § impl<T> Sync for Discriminant <T> § impl<T> Sync for ManuallyDrop <T> where T: Sync + ? Sized , § impl<T> Sync for Saturating <T> where T: Sync , § impl<T> Sync for Wrapping <T> where T: Sync , § impl<T> Sync for Yeet <T> where T: Sync , § impl<T> Sync for AssertUnwindSafe <T> where T: Sync , § impl<T> Sync for std::result:: IntoIter <T> where T: Sync , § impl<T> Sync for std::sync::mpmc:: IntoIter <T> where T: Send , § impl<T> Sync for SendError <T> where T: Sync , § impl<T> Sync for SyncSender <T> where T: Send , § impl<T> Sync for PoisonError <T> where T: Sync , § impl<T> Sync for LocalKey <T> § impl<T> Sync for PhantomContravariant <T> where T: ? Sized , § impl<T> Sync for PhantomCovariant <T> where T: ? Sized , § impl<T> Sync for PhantomData <T> where T: Sync + ? Sized , § impl<T> Sync for PhantomInvariant <T> where T: ? Sized , § impl<T> Sync for MaybeUninit <T> where T: Sync , § impl<T, A> Sync for Box <T, A> where A: Sync , T: Sync + ? Sized , § impl<T, A> Sync for std::collections::binary_heap:: IntoIter <T, A> where T: Sync , A: Sync , § impl<T, A> Sync for IntoIterSorted <T, A> where A: Sync , T: Sync , § impl<T, A> Sync for std::collections::btree_set:: IntoIter <T, A> where A: Sync , T: Sync , § impl<T, A> Sync for std::collections::linked_list:: IntoIter <T, A> where T: Sync , A: Sync , § impl<T, A> Sync for BTreeSet <T, A> where A: Sync , T: Sync , § impl<T, A> Sync for BinaryHeap <T, A> where A: Sync , T: Sync , § impl<T, A> Sync for VecDeque <T, A> where A: Sync , T: Sync , § impl<T, A> Sync for std::collections::vec_deque:: IntoIter <T, A> where A: Sync , T: Sync , § impl<T, A> Sync for Vec <T, A> where A: Sync , T: Sync , § impl<T, E> Sync for Result <T, E> where T: Sync , E: Sync , § impl<T, F = fn () -> T> ! Sync for LazyCell <T, F> § impl<T, F> Sync for Successors <T, F> where F: Sync , T: Sync , § impl<T, F> Sync for DropGuard <T, F> where T: Sync , F: Sync , § impl<T, S> Sync for HashSet <T, S> where S: Sync , T: Sync , § impl<T, U> Sync for std::io:: Chain <T, U> where T: Sync , U: Sync , § impl<T, const N: usize > Sync for [T; N] where T: Sync , § impl<T, const N: usize > Sync for std::array:: IntoIter <T, N> where T: Sync , § impl<T, const N: usize > Sync for Mask <T, N> where T: Sync , § impl<T, const N: usize > Sync for Simd <T, N> where T: Sync , § impl<T, const N: usize > Sync for [ Option <T>; N ] where T: Sync , § impl<T, const N: usize > Sync for [ MaybeUninit <T>; N ] where T: Sync , § impl<W> Sync for BufWriter <W> where W: Sync + ? Sized , § impl<W> Sync for IntoInnerError <W> where W: Sync , § impl<W> Sync for LineWriter <W> where W: Sync + ? Sized , § impl<Y, R> Sync for CoroutineState <Y, R> where Y: Sync , R: Sync , § impl<const N: usize > Sync for LaneCount <N> § impl<const N: usize > Sync for [ u8 ; N ] | 2026-01-13T09:29:14 |
https://zh-cn.facebook.com/reg/?entry_point=login&amp%3Bnext=https%3A%2F%2Fwww.facebook.com%2Fshare_channel%2F%3Ftype%3Dreshare%26link%3Dhttps%253A%252F%252Fdev.to%252Ftauri%252Ftauri-10-release-candidate-53jk%26app_id%3D966242223397117%26source_surface%3Dexternal_reshare%26display%26hashtag | Facebook Facebook 邮箱或手机号 密码 忘记账户了? 创建新账户 你暂时被禁止使用此功能 你暂时被禁止使用此功能 似乎你过度使用了此功能,因此暂时被阻止,不能继续使用。 Back 中文(简体) 한국어 English (US) Tiếng Việt Bahasa Indonesia ภาษาไทย Español 日本語 Português (Brasil) Français (France) Deutsch 注册 登录 Messenger Facebook Lite 视频 Meta Pay Meta 商店 Meta Quest Ray-Ban Meta Meta AI Meta AI 更多内容 Instagram Threads 选民信息中心 隐私政策 隐私中心 关于 创建广告 创建公共主页 开发者 招聘信息 Cookie Ad Choices 条款 帮助 联系人上传和非用户 设置 动态记录 Meta © 2026 | 2026-01-13T09:29:14 |
https://doc.rust-lang.org/std/error/trait.Error.html#tymethod.description | Error in std::error - Rust This old browser is unsupported and will most likely display funky things. Error std 1.92.0 (ded5c06cf 2025-12-08) Error Sections Error source Example Provided Methods cause description provide source Methods downcast downcast downcast downcast_mut downcast_mut downcast_mut downcast_ref downcast_ref downcast_ref is is is sources Trait Implementations From<&str> From<&str> From<Cow<'b, str>> From<Cow<'b, str>> From<E> From<E> From<String> From<String> Implementors In std:: error std :: error Trait Error Copy item path 1.0.0 · Source pub trait Error: Debug + Display { // Provided methods fn source (&self) -> Option <&(dyn Error + 'static)> { ... } fn description (&self) -> & str { ... } fn cause (&self) -> Option <&dyn Error > { ... } fn provide <'a>(&'a self, request: &mut Request <'a>) { ... } } Expand description Error is a trait representing the basic expectations for error values, i.e., values of type E in Result<T, E> . Errors must describe themselves through the Display and Debug traits. Error messages are typically concise lowercase sentences without trailing punctuation: let err = "NaN" .parse::<u32>().unwrap_err(); assert_eq! (err.to_string(), "invalid digit found in string" ); § Error source Errors may provide cause information. Error::source() is generally used when errors cross “abstraction boundaries”. If one module must report an error that is caused by an error from a lower-level module, it can allow accessing that error via Error::source() . This makes it possible for the high-level module to provide its own errors while also revealing some of the implementation for debugging. In error types that wrap an underlying error, the underlying error should be either returned by the outer error’s Error::source() , or rendered by the outer error’s Display implementation, but not both. § Example Implementing the Error trait only requires that Debug and Display are implemented too. use std::error::Error; use std::fmt; use std::path::PathBuf; #[derive(Debug)] struct ReadConfigError { path: PathBuf } impl fmt::Display for ReadConfigError { fn fmt( & self , f: &mut fmt::Formatter< '_ >) -> fmt::Result { let path = self .path.display(); write! (f, "unable to read configuration at {path}" ) } } impl Error for ReadConfigError {} Provided Methods § 1.30.0 · Source fn source (&self) -> Option <&(dyn Error + 'static)> Returns the lower-level source of this error, if any. § Examples use std::error::Error; use std::fmt; #[derive(Debug)] struct SuperError { source: SuperErrorSideKick, } impl fmt::Display for SuperError { fn fmt( & self , f: &mut fmt::Formatter< '_ >) -> fmt::Result { write! (f, "SuperError is here!" ) } } impl Error for SuperError { fn source( & self ) -> Option < & ( dyn Error + 'static )> { Some ( & self .source) } } #[derive(Debug)] struct SuperErrorSideKick; impl fmt::Display for SuperErrorSideKick { fn fmt( & self , f: &mut fmt::Formatter< '_ >) -> fmt::Result { write! (f, "SuperErrorSideKick is here!" ) } } impl Error for SuperErrorSideKick {} fn get_super_error() -> Result <(), SuperError> { Err (SuperError { source: SuperErrorSideKick }) } fn main() { match get_super_error() { Err (e) => { println! ( "Error: {e}" ); println! ( "Caused by: {}" , e.source().unwrap()); } _ => println! ( "No error" ), } } 1.0.0 · Source fn description (&self) -> & str 👎 Deprecated since 1.42.0: use the Display impl or to_string() if let Err (e) = "xc" .parse::<u32>() { // Print `e` itself, no need for description(). eprintln! ( "Error: {e}" ); } 1.0.0 · Source fn cause (&self) -> Option <&dyn Error > 👎 Deprecated since 1.33.0: replaced by Error::source, which can support downcasting Source fn provide <'a>(&'a self, request: &mut Request <'a>) 🔬 This is a nightly-only experimental API. ( error_generic_member_access #99301 ) Provides type-based access to context intended for error reports. Used in conjunction with Request::provide_value and Request::provide_ref to extract references to member variables from dyn Error trait objects. § Example #![feature(error_generic_member_access)] use core::fmt; use core::error::{request_ref, Request}; #[derive(Debug)] enum MyLittleTeaPot { Empty, } #[derive(Debug)] struct MyBacktrace { // ... } impl MyBacktrace { fn new() -> MyBacktrace { // ... } } #[derive(Debug)] struct Error { backtrace: MyBacktrace, } impl fmt::Display for Error { fn fmt( & self , f: &mut fmt::Formatter< '_ >) -> fmt::Result { write! (f, "Example Error" ) } } impl std::error::Error for Error { fn provide< 'a >( & 'a self , request: &mut Request< 'a >) { request .provide_ref::<MyBacktrace>( & self .backtrace); } } fn main() { let backtrace = MyBacktrace::new(); let error = Error { backtrace }; let dyn_error = & error as & dyn std::error::Error; let backtrace_ref = request_ref::<MyBacktrace>(dyn_error).unwrap(); assert! (core::ptr::eq( & error.backtrace, backtrace_ref)); assert! (request_ref::<MyLittleTeaPot>(dyn_error).is_none()); } Implementations § Source § impl dyn Error 1.3.0 · Source pub fn is <T>(&self) -> bool where T: Error + 'static, Returns true if the inner type is the same as T . 1.3.0 · Source pub fn downcast_ref <T>(&self) -> Option < &T > where T: Error + 'static, Returns some reference to the inner value if it is of type T , or None if it isn’t. 1.3.0 · Source pub fn downcast_mut <T>(&mut self) -> Option < &mut T > where T: Error + 'static, Returns some mutable reference to the inner value if it is of type T , or None if it isn’t. Source § impl dyn Error + Send 1.3.0 · Source pub fn is <T>(&self) -> bool where T: Error + 'static, Forwards to the method defined on the type dyn Error . 1.3.0 · Source pub fn downcast_ref <T>(&self) -> Option < &T > where T: Error + 'static, Forwards to the method defined on the type dyn Error . 1.3.0 · Source pub fn downcast_mut <T>(&mut self) -> Option < &mut T > where T: Error + 'static, Forwards to the method defined on the type dyn Error . Source § impl dyn Error + Send + Sync 1.3.0 · Source pub fn is <T>(&self) -> bool where T: Error + 'static, Forwards to the method defined on the type dyn Error . 1.3.0 · Source pub fn downcast_ref <T>(&self) -> Option < &T > where T: Error + 'static, Forwards to the method defined on the type dyn Error . 1.3.0 · Source pub fn downcast_mut <T>(&mut self) -> Option < &mut T > where T: Error + 'static, Forwards to the method defined on the type dyn Error . Source § impl dyn Error Source pub fn sources (&self) -> Source <'_> ⓘ 🔬 This is a nightly-only experimental API. ( error_iter #58520 ) Returns an iterator starting with the current error and continuing with recursively calling Error::source . If you want to omit the current error and only use its sources, use skip(1) . § Examples #![feature(error_iter)] use std::error::Error; use std::fmt; #[derive(Debug)] struct A; #[derive(Debug)] struct B( Option <Box< dyn Error + 'static >>); impl fmt::Display for A { fn fmt( & self , f: &mut fmt::Formatter< '_ >) -> fmt::Result { write! (f, "A" ) } } impl fmt::Display for B { fn fmt( & self , f: &mut fmt::Formatter< '_ >) -> fmt::Result { write! (f, "B" ) } } impl Error for A {} impl Error for B { fn source( & self ) -> Option < & ( dyn Error + 'static )> { self . 0 .as_ref().map(|e| e.as_ref()) } } let b = B( Some (Box::new(A))); // let err : Box<Error> = b.into(); // or let err = & b as & dyn Error; let mut iter = err.sources(); assert_eq! ( "B" .to_string(), iter.next().unwrap().to_string()); assert_eq! ( "A" .to_string(), iter.next().unwrap().to_string()); assert! (iter.next().is_none()); assert! (iter.next().is_none()); Source § impl dyn Error 1.3.0 · Source pub fn downcast <T>(self: Box <dyn Error >) -> Result < Box <T>, Box <dyn Error >> where T: Error + 'static, Attempts to downcast the box to a concrete type. Source § impl dyn Error + Send 1.3.0 · Source pub fn downcast <T>( self: Box <dyn Error + Send >, ) -> Result < Box <T>, Box <dyn Error + Send >> where T: Error + 'static, Attempts to downcast the box to a concrete type. Source § impl dyn Error + Send + Sync 1.3.0 · Source pub fn downcast <T>( self: Box <dyn Error + Send + Sync >, ) -> Result < Box <T>, Box <dyn Error + Send + Sync >> where T: Error + 'static, Attempts to downcast the box to a concrete type. Trait Implementations § 1.6.0 · Source § impl<'a> From <& str > for Box <dyn Error + 'a> Source § fn from (err: & str ) -> Box <dyn Error + 'a> Converts a str into a box of dyn Error . § Examples use std::error::Error; let a_str_error = "a str error" ; let a_boxed_error = Box::< dyn Error>::from(a_str_error); assert! (size_of::<Box< dyn Error>>() == size_of_val( & a_boxed_error)) 1.0.0 · Source § impl<'a> From <& str > for Box <dyn Error + Send + Sync + 'a> Source § fn from (err: & str ) -> Box <dyn Error + Send + Sync + 'a> Converts a str into a box of dyn Error + Send + Sync . § Examples use std::error::Error; let a_str_error = "a str error" ; let a_boxed_error = Box::< dyn Error + Send + Sync>::from(a_str_error); assert! ( size_of::<Box< dyn Error + Send + Sync>>() == size_of_val( & a_boxed_error)) 1.22.0 · Source § impl<'a, 'b> From < Cow <'b, str >> for Box <dyn Error + 'a> Source § fn from (err: Cow <'b, str >) -> Box <dyn Error + 'a> Converts a Cow into a box of dyn Error . § Examples use std::error::Error; use std::borrow::Cow; let a_cow_str_error = Cow::from( "a str error" ); let a_boxed_error = Box::< dyn Error>::from(a_cow_str_error); assert! (size_of::<Box< dyn Error>>() == size_of_val( & a_boxed_error)) 1.22.0 · Source § impl<'a, 'b> From < Cow <'b, str >> for Box <dyn Error + Send + Sync + 'a> Source § fn from (err: Cow <'b, str >) -> Box <dyn Error + Send + Sync + 'a> Converts a Cow into a box of dyn Error + Send + Sync . § Examples use std::error::Error; use std::borrow::Cow; let a_cow_str_error = Cow::from( "a str error" ); let a_boxed_error = Box::< dyn Error + Send + Sync>::from(a_cow_str_error); assert! ( size_of::<Box< dyn Error + Send + Sync>>() == size_of_val( & a_boxed_error)) 1.0.0 · Source § impl<'a, E> From <E> for Box <dyn Error + 'a> where E: Error + 'a, Source § fn from (err: E) -> Box <dyn Error + 'a> Converts a type of Error into a box of dyn Error . § Examples use std::error::Error; use std::fmt; #[derive(Debug)] struct AnError; impl fmt::Display for AnError { fn fmt( & self , f: &mut fmt::Formatter< '_ >) -> fmt::Result { write! (f, "An error" ) } } impl Error for AnError {} let an_error = AnError; assert! ( 0 == size_of_val( & an_error)); let a_boxed_error = Box::< dyn Error>::from(an_error); assert! (size_of::<Box< dyn Error>>() == size_of_val( & a_boxed_error)) 1.0.0 · Source § impl<'a, E> From <E> for Box <dyn Error + Send + Sync + 'a> where E: Error + Send + Sync + 'a, Source § fn from (err: E) -> Box <dyn Error + Send + Sync + 'a> Converts a type of Error + Send + Sync into a box of dyn Error + Send + Sync . § Examples use std::error::Error; use std::fmt; #[derive(Debug)] struct AnError; impl fmt::Display for AnError { fn fmt( & self , f: &mut fmt::Formatter< '_ >) -> fmt::Result { write! (f, "An error" ) } } impl Error for AnError {} unsafe impl Send for AnError {} unsafe impl Sync for AnError {} let an_error = AnError; assert! ( 0 == size_of_val( & an_error)); let a_boxed_error = Box::< dyn Error + Send + Sync>::from(an_error); assert! ( size_of::<Box< dyn Error + Send + Sync>>() == size_of_val( & a_boxed_error)) 1.6.0 · Source § impl<'a> From < String > for Box <dyn Error + 'a> Source § fn from (str_err: String ) -> Box <dyn Error + 'a> Converts a String into a box of dyn Error . § Examples use std::error::Error; let a_string_error = "a string error" .to_string(); let a_boxed_error = Box::< dyn Error>::from(a_string_error); assert! (size_of::<Box< dyn Error>>() == size_of_val( & a_boxed_error)) 1.0.0 · Source § impl<'a> From < String > for Box <dyn Error + Send + Sync + 'a> Source § fn from (err: String ) -> Box <dyn Error + Send + Sync + 'a> Converts a String into a box of dyn Error + Send + Sync . § Examples use std::error::Error; let a_string_error = "a string error" .to_string(); let a_boxed_error = Box::< dyn Error + Send + Sync>::from(a_string_error); assert! ( size_of::<Box< dyn Error + Send + Sync>>() == size_of_val( & a_boxed_error)) Implementors § 1.65.0 · Source § impl ! Error for & str 1.8.0 · Source § impl Error for Infallible 1.0.0 · Source § impl Error for VarError 1.17.0 · Source § impl Error for FromBytesWithNulError 1.89.0 · Source § impl Error for std::fs:: TryLockError 1.86.0 · Source § impl Error for GetDisjointMutError 1.15.0 · Source § impl Error for RecvTimeoutError 1.0.0 · Source § impl Error for TryRecvError Source § impl Error for ! Source § impl Error for AllocError 1.28.0 · Source § impl Error for LayoutError 1.34.0 · Source § impl Error for TryFromSliceError 1.13.0 · Source § impl Error for BorrowError 1.13.0 · Source § impl Error for BorrowMutError 1.34.0 · Source § impl Error for CharTryFromError 1.9.0 · Source § impl Error for DecodeUtf16Error 1.20.0 · Source § impl Error for ParseCharError 1.59.0 · Source § impl Error for TryFromCharError Source § impl Error for UnorderedKeyError 1.57.0 · Source § impl Error for TryReserveError 1.0.0 · Source § impl Error for JoinPathsError 1.69.0 · Source § impl Error for FromBytesUntilNulError 1.58.0 · Source § impl Error for FromVecWithNulError 1.7.0 · Source § impl Error for IntoStringError 1.0.0 · Source § impl Error for NulError 1.11.0 · Source § impl Error for std::fmt:: Error 1.0.0 · Source § impl Error for std::io:: Error 1.56.0 · Source § impl Error for WriterPanicked 1.4.0 · Source § impl Error for AddrParseError 1.0.0 · Source § impl Error for ParseFloatError 1.0.0 · Source § impl Error for ParseIntError 1.34.0 · Source § impl Error for TryFromIntError 1.63.0 · Source § impl Error for InvalidHandleError Available on Windows only. 1.63.0 · Source § impl Error for NullHandleError Available on Windows only. Source § impl Error for NormalizeError 1.7.0 · Source § impl Error for StripPrefixError Source § impl Error for ExitStatusError 1.0.0 · Source § impl Error for ParseBoolError 1.0.0 · Source § impl Error for Utf8Error 1.0.0 · Source § impl Error for FromUtf8Error 1.0.0 · Source § impl Error for FromUtf16Error 1.0.0 · Source § impl Error for RecvError 1.26.0 · Source § impl Error for AccessError 1.8.0 · Source § impl Error for SystemTimeError 1.66.0 · Source § impl Error for TryFromFloatSecsError Source § impl<'a, K, V> Error for std::collections::btree_map:: OccupiedError <'a, K, V> where K: Debug + Ord , V: Debug , Source § impl<'a, K: Debug , V: Debug > Error for std::collections::hash_map:: OccupiedError <'a, K, V> 1.51.0 · Source § impl<'a, T> Error for &'a T where T: Error + ? Sized , 1.8.0 · Source § impl<E> Error for Box <E> where E: Error , 1.0.0 · Source § impl<T> Error for std::sync:: TryLockError <T> Source § impl<T> Error for SendTimeoutError <T> 1.0.0 · Source § impl<T> Error for TrySendError <T> Source § impl<T> Error for ThinBox <T> where T: Error + ? Sized , 1.0.0 · Source § impl<T> Error for SendError <T> 1.52.0 · Source § impl<T> Error for Arc <T> where T: Error + ? Sized , 1.0.0 · Source § impl<T> Error for PoisonError <T> 1.0.0 · Source § impl<W: Send + Debug > Error for IntoInnerError <W> | 2026-01-13T09:29:14 |
https://docs.rs/error-chain | error_chain - Rust Docs.rs error-chain-0.12.4 error-chain 0.12.4 Permalink Docs.rs crate page MIT / Apache-2.0 Links Repository crates.io Source Owners alexcrichton brson AndyGauge Dependencies backtrace ^0.3.3 normal optional version_check ^0.9 build Versions 91.8% of the crate is documented Platform i686-pc-windows-msvc i686-unknown-linux-gnu x86_64-apple-darwin x86_64-pc-windows-msvc x86_64-unknown-linux-gnu Feature flags docs.rs About docs.rs Badges Builds Metadata Shorthand URLs Download Rustdoc JSON Build queue Privacy policy Rust Rust website The Book Standard Library API Reference Rust by Example The Cargo Guide Clippy Documentation This old browser is unsupported and will most likely display funky things. error_ chain 0.12.4 All Items Sections Quick start Why error chain? Principles of error-chain Declaring error types Returning new errors The bail! macro Chaining errors Linking errors Matching errors Inspecting errors Foreign links Backtraces Iteration Crate Items Modules Macros Structs Traits Crate error_chain Copy item path Source Expand description A library for consistent and reliable error handling error-chain makes it easy to take full advantage of Rust’s powerful error handling features without the overhead of maintaining boilerplate error types and conversions. It implements an opinionated strategy for defining your own error types, as well as conversions from others’ error types. § Quick start If you just want to set up your new project with error-chain, follow the quickstart.rs template, and read this intro to error-chain. § Why error chain? error-chain is easy to configure. Handle errors robustly with minimal effort. Basic error handling requires no maintenance of custom error types nor the From conversions that make ? work. error-chain scales from simple error handling strategies to more rigorous. Return formatted strings for simple errors, only introducing error variants and their strong typing as needed for advanced error recovery. error-chain makes it trivial to correctly manage the cause of the errors generated by your own code. This is the “chaining” in “error-chain”. § Principles of error-chain error-chain is based on the following principles: No error should ever be discarded. This library primarily makes it easy to “chain” errors with the chain_err method. Introducing new errors is trivial. Simple errors can be introduced at the error site with just a string. Handling errors is possible with pattern matching. Conversions between error types are done in an automatic and consistent way - From conversion behavior is never specified explicitly. Errors implement Send . Errors can carry backtraces. Similar to other libraries like error-type and quick-error , this library introduces the error chaining mechanism originally employed by Cargo. The error_chain! macro declares the types and implementation boilerplate necessary for fulfilling a particular error-handling strategy. Most importantly it defines a custom error type (called Error by convention) and the From conversions that let the ? operator work. This library differs in a few ways from previous error libs: Instead of defining the custom Error type as an enum, it is a struct containing an ErrorKind (which defines the description and display_chain methods for the error), an opaque, optional, boxed std::error::Error + Send + 'static object (which defines the cause , and establishes the links in the error chain), and a Backtrace . The macro also defines a ResultExt trait that defines a chain_err method. This method on all std::error::Error + Send + 'static types extends the error chain by boxing the current error into an opaque object and putting it inside a new concrete error. It provides automatic From conversions between other error types defined by the error_chain! that preserve type information, and facilitate seamless error composition and matching of composed errors. It provides automatic From conversions between any other error type that hides the type of the other error in the cause box. If RUST_BACKTRACE is enabled, it collects a single backtrace at the earliest opportunity and propagates it down the stack through From and ResultExt conversions. To accomplish its goals it makes some tradeoffs: The split between the Error and ErrorKind types can make it slightly more cumbersome to instantiate new (unchained) errors, requiring an Into or From conversion; as well as slightly more cumbersome to match on errors with another layer of types to match. Because the error type contains std::error::Error + Send + 'static objects, it can’t implement PartialEq for easy comparisons. § Declaring error types Generally, you define one family of error types per crate, though it’s also perfectly fine to define error types on a finer-grained basis, such as per module. Assuming you are using crate-level error types, typically you will define an errors module and inside it call error_chain! : mod other_error { error_chain! {} } error_chain! { // The type defined for this error. These are the conventional // and recommended names, but they can be arbitrarily chosen. // // It is also possible to leave this section out entirely, or // leave it empty, and these names will be used automatically. types { Error, ErrorKind, ResultExt, Result ; } // Without the `Result` wrapper: // // types { // Error, ErrorKind, ResultExt; // } // Automatic conversions between this error chain and other // error chains. In this case, it will e.g. generate an // `ErrorKind` variant called `Another` which in turn contains // the `other_error::ErrorKind`, with conversions from // `other_error::Error`. // // Optionally, some attributes can be added to a variant. // // This section can be empty. links { Another(other_error::Error, other_error::ErrorKind) #[cfg(unix)] ; } // Automatic conversions between this error chain and other // error types not defined by the `error_chain!`. These will be // wrapped in a new error with, in the first case, the // `ErrorKind::Fmt` variant. The description and cause will // forward to the description and cause of the original error. // // Optionally, some attributes can be added to a variant. // // This section can be empty. foreign_links { Fmt(::std::fmt::Error); Io(::std::io::Error) #[cfg(unix)] ; } // Define additional `ErrorKind` variants. Define custom responses with the // `description` and `display` calls. errors { InvalidToolchainName(t: String) { description( "invalid toolchain name" ) display( "invalid toolchain name: '{}'" , t) } // You can also add commas after description/display. // This may work better with some editor auto-indentation modes: UnknownToolchainVersion(v: String) { description( "unknown toolchain version" ), // note the , display( "unknown toolchain version: '{}'" , v), // trailing comma is allowed } } // If this annotation is left off, a variant `Msg(s: String)` will be added, and `From` // impls will be provided for `String` and `&str` skip_msg_variant } Each section, types , links , foreign_links , and errors may be omitted if it is empty. This populates the module with a number of definitions, the most important of which are the Error type and the ErrorKind type. An example of generated code can be found in the example_generated module. § Returning new errors Introducing new error chains, with a string message: fn foo() -> Result <()> { Err ( "foo error!" .into()) } Introducing new error chains, with an ErrorKind : error_chain! { errors { FooError } } fn foo() -> Result <()> { Err (ErrorKind::FooError.into()) } Note that the return type is the typedef Result , which is defined by the macro as pub type Result<T> = ::std::result::Result<T, Error> . Note that in both cases .into() is called to convert a type into the Error type; both strings and ErrorKind have From conversions to turn them into Error . When the error is emitted behind the ? operator, the explicit conversion isn’t needed; Err(ErrorKind) will automatically be converted to Err(Error) . So the below is equivalent to the previous: fn foo() -> Result <()> { Ok ( Err (ErrorKind::FooError) ? ) } fn bar() -> Result <()> { Ok ( Err ( "bogus!" ) ? ) } § The bail! macro The above method of introducing new errors works but is a little verbose. Instead, we can use the bail! macro, which performs an early return with conversions done automatically. With bail! the previous examples look like: fn foo() -> Result <()> { if true { bail! (ErrorKind::FooError); } else { Ok (()) } } fn bar() -> Result <()> { if true { bail! ( "bogus!" ); } else { Ok (()) } } § Chaining errors error-chain supports extending an error chain by appending new errors. This can be done on a Result or on an existing Error. To extend the error chain: let res: Result <()> = do_something().chain_err(|| "something went wrong" ); chain_err can be called on any Result type where the contained error type implements std::error::Error + Send + 'static , as long as the Result type’s corresponding ResultExt trait is in scope. If the Result is an Err then chain_err evaluates the closure, which returns some type that can be converted to ErrorKind , boxes the original error to store as the cause, then returns a new error containing the original error. Calling chain_err on an existing Error instance has the same signature and produces the same outcome as being called on a Result matching the properties described above. This is most useful when partially handling errors using the map_err function. To chain an error directly, use with_chain : let res: Result <()> = do_something().map_err(|e| Error::with_chain(e, "something went wrong" )); § Linking errors To convert an error from another error chain to this error chain: error_chain! { links { OtherError(other::Error, other::ErrorKind); } } fn do_other_thing() -> other::Result<()> { unimplemented! () } let res: Result <()> = do_other_thing().map_err(|e| e.into()); The Error and ErrorKind types implements From for the corresponding types of all linked error chains. Linked errors do not introduce a new cause to the error chain. § Matching errors error-chain error variants are matched with simple patterns. Error is a tuple struct and its first field is the ErrorKind , making dispatching on error kinds relatively compact: error_chain! { errors { InvalidToolchainName(t: String) { description( "invalid toolchain name" ) display( "invalid toolchain name: '{}'" , t) } } } match Error::from( "error!" ) { Error(ErrorKind::InvalidToolchainName( _ ), _ ) => { } Error(ErrorKind::Msg( _ ), _ ) => { } _ => { } } Chained errors are also matched with (relatively) compact syntax mod utils { error_chain! { errors { BadStuff { description( "bad stuff" ) } } } } mod app { error_chain! { links { Utils(::utils::Error, ::utils::ErrorKind); } } } match app::Error::from( "error!" ) { app::Error(app::ErrorKind::Utils(utils::ErrorKind::BadStuff), _ ) => { } _ => { } } § Inspecting errors An error-chain error contains information about the error itself, a backtrace, and the chain of causing errors. For reporting purposes, this information can be accessed as follows. use error_chain::ChainedError; // for e.display_chain() error_chain! { errors { InvalidToolchainName(t: String) { description( "invalid toolchain name" ) display( "invalid toolchain name: '{}'" , t) } } } // Generate an example error to inspect: let e = "xyzzy" .parse::<i32>() .chain_err(|| ErrorKind::InvalidToolchainName( "xyzzy" .to_string())) .unwrap_err(); // Get the brief description of the error: assert_eq! (e.description(), "invalid toolchain name" ); // Get the display version of the error: assert_eq! (e.to_string(), "invalid toolchain name: 'xyzzy'" ); // Get the full cause and backtrace: println! ( "{}" , e.display_chain().to_string()); // Error: invalid toolchain name: 'xyzzy' // Caused by: invalid digit found in string // stack backtrace: // 0: 0x7fa9f684fc94 - backtrace::backtrace::libunwind::trace // at src/backtrace/libunwind.rs:53 // - backtrace::backtrace::trace<closure> // at src/backtrace/mod.rs:42 // 1: 0x7fa9f6850b0e - backtrace::capture::{{impl}}::new // at out/capture.rs:79 // [..] The Error and ErrorKind types also allow programmatic access to these elements. § Foreign links Errors that do not conform to the same conventions as this library can still be included in the error chain. They are considered “foreign errors”, and are declared using the foreign_links block of the error_chain! macro. Error s are automatically created from foreign errors by the ? operator. Foreign links and regular links have one crucial difference: From conversions for regular links do not introduce a new error into the error chain , while conversions for foreign links always introduce a new error into the error chain . So for the example above all errors deriving from the std::fmt::Error type will be presented to the user as a new ErrorKind variant, and the cause will be the original std::fmt::Error error. In contrast, when other_error::Error is converted to Error the two ErrorKind s are converted between each other to create a new Error but the old error is discarded; there is no “cause” created from the original error. § Backtraces If the RUST_BACKTRACE environment variable is set to anything but 0 , the earliest non-foreign error to be generated creates a single backtrace, which is passed through all From conversions and chain_err invocations of compatible types. To read the backtrace just call the backtrace method. Backtrace generation can be disabled by turning off the backtrace feature. The Backtrace contains a Vec of BacktraceFrame s that can be operated on directly. For example, to only see the files and line numbers of code within your own project. if let Err ( ref e) = open_file() { if let Some (backtrace) = e.backtrace() { let frames = backtrace.frames(); for frame in frames.iter() { for symbol in frame.symbols().iter() { if let ( Some (file), Some (lineno)) = (symbol.filename(), symbol.lineno()) { if file.display().to_string()[ 0 .. 3 ] == "src" .to_string(){ println! ( "{}:{}" , file.display().to_string(), lineno); } } } } } }; fn open_file() -> Result <()> { std::fs::File::open( "does_not_exist" ) ? ; Ok (()) } § Iteration The iter method returns an iterator over the chain of error boxes. Modules § example_ generated These modules show an example of code generated by the macro. IT MUST NOT BE USED OUTSIDE THIS CRATE . Macros § bail Exits a function early with an error ensure Exits a function early with an error if the condition is not satisfied error_ chain Macro for generating error types and traits. See crate level documentation for details. quick_ main Convenient wrapper to be able to use ? and such in the main. You can use it with a separated function: stringify_ internal From https://github.com/tailhook/quick-error Changes: write_ internal Macro used interally for output expanding an expression Structs § Backtrace Representation of an owned and self-contained backtrace. Display Chain A struct which formats an error for output. Iter Iterator over the error chain using the Error::cause() method. Traits § Chained Error This trait is implemented on all the errors generated by the error_chain macro. Exit Code Represents a value that can be used as the exit status of the process. See quick_main! . | 2026-01-13T09:29:14 |
https://www.linkedin.com/legal/user-agreement?session_redirect=https%3A%2F%2Fwww%2Elinkedin%2Ecom%2Fposts%2Fryanheinrichs_userexperience-webdesign-uiux-activity-7408999842783395840--gY1&trk=registration-frontend_join-form-user-agreement | User Agreement | LinkedIn Skip to main content User Agreement Summary of User Agreement Privacy Policy Professional Community Policies Cookie Policy Copyright Policy Regional Info EU Notice California Privacy Disclosure U.S. State Privacy Laws User Agreement Summary of User Agreement Privacy Policy Professional Community Policies Cookie Policy Copyright Policy Regional Info EU Notice California Privacy Disclosure U.S. State Privacy Laws User Agreement Effective on November 3, 2025 Our mission is to connect the world’s professionals to allow them to be more productive and successful. Our services are designed to promote economic opportunity for our members by enabling you and millions of other professionals to meet, exchange ideas, learn, and find opportunities or employees, work, and make decisions in a network of trusted relationships. Table of Contents: Introduction Obligations Rights and Limits Disclaimer and Limit of Liability Termination Governing Law and Dispute Resolution General Terms LinkedIn “Dos and Don’ts” Complaints Regarding Content How To Contact Us Introduction 1.1 Contract When you use our Services you agree to all of these terms. Your use of our Services is also subject to our Cookie Policy and our Privacy Policy, which covers how we collect, use, share, and store your personal information. By creating a LinkedIn account or accessing or using our Services (described below), you are agreeing to enter into a legally binding contract with LinkedIn (even if you are using third party credentials or using our Services on behalf of a company). If you do not agree to this contract (“Contract” or “User Agreement”), do not create an account or access or otherwise use any of our Services. If you wish to terminate this Contract at any time, you can do so by closing your account and no longer accessing or using our Services. As a Visitor or Member of our Services, the collection, use, and sharing of your personal data is subject to our Privacy Policy , our Cookie Policy and other documents referenced in our Privacy Policy , and updates. You acknowledge and have read our Privacy Policy . Services This Contract applies to LinkedIn.com, LinkedIn-branded apps, and other LinkedIn-related sites, apps, communications, and other services that state that they are offered under this Contract (“Services”), including the offsite collection of data for those Services, such as via our ads and the “Apply with LinkedIn” and “Share with LinkedIn” plugins. LinkedIn and other Key Terms You are entering into this Contract with LinkedIn (also referred to as “we” and “us”). Designated Countries . We use the term “Designated Countries” to refer to countries in the European Union (EU), European Economic Area (EEA), and Switzerland. If you reside in the “Designated Countries”, you are entering into this Contract with LinkedIn Ireland Unlimited Company (“LinkedIn Ireland”) and LinkedIn Ireland will be the controller of your personal data provided to, or collected by or for, or processed in connection with our Services. If you reside outside of the “Designated Countries”, you are entering into this Contract with LinkedIn Corporation (“LinkedIn Corp.”) and LinkedIn Corp. will be the controller of (or business responsible for) your personal data provided to, or collected by or for, or processed in connection with our Services. Affiliates . Affiliates are companies controlling, controlled by or under common control with us, including, for example, LinkedIn Ireland, LinkedIn Corporation, LinkedIn Singapore and Microsoft Corporation or any of its subsidiaries (e.g., Github, Inc.). Social Action . Actions that members take on our services such as likes, comments, follows, sharing content. Content . Content includes, for example, feed posts, feedback, comments, profiles, articles (and contributions), group posts, job postings, messages (including InMails), videos, photos, audio, and/or PDFs. 1.2 Members and Visitors This Contract applies to Members and Visitors. When you register and join the LinkedIn Services, you become a “Member”. If you have chosen not to register for our Services, you may access certain features as a “Visitor.” 1.3 Changes We may make changes to this Contract. We may modify this Contract, our Privacy Policy and our Cookie Policy from time to time. If we materially change these terms or if we are legally required to provide notice, we will provide you notice through our Services, or by other means, to provide you the opportunity to review the changes before they become effective. However, we may not always provide prior notice of changes to these terms (1) when those changes are legally required to be implemented with immediate effect, or (2) when those changes relate to a newly launched service or feature. We agree that changes cannot be retroactive. If you object to any of these changes, you may close your account . Your continued use of our Services after we publish or send a notice about our changes to these terms means that you are consenting to the updated terms as of their effective date. 2. Obligations 2.1 Service Eligibility Here are some promises that you make to us in this Contract: You’re eligible to enter into this Contract and you are at least our “Minimum Age.” The Services are not for use by anyone under the age of 16. To use the Services, you agree that: (1) you must be the "Minimum Age" (described below) or older; (2) you will only have one LinkedIn account, which must be in your real name; and (3) you are not already restricted by LinkedIn from using the Services. Creating an account with false information is a violation of our terms, including accounts registered on behalf of others or persons under the age of 16. “Minimum Age” means 16 years old. However, if law requires that you must be older in order for LinkedIn to lawfully provide the Services to you without parental consent (including using your personal data) then the Minimum Age is such older age. Learn More 2.2 Your Account You will keep your password a secret You will not share your account with anyone else and will follow our policies and the law. Members are account holders. You agree to: (1) protect against wrongful access to your account (e.g., use a strong password and keep it confidential); (2) not share or transfer your account or any part of it (e.g., sell or transfer the personal data of others by transferring your connections); and (3) follow the law, our list of Dos and Don’ts (below), and our Professional Community Policies . Learn More You are responsible for anything that happens through your account unless you close it or report misuse. As between you and others (including your employer), your account belongs to you. However, if the Services were purchased by another party for you to use in connection with your work for them (e.g., Recruiter seat or LinkedIn Learning subscription bought by your employer), the party paying for such Service has the right to control access to and get reports on your use of such paid Service; however, they do not have rights to your personal account. 2.3 Payment You’ll honor your payment obligations and you are okay with us storing your payment information. You understand that there may be fees and taxes that are added to our prices. Refunds are subject to our policy, and we may modify our prices and those modified prices will apply prospectively. If you buy any of our paid Services, you agree to pay us the applicable fees and taxes and you agree to the additional terms specific to the paid Services. Failure to pay these fees will result in the termination of your paid Services. Also, you agree that: Your purchase may be subject to foreign exchange fees or differences in prices based on location (e.g., exchange rates). We may store and continue billing your payment method (e.g., credit card), even after it has expired, to avoid interruptions in your paid Services and to use it to pay for other Services you may buy. If your primary payment method fails, we may automatically charge a secondary payment method, if you have provided one. You may update or change your payment method. Learn more If you purchase a subscription, your payment method automatically will be charged at the start of each subscription period for the fees and taxes applicable to that period. To avoid future charges, cancel before the renewal date. Learn how to cancel or suspend your paid subscription Services. We may modify our prices effective prospectively upon reasonable notice to the extent allowed under the law. All of your paid Services are subject to LinkedIn’s refund policy . We may calculate taxes payable by you based on the billing information that you provide us. You can get a copy of your invoice through your LinkedIn account settings under “ Purchase History ”. 2.4 Notices and Messages You’re okay with us providing notices and messages to you through our websites, apps, and contact information. If your contact information is out of date, you may miss out on important notices. You agree that we will provide notices and messages to you in the following ways: (1) within the Services or (2) sent to the contact information you provided us (e.g., email, mobile number, physical address). You agree to keep your contact information up to date. Please review your settings to control and limit the types of messages you receive from us. 2.5 Sharing When you share information on our Services, others can see, copy and use that information. Our Services allow sharing of information (including content) in many ways, such as through your profile, posts, articles, group posts, links to news articles, job postings, messages, and InMails. Depending on the feature and choices you make, information that you share may be seen by other Members, Visitors, or others (on or off of the Services). Where we have made settings available, we will honor the choices you make about who can see content or other information (e.g., message content to your addressees, sharing content only to LinkedIn connections, restricting your profile visibility from search tools, or opting not to notify others of your LinkedIn profile update). For job searching activities, we default to not notifying your connections or the public. So, if you apply for a job through our Services or opt to signal that you are interested in a job, our default is to share it only with the job poster. To the extent that laws allow this, we are not obligated to publish any content or other information on our Services and can remove it with or without notice. 3. Rights and Limits 3.1. Your License to LinkedIn You own all of your original content that you provide to us, but you also grant us a non-exclusive license to it. We’ll honor the choices you make about who gets to see your content, including how it can be used for ads. As between you and LinkedIn, you own your original content that you submit or post to the Services. You grant LinkedIn and our Affiliates the following non-exclusive license to the content and other information you provide (e.g., share, post, upload, and/or otherwise submit) to our Services: A worldwide, transferable and sublicensable right to use, copy, modify, distribute, publicly perform and display, host, and process your content and other information without any further consent, notice and/or compensation to you or others. These rights are limited in the following ways: You can end this license for specific content by deleting such content from the Services, or generally by closing your account, except (a) to the extent you (1) shared it with others as part of the Services and they copied, re-shared it or stored it, (2) we had already sublicensed others prior to your content removal or closing of your account, or (3) we are required by law to retain or share it with others, and (b) for the reasonable time it takes to remove the content you delete from backup and other systems. We will not include your content in advertisements for the products and services of third parties to others without your separate consent (including sponsored content). However, without compensation to you or others, ads may be served near your content and other information, and your social actions may be visible and included with ads, as noted in the Privacy Policy. If you use a Service feature, we may mention that with your name or photo to promote that feature within our Services, subject to your settings. We will honor the audience choices for shared content (e.g., “Connections only”). For example, if you choose to share your post to "Anyone on or off LinkedIn” (or similar): (a) we may make it available off LinkedIn; (b) we may enable others to publicly share onto third-party services (e.g., a Member embedding your post on a third party service); and/or (c) we may enable search tools to make that public content findable though their services. Learn More While we may edit and make format changes to your content (such as translating or transcribing it, modifying the size, layout or file type, and removing or adding labels or metadata), we will take steps to avoid materially modifying the meaning of your expression in content you share with others. Because you own your original content and we only have non-exclusive rights to it, you may choose to make it available to others, including under the terms of a Creative Commons license . You and LinkedIn agree that if content includes personal data, it is subject to our Privacy Policy. You and LinkedIn agree that we may access, store, process, and use any information (including content and/or personal data) that you provide in accordance with the terms of the Privacy Policy and your choices (including settings). By submitting suggestions or other feedback regarding our Services to LinkedIn, you agree that LinkedIn can use and share (but does not have to) such feedback for any purpose without compensation to you. You promise to only provide content and other information that you have the right to share and that your LinkedIn profile will be truthful. You agree to only provide content and other information that does not violate the law or anyone’s rights (including intellectual property rights). You have choices about how much information to provide on your profile but also agree that the profile information you provide will be truthful. LinkedIn may be required by law to remove certain content and other information in certain countries. 3.2 Service Availability We may change or limit the availability of some features, or end any Service. We may change, suspend or discontinue any of our Services. We may also limit the availability of features, content and other information so that they are not available to all Visitors or Members (e.g., by country or by subscription access). We don’t promise to store or show (or keep showing) any information (including content) that you’ve shared. LinkedIn is not a storage service. You agree that we have no obligation to store, maintain or provide you a copy of any content or other information that you or others provide, except to the extent required by applicable law and as noted in our Privacy Policy. 3.3 Other Content, Sites and Apps Your use of others’ content and information posted on our Services, is at your own risk. Others may offer their own products and services through our Services, and we aren’t responsible for those third-party activities. Others’ Content: By using the Services, you may encounter content or other information that might be inaccurate, incomplete, delayed, misleading, illegal, offensive, or otherwise harmful. You agree that we are not responsible for content or other information made available through or within the Services by others, including Members. While we apply automated tools to review much of the content and other information presented in the Services, we cannot always prevent misuse of our Services, and you agree that we are not responsible for any such misuse. You also acknowledge the risk that others may share inaccurate or misleading information about you or your organization, and that you or your organization may be mistakenly associated with content about others, for example, when we let connections and followers know you or your organization were mentioned in the news. Members have choices about this feature . Others’ Products and Services: LinkedIn may help connect you to other Members (e.g., Members using Services Marketplace or our enterprise recruiting, jobs, sales, or marketing products) who offer you opportunities (on behalf of themselves, their organizations, or others) such as offers to become a candidate for employment or other work or offers to purchase products or services. You acknowledge that LinkedIn does not perform these offered services, employ those who perform these services, or provide these offered products. You further acknowledge that LinkedIn does not supervise, direct, control, or monitor Members in the making of these offers, or in their providing you with work, delivering products or performing services, and you agree that (1) LinkedIn is not responsible for these offers, or performance or procurement of them, (2) LinkedIn does not endorse any particular Member’s offers, and (3) LinkedIn is not an agent or employment agency on behalf of any Member offering employment or other work, products or services. With respect to employment or other work, LinkedIn does not make employment or hiring decisions on behalf of Members offering opportunities and does not have such authority from Members or organizations using our products. For Services Marketplace , (a) you must be at least 18 years of age to procure, offer, or perform services, and (b) you represent and warrant that you have all the required licenses and will provide services consistent with the relevant industry standards and our Professional Community Policies . Others’ Events: Similarly, LinkedIn may help you register for and/or attend events organized by Members and connect with other Members who are attendees at such events. You agree that (1) LinkedIn is not responsible for the conduct of any of the Members or other attendees at such events, (2) LinkedIn does not endorse any particular event listed on our Services, (3) LinkedIn does not review and/or vet any of these events or speakers, and (4) you will adhere to the terms and conditions that apply to such events. 3.4 Limits We have the right to limit how you connect and interact on our Services. LinkedIn reserves the right to limit your use of the Services, including the number of your connections and your ability to contact other Members. LinkedIn reserves the right to restrict, suspend, or terminate your account if you breach this Contract or the law or are misusing the Services (e.g., violating any of the Dos and Don’ts or Professional Community Policies ). We can also remove any content or other information you shared if we believe it violates our Professional Community Policies or Dos and Don’ts or otherwise violates this Contract. Learn more about how we moderate content. 3.5 Intellectual Property Rights We’re providing you notice about our intellectual property rights. LinkedIn reserves all of its intellectual property rights in the Services. Trademarks and logos used in connection with the Services are the trademarks of their respective owners. LinkedIn, and “in” logos and other LinkedIn trademarks, service marks, graphics and logos used for our Services are trademarks or registered trademarks of LinkedIn. 3.6 Recommendations and Automated Processing We use data and other information about you to make and order relevant suggestions and to generate content for you and others. Recommendations: We use the data and other information that you provide and that we have about Members and content on the Services to make recommendations for connections, content, ads, and features that may be useful to you. We use that data and other information to recommend and to present information to you in an order that may be more relevant for you. For example, that data and information may be used to recommend jobs to you and you to recruiters and to organize content in your feed in order to optimize your experience and use of the Services. Keeping your profile accurate and up to date helps us to make these recommendations more accurate and relevant. Learn More Generative AI Features: By using the Services, you may interact with features we offer that automate content generation for you. The content that is generated might be inaccurate, incomplete, delayed, misleading or not suitable for your purposes. Please review and edit such content before sharing with others. Like all content you share on our Services, you are responsible for ensuring it complies with our Professional Community Policies , including not sharing misleading information. The Services may include content automatically generated and shared using tools offered by LinkedIn or others off LinkedIn. Like all content and other information on our Services, regardless of whether it's labeled as created by “AI”, be sure to carefully review before relying on it. 4. Disclaimer and Limit of Liability 4.1 No Warranty This is our disclaimer of legal liability for the quality, safety, or reliability of our Services. LINKEDIN AND ITS AFFILIATES MAKE NO REPRESENTATION OR WARRANTY ABOUT THE SERVICES, INCLUDING ANY REPRESENTATION THAT THE SERVICES WILL BE UNINTERRUPTED OR ERROR-FREE, AND PROVIDE THE SERVICES (INCLUDING CONTENT, OUTPUT AND INFORMATION) ON AN “AS IS” AND “AS AVAILABLE” BASIS. TO THE FULLEST EXTENT PERMITTED UNDER APPLICABLE LAW, LINKEDIN AND ITS AFFILIATES DISCLAIM ANY IMPLIED OR STATUTORY WARRANTY, INCLUDING ANY IMPLIED WARRANTY OF TITLE, ACCURACY, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. If you plan to use content, output and information for any reason, it is your responsibility to verify its accuracy and fitness for your purposes, because any content, output and information on the service may not reflect accurate, complete, or current information. 4.2 Exclusion of Liability These are the limits of legal liability we may have to you. TO THE FULLEST EXTENT PERMITTED BY LAW (AND UNLESS LINKEDIN HAS ENTERED INTO A SEPARATE WRITTEN AGREEMENT THAT OVERRIDES THIS CONTRACT), LINKEDIN AND ITS AFFILIATES, WILL NOT BE LIABLE IN CONNECTION WITH THIS CONTRACT FOR LOST PROFITS OR LOST BUSINESS OPPORTUNITIES, REPUTATION (E.G., OFFENSIVE OR DEFAMATORY STATEMENTS), LOSS OF DATA (E.G., DOWN TIME OR LOSS, USE OF, OR CHANGES TO, YOUR INFORMATION OR CONTENT) OR ANY INDIRECT, INCIDENTAL, CONSEQUENTIAL, SPECIAL OR PUNITIVE DAMAGES. LINKEDIN AND ITS AFFILIATES WILL NOT BE LIABLE TO YOU IN CONNECTION WITH THIS CONTRACT FOR ANY AMOUNT THAT EXCEEDS (A) THE TOTAL FEES PAID OR PAYABLE BY YOU TO LINKEDIN FOR THE SERVICES DURING THE TERM OF THIS CONTRACT, IF ANY, OR (B) US $1000. 4.3 Basis of the Bargain; Exclusions The limitations of liability in this Section 4 are part of the basis of the bargain between you and LinkedIn and shall apply to all claims of liability (e.g., warranty, tort, negligence, contract and law) even if LinkedIn or its affiliates has been told of the possibility of any such damage, and even if these remedies fail their essential purpose. THESE LIMITATIONS OF LIABILITY DO NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY OR FOR FRAUD, GROSS NEGLIGENCE OR INTENTIONAL MISCONDUCT, OR IN CASES OF NEGLIGENCE, WHERE A MATERIAL OBLIGATION HAS BEEN BREACHED. A MATERIAL OBLIGATION BEING AN OBLIGATION WHICH FORMS A PREREQUISITE TO OUR DELIVERY OF SERVICES AND ON WHICH YOU MAY REASONABLY RELY, BUT ONLY TO THE EXTENT THAT THE DAMAGES WERE DIRECTLY CAUSED BY THE BREACH AND WERE FORESEEABLE UPON CONCLUSION OF THIS CONTRACT AND TO THE EXTENT THAT THEY ARE TYPICAL IN THE CONTEXT OF THIS CONTRACT. 5. Termination We can each end this Contract, but some rights and obligations survive. Both you and LinkedIn may terminate this Contract at any time with notice to the other. On termination, you lose the right to access or use the Services. The following shall survive termination: Our rights to use and disclose your feedback; Section 3 (subject to 3.1.1); Sections 4, 6, 7, and 8.2 of this Contract; and Any amounts owed by either party prior to termination remain owed after termination. You can visit our Help Center to learn about how to close your account 6. Governing Law and Dispute Resolution In the unlikely event we end up in a legal dispute, depending on where you live, you and LinkedIn agree to resolve it in California courts using California law, Dublin, Ireland courts using Irish law, or as otherwise provided in this section. If you live in the Designated Countries, the laws of Ireland govern all claims related to LinkedIn's provision of the Services, but this shall not deprive you of the mandatory consumer protections under the law of the country to which we direct your Services where you have habitual residence. With respect to jurisdiction, you and LinkedIn agree to choose the courts of the country to which we direct your Services where you have habitual residence for all disputes arising out of or relating to this User Agreement, or in the alternative, you may choose the responsible court in Ireland. If you are a business user within the scope of Article 6(12) of the EU Digital Markets Act (“DMA”) and have a dispute arising out of or in connection with Article 6(12) of the DMA, you may also utilize the alternative dispute resolution mechanism available in the Help Center . For others outside of Designated Countries, including those who live outside of the United States: You and LinkedIn agree that the laws of the State of California, U.S.A., excluding its conflict of laws rules, shall exclusively govern any dispute relating to this Contract and/or the Services. You and LinkedIn both agree that all claims and disputes can be litigated only in the federal or state courts in Santa Clara County, California, USA, and you and LinkedIn each agree to personal jurisdiction in those courts. You may have additional rights of redress and appeal for some decisions made by LinkedIn that impact you. 7. General Terms Here are some important details about the Contract. If a court with authority over this Contract finds any part of it unenforceable, you and we agree that the court should modify the terms to make that part enforceable while still achieving its intent. If the court cannot do that, you and we agree to ask the court to remove that unenforceable part and still enforce the rest of this Contract. This Contract (including additional terms that may be provided by us when you engage with a feature of the Services) is the only agreement between us regarding the Services and supersedes all prior agreements for the Services. If we don't act to enforce a breach of this Contract, that does not mean that LinkedIn has waived its right to enforce this Contract. You may not assign or transfer this Contract (or your membership or use of Services) to anyone without our consent. However, you agree that LinkedIn may assign this Contract to its affiliates or a party that buys it without your consent. There are no third-party beneficiaries to this Contract. You agree that the only way to provide us legal notice is at the addresses provided in Section 10. 8. LinkedIn “Dos and Don’ts” LinkedIn is a community of professionals. This list of “Dos and Don’ts” along with our Professional Community Policies limits what you can and cannot do on our Services, unless otherwise explicitly permitted by LinkedIn in a separate writing (e.g., through a research agreement). 8.1. Dos You agree that you will: Comply with all applicable laws, including, without limitation, privacy laws, intellectual property laws, anti-spam laws, export control laws, laws governing the content shared, and other applicable laws and regulatory requirements; Provide accurate contact and identity information to us and keep it updated; Use your real name on your profile; and Use the Services in a professional manner. 8.2. Don’ts You agree that you will not : Create a false identity on LinkedIn, misrepresent your identity, create a Member profile for anyone other than yourself (a real person), or use or attempt to use another’s account (such as sharing log-in credentials or copying cookies); Develop, support or use software, devices, scripts, robots or any other means or processes (such as crawlers, browser plugins and add-ons or any other technology) to scrape or copy the Services, including profiles and other data from the Services; Override any security feature or bypass or circumvent any access controls or use limits of the Services (such as search results, profiles, or videos); Copy, use, display or distribute any information (including content) obtained from the Services, whether directly or through third parties (such as search tools or data aggregators or brokers), without the consent of the content owner (such as LinkedIn for content it owns); Disclose information that you do not have the consent to disclose (such as confidential information of others (including your employer); Violate the intellectual property rights of others, including copyrights, patents, trademarks, trade secrets or other proprietary rights. For example, do not copy or distribute (except through the available sharing functionality) the posts or other content of others without their permission, which they may give by posting under a Creative Commons license; Violate the intellectual property or other rights of LinkedIn, including, without limitation, (i) copying or distributing our learning videos or other materials, (ii) copying or distributing our technology, unless it is released under open source licenses; or (iii) using the word “LinkedIn” or our logos in any business name, email, or URL except as provided in the Brand Guidelines ; Post (or otherwise share) anything that contains software viruses, worms, or any other harmful code; Reverse engineer, decompile, disassemble, decipher or otherwise attempt to derive the source code for the Services or any related technology that is not open source; Imply or state that you are affiliated with or endorsed by LinkedIn without our express consent (e.g., representing yourself as an accredited LinkedIn trainer); Rent, lease, loan, trade, sell/re-sell or otherwise monetize the Services or related data or access to the same, without LinkedIn’s consent; Deep-link to our Services for any purpose other than to promote your profile or a Group on our Services, without LinkedIn’s consent; Use bots or other unauthorized automated methods to access the Services, add or download contacts, send or redirect messages, create, comment on, like, share, or re-share posts, or otherwise drive inauthentic engagement; Engage in “framing”, “mirroring”, or otherwise simulating the appearance or function of the Services; Overlay or otherwise modify the Services or their appearance (such as by inserting elements into the Services or removing, covering, or obscuring an advertisement included on the Services); Interfere with the operation of, or place an unreasonable load on, the Services (e.g., spam, denial of service attack, viruses, manipulating algorithms); Violate the Professional Community Policies , certain third party terms where applicable, or any additional terms concerning a specific Service that are provided when you sign up for or start using such Service; Use our Services to do anything that is unlawful, misleading, discriminatory, fraudulent or deceitful (e.g. manipulated media that wrongfully depicts a person saying or doing something they did not say or do); and/or Misuse our reporting or appeals process, including by submitting duplicative, fraudulent or unfounded reports, complaints or appeals. 9. Complaints Regarding Content Contact information for complaints about content provided by our Members. We ask that you report content and other information that you believe violates your rights (including intellectual property rights), our Professional Community Policies or otherwise violates this Contract or the law. To the extent we can under law, we may remove or restrict access to content, features, services, or information, including if we believe that it’s reasonably necessary to avoid harm to LinkedIn or others, violates the law or is reasonably necessary to prevent misuse of our Services. We reserve the right to take action against serious violations of this Contract, including by implementing account restrictions for significant violations. We respect the intellectual property rights of others. We require that information shared by Members be accurate and not in violation of the intellectual property rights or other rights of third parties. We provide a policy and process for complaints concerning content shared, and/or trademarks used, by our Members. 10. How To Contact Us Our Contact information. Our Help Center also provides information about our Services. For general inquiries, you may contact us online . For legal notices or service of process, you may write us at these addresses . LinkedIn © 2026 About Accessibility User Agreement Privacy Policy Cookie Policy Copyright Policy Brand Policy Guest Controls Community Guidelines العربية (Arabic) বাংলা (Bangla) Čeština (Czech) Dansk (Danish) Deutsch (German) Ελληνικά (Greek) English (English) Español (Spanish) فارسی (Persian) Suomi (Finnish) Français (French) हिंदी (Hindi) Magyar (Hungarian) Bahasa Indonesia (Indonesian) Italiano (Italian) עברית (Hebrew) 日本語 (Japanese) 한국어 (Korean) मराठी (Marathi) Bahasa Malaysia (Malay) Nederlands (Dutch) Norsk (Norwegian) ਪੰਜਾਬੀ (Punjabi) Polski (Polish) Português (Portuguese) Română (Romanian) Русский (Russian) Svenska (Swedish) తెలుగు (Telugu) ภาษาไทย (Thai) Tagalog (Tagalog) Türkçe (Turkish) Українська (Ukrainian) Tiếng Việt (Vietnamese) 简体中文 (Chinese (Simplified)) 正體中文 (Chinese (Traditional)) Language | 2026-01-13T09:29:14 |
https://www.linkedin.com/signup/cold-join?session_redirect=%2Fservices%2Fproducts%2Fcloudflare-ddos-protection%2F&trk=products_details_guest_nav-header-join | Sign Up | LinkedIn Make the most of your professional life Not you? Remove photo Join LinkedIn To create a LinkedIn account, you must understand how LinkedIn processes your personal information by selecting learn more for each item listed. Agree to all terms We collect and use personal information. Learn more We share personal information with third parties to provide our services. Learn more Further information is available in our Korea Privacy Addendum . Privacy Policy Addendum 1 of 2 2 of 2 Agree to the term Continue Back Agree to all terms Email Password Show First name Last name By clicking Agree & Join, you agree to the LinkedIn User Agreement , Privacy Policy , and Cookie Policy . Agree & Join or Security verification Already on LinkedIn? Sign in Looking to create a page for a business? Get help LinkedIn © 2026 About Accessibility User Agreement Privacy Policy Cookie Policy Copyright Policy Brand Policy Guest Controls Community Guidelines العربية (Arabic) বাংলা (Bangla) Čeština (Czech) Dansk (Danish) Deutsch (German) Ελληνικά (Greek) English (English) Español (Spanish) فارسی (Persian) Suomi (Finnish) Français (French) हिंदी (Hindi) Magyar (Hungarian) Bahasa Indonesia (Indonesian) Italiano (Italian) עברית (Hebrew) 日本語 (Japanese) 한국어 (Korean) मराठी (Marathi) Bahasa Malaysia (Malay) Nederlands (Dutch) Norsk (Norwegian) ਪੰਜਾਬੀ (Punjabi) Polski (Polish) Português (Portuguese) Română (Romanian) Русский (Russian) Svenska (Swedish) తెలుగు (Telugu) ภาษาไทย (Thai) Tagalog (Tagalog) Türkçe (Turkish) Українська (Ukrainian) Tiếng Việt (Vietnamese) 简体中文 (Chinese (Simplified)) 正體中文 (Chinese (Traditional)) Language | 2026-01-13T09:29:14 |
https://www.mkdocs.org/about/release-notes/#maintenance-team | Release Notes - MkDocs MkDocs Home Getting Started User Guide User Guide Installation Writing Your Docs Choosing Your Theme Customizing Your Theme Localizing Your Theme Configuration Command Line Interface Deploying Your Docs Developer Guide Developer Guide Themes Translations Plugins API Reference About Release Notes Contributing License Search Previous Next Edit on GitHub Release Notes Upgrading Maintenance team Version 1.6.1 (2024-08-30) Version 1.6.0 (2024-04-20) Version 1.5.3 (2023-09-18) Version 1.5.2 (2023-08-02) Version 1.5.1 (2023-07-28) Version 1.5.0 (2023-07-26) Version 1.4.3 (2023-05-02) Version 1.4.2 (2022-11-01) Version 1.4.1 (2022-10-15) Version 1.4.0 (2022-09-27) Version 1.3.1 (2022-07-19) Version 1.3.0 (2022-03-26) Version 1.2.4 (2022-03-26) Version 1.2.3 (2021-10-12) Version 1.2.2 (2021-07-18) Version 1.2.1 (2021-06-09) Version 1.2 (2021-06-04) Version 1.1.2 (2020-05-14) Version 1.1.1 (2020-05-12) Version 1.1 (2020-02-22) Version 1.0.4 (2018-09-07) Version 1.0.3 (2018-08-29) Version 1.0.2 (2018-08-22) Version 1.0.1 (2018-08-13) Version 1.0 (2018-08-03) Version 0.17.5 (2018-07-06) Version 0.17.4 (2018-06-08) Version 0.17.3 (2018-03-07) Version 0.17.2 (2017-11-15) Version 0.17.1 (2017-10-30) Version 0.17.0 (2017-10-19) Version 0.16.3 (2017-04-04) Version 0.16.2 (2017-03-13) Version 0.16.1 (2016-12-22) Version 0.16 (2016-11-04) Version 0.15.3 (2016-02-18) Version 0.15.2 (2016-02-08) Version 0.15.1 (2016-01-30) Version 0.15.0 (2016-01-21) Version 0.14.0 (2015-06-09) Version 0.13.3 (2015-06-02) Version 0.13.2 (2015-05-30) Version 0.13.1 (2015-05-27) Version 0.13.0 (2015-05-26) Version 0.12.2 (2015-04-22) Version 0.12.1 (2015-04-14) Version 0.12.0 (2015-04-14) Version 0.11.1 (2014-11-20) Version 0.11.0 (2014-11-18) Version 0.10.0 (2014-10-29) Release Notes Upgrading To upgrade MkDocs to the latest version, use pip: pip install -U mkdocs You can determine your currently installed version using mkdocs --version : $ mkdocs --version mkdocs, version 1.5.0 from /path/to/mkdocs (Python 3.10) Maintenance team The current and past members of the MkDocs team. @tomchristie @d0ugal @waylan @oprypin @ultrabug Version 1.6.1 (2024-08-30) Fixed Fix build error when environment variable SOURCE_DATE_EPOCH=0 is set. #3795 Fix build error when mkdocs_theme.yml config is empty. #3700 Support python -W and PYTHONWARNINGS instead of overriding the configuration. #3809 Support running with Docker under strict mode, by removing 0.0.0.0 dev server warning. #3784 Drop unnecessary changefreq from sitemap.xml . #3629 Fix JavaScript console error when closing menu dropdown. #3774 Fix JavaScript console error that occur on repeated clicks. #3730 Fix JavaScript console error that can occur on dropdown selections. #3694 Added Added translations for Dutch. #3804 Added and updated translations for Chinese (Simplified). #3684 Version 1.6.0 (2024-04-20) Local preview mkdocs serve no longer locks up the browser when more than 5 tabs are open. This is achieved by closing the polling connection whenever a tab becomes inactive. Background tabs will no longer auto-reload either - that will instead happen as soon the tab is opened again. Context: #3391 New flag serve --open to open the site in a browser. After the first build is finished, this flag will cause the default OS Web browser to be opened at the home page of the local site. Context: #3500 Drafts Changed from version 1.5 The exclude_docs config was split up into two separate concepts. The exclude_docs config no longer has any special behavior for mkdocs serve - it now always completely excludes the listed documents from the site. If you wish to use the "drafts" functionality like the exclude_docs key used to do in MkDocs 1.5, please switch to the new config key draft_docs . See documentation . Other changes: Reduce warning levels when a "draft" page has a link to a non-existent file. Context: #3449 Update to deduction of page titles MkDocs 1.5 had a change in behavior in deducing the page titles from the first heading. Unfortunately this could cause unescaped HTML tags or entities to appear in edge cases. Now tags are always fully sanitized from the title. Though it still remains the case that Page.title is expected to contain HTML entities and is passed directly to the themes. Images (notably, emojis in some extensions) get preserved in the title only through their alt attribute's value. Context: #3564 , #3578 Themes Built-in themes now also support Polish language ( #3613 ) "readthedocs" theme Fix: "readthedocs" theme can now correctly handle deeply nested nav configurations (over 2 levels deep), without confusedly expanding all sections and jumping around vertically. ( #3464 ) Fix: "readthedocs" theme now shows a link to the repository (with a generic logo) even when isn't one of the 3 known hosters. ( #3435 ) "readthedocs" theme now also has translation for the word "theme" in the footer that mistakenly always remained in English. ( #3613 , #3625 ) "mkdocs" theme The "mkdocs" theme got a big update to a newer version of Bootstrap, meaning a slight overhaul of styles. Colors (most notably of admonitions) have much better contrast. The "mkdocs" theme now has support for dark mode - both automatic (based on the OS/browser setting) and with a manual toggle. Both of these options are not enabled by default and need to be configured explicitly. See color_mode , user_color_mode_toggle in documentation . Possible breaking change jQuery is no longer included into the "mkdocs" theme. If you were relying on it in your scripts, you will need to separately add it first (into mkdocs.yml) as an extra script: extra_javascript: - https://code.jquery.com/jquery-3.7.1.min.js Or even better if the script file is copied and included from your docs dir. Context: #3493 , #3649 Configuration New " enabled " setting for all plugins You may have seen some plugins take up the convention of having a setting enabled: false (or usually controlled through an environment variable) to make the plugin do nothing. Now every plugin has this setting. Plugins can still choose to implement this config themselves and decide how it behaves (and unless they drop older versions of MkDocs, they still should for now), but now there's always a fallback for every plugin. See documentation . Context: #3395 Validation Validation of hyperlinks between pages Absolute links Historically, within Markdown, MkDocs only recognized relative links that lead to another physical *.md document (or media file). This is a good convention to follow because then the source pages are also freely browsable without MkDocs, for example on GitHub. Whereas absolute links were left unmodified (making them often not work as expected or, more recently, warned against). If you dislike having to always use relative links, now you can opt into absolute links and have them work correctly. If you set the setting validation.links.absolute_links to the new value relative_to_docs , all Markdown links starting with / will be understood as being relative to the docs_dir root. The links will then be validated for correctness according to all the other rules that were already working for relative links in prior versions of MkDocs. For the HTML output, these links will still be turned relative so that the site still works reliably. So, now any document (e.g. "dir1/foo.md") can link to the document "dir2/bar.md" as [link](/dir2/bar.md) , in addition to the previously only correct way [link](../dir2/bar.md) . You have to enable the setting, though. The default is still to just skip any processing of such links. See documentation . Context: #3485 Absolute links within nav Absolute links within the nav: config were also always skipped. It is now possible to also validate them in the same way with validation.nav.absolute_links . Though it makes a bit less sense because then the syntax is simply redundant with the syntax that comes without the leading slash. Anchors There is a new config setting that is recommended to enable warnings for: validation: anchors: warn Example of a warning that this can produce: WARNING - Doc file 'foo/example.md' contains a link '../bar.md#some-heading', but the doc 'foo/bar.md' does not contain an anchor '#some-heading'. Any of the below methods of declaring an anchor will be detected by MkDocs: ## Heading producing an anchor ## Another heading {#custom-anchor-for-heading-using-attr-list} <a id="raw-anchor"></a> [](){#markdown-anchor-using-attr-list} Plugins and extensions that insert anchors, in order to be compatible with this, need to be developed as treeprocessors that insert etree elements as their mode of operation, rather than raw HTML which is undetectable for this purpose. If you as a user are dealing with falsely reported missing anchors and there's no way to resolve this, you can choose to disable these messages by setting this option to ignore (and they are at INFO level by default anyway). See documentation . Context: #3463 Other changes: When the nav config is not specified at all, the not_in_nav setting (originally added in 1.5.0) gains an additional behavior: documents covered by not_in_nav will not be part of the automatically deduced navigation. Context: #3443 Fix: the !relative YAML tag for markdown_extensions (originally added in 1.5.0) - it was broken in many typical use cases. See documentation . Context: #3466 Config validation now exits on first error, to avoid showing bizarre secondary errors. Context: #3437 MkDocs used to shorten error messages for unexpected errors such as "file not found", but that is no longer the case, the full error message and stack trace will be possible to see (unless the error has a proper handler, of course). Context: #3445 Upgrades for plugin developers Plugins can add multiple handlers for the same event type, at multiple priorities See mkdocs.plugins.CombinedEvent in documentation . Context: #3448 Enabling true generated files and expanding the File API See documentation . There is a new pair of attributes File.content_string / content_bytes that becomes the official API for obtaining the content of a file and is used by MkDocs itself. This replaces the old approach where one had to manually read the file located at File.abs_src_path , although that is still the primary action that these new attributes do under the hood. The content of a File can be backed by a string and no longer has to be a real existing file at abs_src_path . It is possible to set the attribute File.content_string or File.content_bytes and it will take precedence over abs_src_path . Further, abs_src_path is no longer guaranteed to be present and can be None instead. MkDocs itself still uses physical files in all cases, but eventually plugins will appear that don't populate this attribute. There is a new constructor File.generated() that should be used by plugins instead of the File() constructor. It is much more convenient because one doesn't need to manually look up the values such as docs_dir and use_directory_urls . Its signature is one of: f = File.generated(config: MkDocsConfig, src_uri: str, content: str | bytes) f = File.generated(config: MkDocsConfig, src_uri: str, abs_src_path: str) This way, it is now extremely easy to add a virtual file even from a hook: def on_files(files: Files, config: MkDocsConfig): files.append(File.generated(config, 'fake/path.md', content="Hello, world!")) For large content it is still best to use physical files, but one no longer needs to manipulate the path by providing a fake unused docs_dir . There is a new attribute File.generated_by that arose by convention - for generated files it should be set to the name of the plugin (the key in the plugins: collection) that produced this file. This attribute is populated automatically when using the File.generated() constructor. It is possible to set the edit_uri attribute of a File , for example from a plugin or hook, to make it different from the default (equal to src_uri ), and this will be reflected in the edit link of the document. This can be useful because some pages aren't backed by a real file and are instead created dynamically from some other source file or script. So a hook could set the edit_uri to that source file or script accordingly. The File object now stores its original src_dir , dest_dir , use_directory_urls values as attributes. Fields of File are computed on demand but cached. Only the three above attributes are primary ones, and partly also dest_uri . This way, it is possible to, for example, overwrite dest_uri of a File , and abs_dest_path will be calculated based on it. However you need to clear the attribute first using del f.abs_dest_path , because the values are cached. File instances are now hashable (can be used as keys of a dict ). Two files can no longer be considered "equal" unless it's the exact same instance of File . Other changes: The internal storage of File objects inside a Files object has been reworked, so any plugins that choose to access Files._files will get a deprecation warning. The order of File objects inside a Files collection is no longer significant when automatically inferring the nav . They get forcibly sorted according to the default alphabetic order. Context: #3451 , #3463 Hooks and debugging Hook files can now import adjacent *.py files using the import statement. Previously this was possible to achieve only through a sys.path workaround. See the new mention in documentation . Context: #3568 Verbose -v log shows the sequence of plugin events in more detail - shows each invoked plugin one by one, not only the event type. Context: #3444 Deprecations Python 3.7 is no longer supported, Python 3.12 is officially supported. Context: #3429 The theme config file mkdocs_theme.yml no longer executes YAML tags. Context: #3465 The plugin event on_page_read_source is soft-deprecated because there is always a better alternative to it (see the new File API or just on_page_markdown , depending on the desired interaction). When multiple plugins/hooks apply this event handler, they trample over each other, so now there is a warning in that case. See documentation . Context: #3503 API deprecations It is no longer allowed to set File.page to a type other than Page or a subclass thereof. Context: #3443 - following the deprecation in version 1.5.3 and #3381 . Theme._vars is deprecated - use theme['foo'] instead of theme._vars['foo'] utils : modified_time() , get_html_path() , get_url_path() , is_html_file() , is_template_file() are removed. path_to_url() is deprecated. LiveReloadServer.watch() no longer accepts a custom callback. Context: #3429 Misc The sitemap.xml.gz file is slightly more reproducible and no longer changes on every build, but instead only once per day (upon a date change). Context: #3460 Other small improvements; see commit log . Version 1.5.3 (2023-09-18) Fix mkdocs serve sometimes locking up all browser tabs when navigating quickly ( #3390 ) Add many new supported languages for "search" plugin - update lunr-languages to 1.12.0 ( #3334 ) Bugfix (regression in 1.5.0): In "readthedocs" theme the styling of "breadcrumb navigation" was broken for nested pages ( #3383 ) Built-in themes now also support Chinese (Traditional, Taiwan) language ( #3154 ) Plugins can now set File.page to their own subclass of Page . There is also now a warning if File.page is set to anything other than a strict subclass of Page . ( #3367 , #3381 ) Note that just instantiating a Page sets the file automatically , so care needs to be taken not to create an unneeded Page . Other small improvements; see commit log . Version 1.5.2 (2023-08-02) Bugfix (regression in 1.5.0): Restore functionality of --no-livereload . ( #3320 ) Bugfix (regression in 1.5.0): The new page title detection would sometimes be unable to drop anchorlinks - fix that. ( #3325 ) Partly bring back pre-1.5 API: extra_javascript items will once again be mostly strings, and only sometimes ExtraScriptValue (when the extra script functionality is used). Plugins should be free to append strings to config.extra_javascript , but when reading the values, they must still make sure to read it as str(value) in case it is an ExtraScriptValue item. For querying the attributes such as .type you need to check isinstance first. Static type checking will guide you in that. ( #3324 ) See commit log . Version 1.5.1 (2023-07-28) Bugfix (regression in 1.5.0): Make it possible to treat ExtraScriptValue as a path. This lets some plugins still work despite the breaking change. Bugfix (regression in 1.5.0): Prevent errors for special setups that have 3 conflicting files, such as index.html , index.md and README.md ( #3314 ) See commit log . Version 1.5.0 (2023-07-26) New command mkdocs get-deps This command guesses the Python dependencies that a MkDocs site requires in order to build. It simply prints the PyPI packages that need to be installed. In the terminal it can be combined directly with an installation command as follows: pip install $(mkdocs get-deps) The idea is that right after running this command, you can directly follow it up with mkdocs build and it will almost always "just work", without needing to think which dependencies to install. The way it works is by scanning mkdocs.yml for themes: , plugins: , markdown_extensions: items and doing a reverse lookup based on a large list of known projects (catalog, see below). Of course, you're welcome to use a "virtualenv" with such a command. Also note that for environments that require stability (for example CI) directly installing deps in this way is not a very reliable approach as it precludes dependency pinning. The command allows overriding which config file is used (instead of mkdocs.yml in the current directory) as well as which catalog of projects is used (instead of downloading it from the default location). See mkdocs get-deps --help . Context: #3205 MkDocs has an official catalog of plugins Check out https://github.com/mkdocs/catalog and add all your general-purpose plugins, themes and extensions there, so that they can be looked up through mkdocs get-deps . This was renamed from "best-of-mkdocs" and received significant updates. In addition to pip installation commands, the page now shows the config boilerplate needed to add a plugin. Expanded validation of links Validated links in Markdown As you may know, within Markdown, MkDocs really only recognizes relative links that lead to another physical *.md document (or media file). This is a good convention to follow because then the source pages are also freely browsable without MkDocs, for example on GitHub. MkDocs knows that in the output it should turn those *.md links into *.html as appropriate, and it would also always tell you if such a link doesn't actually lead to an existing file. However, the checks for links were really loose and had many concessions. For example, links that started with / ("absolute") and links that ended with / were left as is and no warning was shown, which allowed such very fragile links to sneak into site sources: links that happen to work right now but get no validation and links that confusingly need an extra level of .. with use_directory_urls enabled. Now, in addition to validating relative links, MkDocs will print INFO messages for unrecognized types of links (including absolute links). They look like this: INFO - Doc file 'example.md' contains an absolute link '/foo/bar/', it was left as is. Did you mean 'foo/bar.md'? If you don't want any changes, not even the INFO messages, and wish to revert to the silence from MkDocs 1.4, add the following configs to mkdocs.yml ( not recommended): validation: absolute_links: ignore unrecognized_links: ignore If, on the opposite end, you want these to print WARNING messages and cause mkdocs build --strict to fail, you are recommended to configure these to warn instead. See documentation for actual recommended settings and more details. Context: #3283 Validated links in the nav Links to documents in the nav configuration now also have configurable validation, though with no changes to the defaults. You are welcomed to turn on validation for files that were forgotten and excluded from the nav. Example: validation: nav: omitted_files: warn absolute_links: warn This can make the following message appear with the WARNING level (as opposed to INFO as the only option previously), thus being caught by mkdocs --strict : INFO - The following pages exist in the docs directory, but are not included in the "nav" configuration: ... See documentation . Context: #3283 , #1755 Mark docs as intentionally "not in nav" There is a new config not_in_nav . With it, you can mark particular patterns of files as exempt from the above omitted_files warning type; no messages will be printed for them anymore. (As a corollary, setting this config to * is the same as ignoring omitted_files altogether.) This is useful if you generally like these warnings about files that were forgotten from the nav, but still have some pages that you knowingly excluded from the nav and just want to build and copy them. The not_in_nav config is a set of gitignore-like patterns. See the next section for an explanation of another such config. See documentation . Context: #3224 , #1888 Excluded doc files There is a new config exclude_docs that tells MkDocs to ignore certain files under docs_dir and not copy them to the built site as part of the build. Historically MkDocs would always ignore file names starting with a dot, and that's all. Now this is all configurable: you can un-ignore these and/or ignore more patterns of files. The exclude_docs config follows the .gitignore pattern format and is specified as a multiline YAML string. For example: exclude_docs: | *.py # Excludes e.g. docs/hooks/foo.py /requirements.txt # Excludes docs/requirements.txt Validation of links (described above) is also affected by exclude_docs . During mkdocs serve the messages explain the interaction, whereas during mkdocs build excluded files are as good as nonexistent. As an additional related change, if you have a need to have both README.md and index.md files in a directory but publish only one of them, you can now use this feature to explicitly ignore one of them and avoid warnings. See documentation . Context: #3224 Drafts Dropped from version 1.6: The exclude_docs config no longer applies the "drafts" functionality for mkdocs serve . This was renamed to draft_docs . The exclude_docs config has another behavior: all excluded Markdown pages will still be previewable in mkdocs serve only, just with a "DRAFT" marker on top. Then they will of course be excluded from mkdocs build or gh-deploy . If you don't want mkdocs serve to have any special behaviors and instead want it to perform completely normal builds, use the new flag mkdocs serve --clean . See documentation . Context: #3224 mkdocs serve no longer exits after build errors If there was an error (from the config or a plugin) during a site re-build, mkdocs serve used to exit after printing a stack trace. Now it will simply freeze the server until the author edits the files to fix the problem, and then will keep reloading. But errors on the first build still cause mkdocs serve to exit, as before. Context: #3255 Page titles will be deduced from any style of heading MkDocs always had the ability to infer the title of a page (if it's not specified in the nav ) based on the first line of the document, if it had a <h1> heading that had to written starting with the exact character # . Now any style of Markdown heading is understood ( #1886 ). Due to the previous simplistic parsing, it was also impossible to use attr_list attributes in that first heading ( #3136 ). Now that is also fixed. Markdown extensions can use paths relative to the current document This is aimed at extensions such as pymdownx.snippets or markdown_include.include : you can now specify their include paths to be relative to the currently rendered Markdown document, or relative to the docs_dir . Any other extension can of course also make use of the new !relative YAML tag. markdown_extensions: - pymdownx.snippets: base_path: !relative See documentation . Context: #2154 , #3258 <script> tags can specify type="module" and other attributes In extra_javascript , if you use the .mjs file extension or explicitly specify a type: module key, the script will be added with the type="module" attribute. defer: true and async: true keys are also available. See updated documentation for extra_javascript . At first this is only supported in built-in themes, other themes need to follow up, see below. Context: #3237 Changes for theme developers (action required!) Using the construct {% for script in extra_javascript %} is now fully obsolete because it cannot allow customizing the attributes of the <script> tag. It will keep working but blocks some of MkDocs' features. Instead, you now need to use config.extra_javascript (which was already the case for a while) and couple it with the new script_tag filter: {%- for script in config.extra_javascript %} {{ script | script_tag }} {%- endfor %} See documentation . Upgrades for plugin developers Breaking change: config.extra_javascript is no longer a plain list of strings, but instead a list of ExtraScriptValue items. So you can no longer treat the list values as strings. If you want to keep compatibility with old versions, just always reference the items as str(item) instead. And you can still append plain strings to the list if you wish. See information about <script> tags above. Context: #3237 File has a new attribute inclusion . Its value is calculated from both the exclude_docs and not_in_nav configs, and implements their behavior. Plugins can read this value or write to it. New File instances by default follow whatever the configs say, but plugins can choose to make this decision explicitly, per file. When creating a File , one can now set a dest_uri directly, rather than having to update it (and other dependent attributes) after creation. Context A new config option was added - DictOfItems . Similarly to ListOfItems , it validates a mapping of config options that all have the same type. Keys are arbitrary but always strings. Context: #3242 A new function get_plugin_logger was added. In order to opt into a standardized way for plugins to log messages, please use the idiom: log = mkdocs.plugins.get_plugin_logger(__name__) ... log.info("Hello, world") Context: #3245 SubConfig config option can be conveniently subclassed with a particular type of config specified. For example, class ExtraScript(SubConfig[ExtraScriptValue]): . To see how this is useful, search for this class in code. Context Bugfix: SubConfig had a bug where paths (from FilesystemObject options) were not made relative to the main config file as intended, because config_file_path was not properly inherited to it. This is now fixed. Context: #3265 Config members now have a way to avoid clashing with Python's reserved words. This is achieved by stripping a trailing underscore from each member's name. Example of adding an async boolean option that can be set by the user as async: true and read programmatically as config.async_ : class ExampleConfig(Config): async_ = Type(bool, default=False) Previously making a config key with a reserved name was impossible with new-style schemas. Context Theme has its attributes properly declared and gained new attributes theme.locale , theme.custom_dir . Some type annotations were made more precise. For example: The context parameter has gained the type TemplateContext ( TypedDict ). Context The classes Page , Section , Link now have a common base class StructureItem . Context Some methods stopped accepting Config and only accept MkDocsConfig as was originally intended. Context config.mdx_configs got a proper type. Context: #3229 Theme updates Built-in themes mostly stopped relying on <script defer> . This may affect some usages of extra_javascript , mainly remove the need for custom handling of "has the page fully loaded yet". Context: #3237 "mkdocs" theme now has a styling for > blockquotes, previously they were not distinguished at all. Context: #3291 "readthedocs" theme was updated to v1.2.0 according to upstream, with improved styles for <kbd> and breadcrumb navigation. Context: #3058 Both built-in themes had their version of highlight.js updated to 11.8.0, and jQuery updated to 3.6.0. Bug fixes Relative paths in the nav can traverse above the root Regression in 1.2 - relative paths in the nav could no longer traverse above the site's root and were truncated to the root. Although such traversal is discouraged and produces a warning, this was a documented behavior. The behavior is now restored. Context: #2752 , #3010 MkDocs can accept the config from stdin This can be used for config overrides on the fly. See updated section at the bottom of Configuration Inheritance . The command to use this is mkdocs build -f - . In previous versions doing this led to an error. Context New command line flags mkdocs --no-color build disables color output and line wrapping. This option is also available through an environment variable NO_COLOR=true . Context: #3282 mkdocs build --no-strict overrides the strict config to false . Context: #3254 mkdocs build -f - (described directly above). mkdocs serve --clean (described above). mkdocs serve --dirty is the new name of mkdocs serve --dirtyreload . Deprecations extra_javascript underwent a change that can break plugins in rare cases, and it requires attention from theme developers. See respective entries above. Python-Markdown was unpinned from <3.4 . That version is known to remove functionality. If you are affected by those removals, you can still choose to pin the version for yourself: Markdown <3.4 . Context: #3222 , #2892 mkdocs.utils.warning_filter now shows a warning about being deprecated. It does nothing since MkDocs 1.2. Consider get_plugin_logger or just logging under mkdocs.plugins.* instead. Context: #3008 Accessing the _vars attribute of a Theme is deprecated - just access the keys directly. Accessing the user_configs attribute of a Config is deprecated. Note: instead of config.user_configs[*]['theme']['custom_dir'] , please use the new attribute config.theme.custom_dir . Other small improvements; see commit log . Version 1.4.3 (2023-05-02) Bugfix: for the hooks feature, modules no longer fail to load if using some advanced Python features like dataclasses ( #3193 ) Bugfix: Don't create None sitemap entries if the page has no populated URL - affects sites that exclude some files from navigation ( 07a297b ) "readthedocs" theme: Accessibility: add aria labels to Home logo ( #3129 ) and search inputs ( #3046 ) "readthedocs" theme now supports hljs_style: config, same as "mkdocs" theme ( #3199 ) Translations: Built-in themes now also support Indonesian language ( #3154 ) Fixed zh_CN translation ( #3125 ) tr_TR translation becomes just tr - usage should remain unaffected ( #3195 ) See commit log . Version 1.4.2 (2022-11-01) Officially support Python 3.11 ( #3020 ) Tip: Simply upgrading to Python 3.11 can cut off 10-15% of your site's build time. Support multiple instances of the same plugin ( #3027 ) If a plugin is specified multiple times in the list under the plugins: config, that will create 2 (or more) instances of the plugin with their own config each. Previously this case was unforeseen and, as such, bugged. Now even though this works, by default a warning will appear from MkDocs anyway, unless the plugin adds a class variable supports_multiple_instances = True . Bugfix (regression in 1.4.1): Don't error when a plugin puts a plain string into warnings ( #3016 ) Bugfix: Relative links will always render with a trailing slash ( #3022 ) Previously under use_directory_urls , links from a sub-page to the main index page rendered as e.g. <a href="../.."> even though in all other cases the links look like <a href="../../"> . This caused unwanted behavior on some combinations of Web browsers and servers. Now this special-case bug was removed. Built-in "mkdocs" theme now also supports Norwegian language ( #3024 ) Plugin-related warnings look more readable ( #3016 ) See commit log . Version 1.4.1 (2022-10-15) Support theme-namespaced plugin loading ( #2998 ) Plugins' entry points can be named as 'sometheme/someplugin'. That will have the following outcome: If the current theme is 'sometheme', the plugin 'sometheme/someplugin' will always be preferred over 'someplugin'. If the current theme isn't 'sometheme', the only way to use this plugin is by specifying plugins: [sometheme/someplugin] . One can also specify plugins: ['/someplugin'] instead of plugins: ['someplugin'] to definitely avoid the theme-namespaced plugin. Bugfix: mkdocs serve will work correctly with non-ASCII paths and redirects ( #3001 ) Windows: 'colorama' is now a dependency of MkDocs, to ensure colorful log output ( #2987 ) Plugin-related config options have more reliable validation and error reporting ( #2997 ) Translation sub-commands of setup.py were completely dropped. See documentation [1] [2] for their new replacements ( #2990 ) The 'mkdocs' package (wheel and source) is now produced by Hatch build system and pyproject.toml instead of setup.py ( #2988 ) Other small improvements; see commit log . Version 1.4.0 (2022-09-27) Feature upgrades Hooks ( #2978 ) The new hooks: config allows you to add plugin-like event handlers from local Python files, without needing to set up and install an actual plugin. See documentation . edit_uri flexibility ( #2927 ) There is a new edit_uri_template: config. It works like edit_uri but more generally covers ways to construct an edit URL. See documentation . Additionally, the edit_uri functionality will now fully work even if repo_url is omitted ( #2928 ) Upgrades for plugin developers Note This release has big changes to the implementation of plugins and their configs. But, the intention is to have zero breaking changes in all reasonably common use cases. Or at the very least if a code fix is required, there should always be a way to stay compatible with older MkDocs versions. Please report if this release breaks something. Customize event order for plugin event handlers ( #2973 ) Plugins can now choose to set a priority value for their event handlers. This can override the old behavior where for each event type, the handlers are called in the order that their plugins appear in the plugins config . If this is set, events with higher priority are called first. Events without a chosen priority get a default of 0. Events that have the same priority are ordered as they appear in the config. Recommended priority values: 100 "first", 50 "early", 0 "default", -50 "late", -100 "last". As different plugins discover more precise relations to each other, the values should be further tweaked. See documentation . New events that persist across builds in mkdocs serve ( #2972 ) The new events are on_startup and on_shutdown . They run at the very beginning and very end of an mkdocs invocation. on_startup also receives information on how mkdocs was invoked (e.g. serve --dirtyreload ). See documentation . Replace File.src_path to not deal with backslashes ( #2930 ) The property src_path uses backslashes on Windows, which doesn't make sense as it's a virtual path. To not make a breaking change, there's no change to how this property is used, but now you should: Use File.src_uri instead of File.src_path and File.dest_uri instead of File.dest_path . These consistently use forward slashes, and are now the definitive source that MkDocs itself uses. See source code . As a related tip: you should also stop using os.path.* or pathlib.Path() to deal with these paths, and instead use posixpath.* or pathlib.PurePosixPath() MkDocs is type-annotated, ready for use with mypy ( #2941 , #2970 ) Type annotations for event handler methods ( #2931 ) MkDocs' plugin event methods now have type annotations. You might have been adding annotations to events already, but now they will be validated to match the original. See source code and documentation . One big update is that now you should annotate method parameters more specifically as config: defaults.MkDocsConfig instead of config: base.Config . This not only makes it clear that it is the main config of MkDocs itself , but also provides type-safe access through attributes of the object (see next section). See source code and documentation . Rework ConfigOption schemas as class-based ( #2962 ) When developing a plugin, the settings that it accepts used to be specified in the config_scheme variable on the plugin class. This approach is now soft-deprecated, and instead you should specify the config in a sub-class of base.Config . Old example: from mkdocs import plugins from mkdocs.config import base, config_options class MyPlugin(plugins.BasePlugin): config_scheme = ( ('foo', config_options.Type(int)), ('bar', config_options.Type(str, default='')), ) def on_page_markdown(self, markdown: str, *, config: base.Config, **kwargs): if self.config['foo'] < 5: if config['site_url'].startswith('http:'): return markdown + self.config['baz'] This code snippet actually has many mistakes but it will pass all type checks and silently run and even succeed in some cases. So, on to the new equivalent example, changed to new-style schema and attribute-based access: (Complaints from "mypy" added inline) from mkdocs import plugins from mkdocs.config import base, config_options as c class MyPluginConfig(base.Config): foo = c.Optional(c.Type(int)) bar = c.Type(str, default='') class MyPlugin(plugins.BasePlugin[MyPluginConfig]): def on_page_markdown(self, markdown: str, *, config: defaults.MkDocsConfig, **kwargs): if self.config.foo < 5: # Error, `foo` might be `None`, need to check first. if config.site_url.startswith('http:'): # Error, MkDocs' `site_url` also might be `None`. return markdown + self.config.baz # Error, no such attribute `baz`! This lets you notice the errors from a static type checker before running the code and fix them as such: class MyPlugin(plugins.BasePlugin[MyPluginConfig]): def on_page_markdown(self, markdown: str, *, config: defaults.MkDocsConfig, **kwargs): if self.config.foo is not None and self.config.foo < 5: # OK, `int < int` is valid. if (config.site_url or '').startswith('http:'): # OK, `str.startswith(str)` is valid. return markdown + self.config.bar # OK, `str + str` is valid. See documentation . Also notice that we had to explicitly mark the config attribute foo as Optional . The new-style config has all attributes marked as required by default, and specifying required=False or required=True is not allowed! New: config_options.Optional ( #2962 ) Wrapping something into Optional is conceptually similar to "I want the default to be None " -- and you have to express it like that, because writing default=None doesn't actually work. Breaking change: the method BaseConfigOption.is_required() was removed. Use .required instead. ( #2938 ) And even the required property should be mostly unused now. For class-based configs, there's a new definition for whether an option is "required": It has no default, and It is not wrapped into config_options.Optional . New: config_options.ListOfItems ( #2938 ) Defines a list of items that each must adhere to the same constraint. Kind of like a validated Type(list) Examples how to express a list of integers (with from mkdocs.config import config_options as c ): Description Code entry Required to specify foo = c.ListOfItems(c.Type(int)) Optional, default is [] foo = c.ListOfItems(c.Type(int), default=[]) Optional, default is None foo = c.Optional(c.ListOfItems(c.Type(int))) See more examples in documentation . Updated: config_options.SubConfig ( #2807 ) SubConfig used to silently ignore all validation of its config options. Now you should pass validate=True to it or just use new class-based configs where this became the default. So, it can be used to validate a nested sub-dict with all keys pre-defined and value types strictly validated. See examples in documentation . Other changes to config options URL 's default is now None instead of '' . This can still be checked for truthiness in the same way - if config.some_url: ( #2962 ) FilesystemObject is no longer abstract and can be used directly, standing for "file or directory" with optional existence checking ( #2938 ) Bug fixes: Fix SubConfig , ConfigItems , MarkdownExtensions to not leak values across different instances ( #2916 , #2290 ) SubConfig raises the correct kind of validation error without a stack trace ( #2938 ) Fix dot-separated redirect in config_options.Deprecated(moved_to) ( #2963 ) Tweaked logic for handling ConfigOption.default ( #2938 ) Deprecated config option classes: ConfigItems ( #2983 ), OptionallyRequired ( #2962 ), RepoURL ( #2927 ) Theme updates Styles of admonitions in "MkDocs" theme ( #2981 ): Update colors to increase contrast Apply admonition styles also to <details> tag, to support Markdown extensions that provide it ( pymdownx.details , callouts ) Built-in themes now also support these languages: Russian ( #2976 ) Turkish (Turkey) ( #2946 ) Ukrainian ( #2980 ) Future compatibility extra_css: and extra_javascript: warn if a backslash \ is passed to them. ( #2930 , #2984 ) Show DeprecationWarning s as INFO messages. ( #2907 ) If any plugin or extension that you use relies on deprecated functionality of other libraries, it is at risk of breaking in the near future. Plugin developers should address these in a timely manner. Avoid a dependency on importlib_metadata starting from Python 3.10 ( #2959 ) Drop support for Python 3.6 ( #2948 ) Incompatible changes to public APIs mkdocs.utils : create_media_urls and normalize_url warn if a backslash \ is passed to them. ( #2930 ) is_markdown_file stops accepting case-insensitive variants such as .MD , which is how MkDocs build was already operating. ( #2912 ) Hard-deprecated: modified_time , reduce_list , get_html_path , get_url_path , is_html_file , is_template_file . ( #2912 ) Miscellaneous If a plugin adds paths to watch in LiveReloadServer , it can now unwatch them. ( #2777 ) Bugfix (regression in 1.2): Support listening on an IPv6 address in mkdocs serve . ( #2951 ) Other small improvements; see commit log . Version 1.3.1 (2022-07-19) Pin Python-Markdown version to <3.4, thus excluding its latest release that breaks too many external extensions ( #2893 ) When a Markdown extension fails to load, print its name and traceback ( #2894 ) Bugfix for "readthedocs" theme (regression in 1.3.0): add missing space in breadcrumbs ( #2810 ) Bugfix: don't complain when a file "readme.md" (lowercase) exists, it's not recognized otherwise ( #2852 ) Built-in themes now also support these languages: Italian ( #2860 ) Other small improvements; see commit log . Version 1.3.0 (2022-03-26) Feature upgrades ReadTheDocs theme updated from v0.4.1 to v1.0.0 according to upstream ( #2585 ) The most notable changes: New option logo : Rather than displaying the site_name in the title, one can specify a path to an image to display instead. New option anonymize_ip for Google Analytics. Dependencies were upgraded: jQuery upgraded to 3.6.0, Modernizr.js dropped, and others. See documentation of config options for the theme Built-in themes now also support these languages: German ( #2633 ) Persian (Farsi) ( #2787 ) Support custom directories to watch when running mkdocs serve ( #2642 ) MkDocs by default watches the docs directory and the config file. Now there is a way to add more directories to watch for changes, either via the YAML watch key or the command line flag --watch . Normally MkDocs never reaches into any other directories (so this feature shouldn't be necessary), but some plugins and extensions may do so. See documentation . New --no-history option for gh_deploy ( #2594 ) Allows to discard the history of commits when deploying, and instead replace it with one root commit Bug fixes An XSS vulnerability when using the search function in built-in themes was fixed ( #2791 ) Setting the edit_uri option no longer erroneously adds a trailing slash to repo_url ( #2733 ) Miscellaneous Breaking change: the pages config option that was deprecated for a very long time now causes an error when used ( #2652 ) To fix the error, just change from pages to nav . Performance optimization: during startup of MkDocs, code and dependencies of other commands will not be imported ( #2714 ) The most visible effect of this is that dependencies of mkdocs serve will not be imported when mkdocs build is used. Recursively validate nav ( #2680 ) Validation of the nested nav structure has been reworked to report errors early and reliably. Some edge cases have been declared invalid. Other small improvements; see commit log . Version 1.2.4 (2022-03-26) Compatibility with Jinja2 3.1.0 ( #2800 ) Due to a breaking change in Jinja2, MkDocs would crash with the message AttributeError: module 'jinja2' has no attribute 'contextfilter' Version 1.2.3 (2021-10-12) Built-in themes now also support these languages: Simplified Chinese ( #2497 ) Japanese ( #2525 ) Brazilian Portuguese ( #2535 ) Spanish ( #2545 , previously #2396 ) Third-party plugins will take precedence over built-in plugins with the same name ( #2591 ) Bugfix: Fix ability to load translations for some languages: core support ( #2565 ) and search plugin support with fallbacks ( #2602 ) Bugfix (regression in 1.2): Prevent directory traversal in the dev server ( #2604 ) Bugfix (regression in 1.2): Prevent webserver warnings from being treated as a build failure in strict mode ( #2607 ) Bugfix: Correctly print colorful messages in the terminal on Windows ( #2606 ) Bugfix: Python version 3.10 was displayed incorrectly in --version ( #2618 ) Other small improvements; see commit log . Version 1.2.2 (2021-07-18) Bugfix (regression in 1.2): Fix serving files/paths with Unicode characters ( #2464 ) Bugfix (regression in 1.2): Revert livereload file watching to use polling observer ( #2477 ) This had to be done to reasonably support usages that span virtual filesystems such as non-native Docker and network mounts. This goes back to the polling approach, very similar to that was always used prior, meaning most of the same downsides with latency and CPU usage. Revert from 1.2: Remove the requirement of a site_url config and the restriction on use_directory_urls ( #2490 ) Bugfix (regression in 1.2): Don't require trailing slash in the URL when serving a directory index in mkdocs serve server ( #2507 ) Instead of showing a 404 error, detect if it's a directory and redirect to a path with a trailing slash added, like before. Bugfix: Fix gh_deploy with config-file in the current directory ( #2481 ) Bugfix: Fix reversed breadcrumbs in "readthedocs" theme ( #2179 ) Allow "mkdocs.yaml" as the file name when '--config' is not passed ( #2478 ) Stop treating ";" as a special character in URLs: urlparse -> urlsplit ( #2502 ) Improve build performance for sites with many pages (partly already done in 1.2) ( #2407 ) Version 1.2.1 (2021-06-09) Bugfix (regression in 1.2): Ensure 'gh-deploy' always pushes. Version 1.2 (2021-06-04) Major Additions to Version 1.2 Support added for Theme Localization ( #2299 ) The mkdocs and readthedocs themes now support language localization using the theme.locale parameter, which defaults to en (English). The only other supported languages in this release are fr (French) and es (Spanish). For details on using the provided translations, see the user guide . Note that translation will not happen by default. Users must first install the necessary dependencies with the following command: pip install 'mkdocs[i18n]' Translation contributions are welcome and detailed in the Translation Guide . Developers of third party themes may want to review the relevant section of the Theme Development Guide . Contributors who are updating the templates to the built-in themes should review the Contributing Guide . The lang setting of the search plugin now defaults to the language specified in theme.locale . Support added for Environment Variables in the configuration file ( #1954 ) Environments variables may now be specified in the configuration file with the !ENV tag. The value of the variable will be parsed by the YAML parser and converted to the appropriate type. somekey: !ENV VAR_NAME otherkey: !ENV [VAR_NAME, FALLBACK_VAR, 'default value'] See Environment Variables in the Configuration documentation for details. Support added for Configuration Inheritance ( #2218 ) A configuration file may now inherit from a parent configuration file. In the primary file set the INHERIT key to the relative path of the parent file. INHERIT: path/to/base.yml The two files will then be deep merged. See Configuration Inheritance for details. Update gh-deploy command ( #2170 ) The vendored (and modified) copy of ghp_import has been replaced with a dependency on the upstream library. As of version 1.0.0, ghp-import includes a Python API which makes it possible to call directly. MkDocs can now benefit from recent bug fixes and new features, including the following: A .nojekyll file is automatically included when deploying to GitHub Pages. The --shell flag is now available, which reportedly works better on Windows. Git author and committer environment variables should be respected ( #1383 ). Rework auto-reload and HTTP server for mkdocs serve ( #2385 ) mkdocs serve now uses a new underlying server + file | 2026-01-13T09:29:14 |
https://www.linkedin.com/legal/privacy-policy?session_redirect=https%3A%2F%2Fwww%2Elinkedin%2Ecom%2FshareArticle%3Fmini%3Dtrue%26amp%3Burl%3Dhttps%3A%2F%2Fwww%2Eanthropic%2Ecom%2Fnews%2Fdeveloping-computer-use&trk=registration-frontend_join-form-privacy-policy | LinkedIn Privacy Policy Skip to main content User Agreement Summary of User Agreement Privacy Policy Professional Community Policies Cookie Policy Copyright Policy Regional Info EU Notice California Privacy Disclosure U.S. State Privacy Laws User Agreement Summary of User Agreement Privacy Policy Professional Community Policies Cookie Policy Copyright Policy Regional Info EU Notice California Privacy Disclosure U.S. State Privacy Laws Privacy Policy Effective November 3, 2025 Your Privacy Matters LinkedIn’s mission is to connect the world’s professionals to allow them to be more productive and successful. Central to this mission is our commitment to be transparent about the data we collect about you, how it is used and with whom it is shared. This Privacy Policy applies when you use our Services (described below). We offer our users choices about the data we collect, use and share as described in this Privacy Policy, Cookie Policy , Settings and our Help Center. Key Terms Choices Settings are available to Members of LinkedIn and Visitors are provided separate controls. Learn More . Table of Contents Data We Collect How We Use Your Data How We Share Information Your Choices and Obligations Other Important Information Introduction We are a social network and online platform for professionals. People use our Services to find and be found for business opportunities, to connect with others and find information. Our Privacy Policy applies to any Member or Visitor to our Services. Our registered users (“Members”) share their professional identities, engage with their network, exchange knowledge and professional insights, post and view relevant content, learn and develop skills, and find business and career opportunities. Content and data on some of our Services is viewable to non-Members (“Visitors”). We use the term “Designated Countries” to refer to countries in the European Union (EU), European Economic Area (EEA), and Switzerland. Members and Visitors located in the Designated Countries or the UK can review additional information in our European Regional Privacy Notice . Services This Privacy Policy, including our Cookie Policy applies to your use of our Services. This Privacy Policy applies to LinkedIn.com, LinkedIn-branded apps, and other LinkedIn-branded sites, apps, communications and services offered by LinkedIn (“Services”), including off-site Services, such as our ad services and the “Apply with LinkedIn” and “Share with LinkedIn” plugins, but excluding services that state that they are offered under a different privacy policy. For California residents, additional disclosures required by California law may be found in our California Privacy Disclosure . Data Controllers and Contracting Parties If you are in the “Designated Countries”, LinkedIn Ireland Unlimited Company (“LinkedIn Ireland”) will be the controller of your personal data provided to, or collected by or for, or processed in connection with our Services. If you are outside of the Designated Countries, LinkedIn Corporation will be the controller of (or business responsible for) your personal data provided to, or collected by or for, or processed in connection with our Services. As a Visitor or Member of our Services, the collection, use and sharing of your personal data is subject to this Privacy Policy and other documents referenced in this Privacy Policy, as well as updates. Change Changes to the Privacy Policy apply to your use of our Services after the “effective date.” LinkedIn (“we” or “us”) can modify this Privacy Policy, and if we make material changes to it, we will provide notice through our Services, or by other means, to provide you the opportunity to review the changes before they become effective. If you object to any changes, you may close your account. You acknowledge that your continued use of our Services after we publish or send a notice about our changes to this Privacy Policy means that the collection, use and sharing of your personal data is subject to the updated Privacy Policy, as of its effective date. 1. Data We Collect 1.1 Data You Provide To Us You provide data to create an account with us. Registration To create an account you need to provide data including your name, email address and/or mobile number, general location (e.g., city), and a password. If you register for a premium Service, you will need to provide payment (e.g., credit card) and billing information. You create your LinkedIn profile (a complete profile helps you get the most from our Services). Profile You have choices about the information on your profile, such as your education, work experience, skills, photo, city or area , endorsements, and optional verifications of information on your profile (such as verifications of your identity or workplace). You don’t have to provide additional information on your profile; however, profile information helps you to get more from our Services, including helping recruiters and business opportunities find you. It’s your choice whether to include sensitive information on your profile and to make that sensitive information public. Please do not post or add personal data to your profile that you would not want to be publicly available. You may give other data to us, such as by syncing your calendar. Posting and Uploading We collect personal data from you when you provide, post or upload it to our Services, such as when you fill out a form, (e.g., with demographic data or salary), respond to a survey, or submit a resume or fill out a job application on our Services. If you sync your calendars with our Services, we will collect your calendar meeting information to keep growing your network by suggesting connections for you and others, and by providing information about events, e.g. times, places, attendees and contacts. You don’t have to post or upload personal data; though if you don’t, it may limit your ability to grow and engage with your network over our Services. 1.2 Data From Others Others may post or write about you. Content and News You and others may post content that includes information about you (as part of articles, posts, comments, videos) on our Services. We also may collect public information about you, such as professional-related news and accomplishments, and make it available as part of our Services, including, as permitted by your settings, in notifications to others of mentions in the news . Others may sync their calendar with our Services Contact and Calendar Information We receive personal data (including contact information) about you when others import or sync their calendar with our Services, associate their contacts with Member profiles, scan and upload business cards, or send messages using our Services (including invites or connection requests). If you or others opt-in to sync email accounts with our Services, we will also collect “email header” information that we can associate with Member profiles. Customers and partners may provide data to us. Partners We receive personal data (e.g., your job title and work email address) about you when you use the services of our customers and partners, such as employers or prospective employers and applicant tracking systems providing us job application data. Related Companies and Other Services We receive data about you when you use some of the other services provided by us or our Affiliates , including Microsoft. For example, you may choose to send us information about your contacts in Microsoft apps and services, such as Outlook, for improved professional networking activities on our Services or we may receive information from Microsoft about your engagement with their sites and services. 1.3 Service Use We log your visits and use of our Services, including mobile apps. We log usage data when you visit or otherwise use our Services, including our sites, app and platform technology, such as when you view or click on content (e.g., learning video) or ads (on or off our sites and apps), perform a search, install or update one of our mobile apps, share articles or apply for jobs. We use log-ins, cookies, device information and internet protocol (“IP”) addresses to identify you and log your use. 1.4 Cookies and Similar Technologies We collect data through cookies and similar technologies. As further described in our Cookie Policy , we use cookies and similar technologies (e.g., pixels and ad tags) to collect data (e.g., device IDs) to recognize you and your device(s) on, off and across different services and devices where you have engaged with our Services. We also allow some others to use cookies as described in our Cookie Policy. If you are outside the Designated Countries, we also collect (or rely on others, including Microsoft, who collect) information about your device where you have not engaged with our Services (e.g., ad ID, IP address, operating system and browser information) so we can provide our Members with relevant ads and better understand their effectiveness. Learn more . You can opt out from our use of data from cookies and similar technologies that track your behavior on the sites of others for ad targeting and other ad-related purposes. For Visitors, the controls are here . 1.5 Your Device and Location We receive data through cookies and similar technologies When you visit or leave our Services (including some plugins and our cookies or similar technology on the sites of others), we receive the URL of both the site you came from and the one you go to and the time of your visit. We also get information about your network and device (e.g., IP address, proxy server, operating system, web browser and add-ons, device identifier and features, cookie IDs and/or ISP, or your mobile carrier). If you use our Services from a mobile device, that device will send us data about your location based on your phone settings. We will ask you to opt-in before we use GPS or other tools to identify your precise location. 1.6 Communications If you communicate through our Services, we learn about that. We collect information about you when you communicate with others through our Services (e.g., when you send, receive, or engage with messages, events, or connection requests, including our marketing communications). This may include information that indicates who you are communicating with and when. We also use automated systems to support and protect our site. For example, we use such systems to suggest possible responses to messages and to manage or block content that violates our User Agreement or Professional Community Policies . 1.7 Workplace and School Provided Information When your organization (e.g., employer or school) buys a premium Service for you to use, they give us data about you. Others buying our Services for your use, such as your employer or your school, provide us with personal data about you and your eligibility to use the Services that they purchase for use by their workers, students or alumni. For example, we will get contact information for “ LinkedIn Page ” (formerly Company Page) administrators and for authorizing users of our premium Services, such as our recruiting, sales or learning products. 1.8 Sites and Services of Others We get data when you visit sites that include our ads, cookies or plugins or when you log-in to others’ services with your LinkedIn account. We receive information about your visits and interaction with services provided by others when you log-in with LinkedIn or visit others’ services that include some of our plugins (such as “Apply with LinkedIn”) or our ads, cookies or similar technologies. 1.9 Other We are improving our Services, which means we get new data and create new ways to use data. Our Services are dynamic, and we often introduce new features, which may require the collection of new information. If we collect materially different personal data or materially change how we collect, use or share your data, we will notify you and may also modify this Privacy Policy. Key Terms Affiliates Affiliates are companies controlling, controlled by or under common control with us, including, for example, LinkedIn Ireland, LinkedIn Corporation, LinkedIn Singapore and Microsoft Corporation or any of its subsidiaries (e.g., GitHub, Inc.). 2. How We Use Your Data We use your data to provide, support, personalize and develop our Services. How we use your personal data will depend on which Services you use, how you use those Services and the choices you make in your settings . We may use your personal data to improve, develop, and provide products and Services, develop and train artificial intelligence (AI) models, develop, provide, and personalize our Services, and gain insights with the help of AI, automated systems, and inferences, so that our Services can be more relevant and useful to you and others. You can review LinkedIn's Responsible AI principles here and learn more about our approach to generative AI here . Learn more about the inferences we may make, including as to your age and gender and how we use them. 2.1 Services Our Services help you connect with others, find and be found for work and business opportunities, stay informed, get training and be more productive. We use your data to authorize access to our Services and honor your settings. Stay Connected Our Services allow you to stay in touch and up to date with colleagues, partners, clients, and other professional contacts. To do so, you can “connect” with the professionals who you choose, and who also wish to “connect” with you. Subject to your and their settings , when you connect with other Members, you will be able to search each others’ connections in order to exchange professional opportunities. We use data about you (such as your profile, profiles you have viewed or data provided through address book uploads or partner integrations) to help others find your profile, suggest connections for you and others (e.g. Members who share your contacts or job experiences) and enable you to invite others to become a Member and connect with you. You can also opt-in to allow us to use your precise location or proximity to others for certain tasks (e.g. to suggest other nearby Members for you to connect with, calculate the commute to a new job, or notify your connections that you are at a professional event). It is your choice whether to invite someone to our Services, send a connection request, or allow another Member to become your connection. When you invite someone to connect with you, your invitation will include your network and basic profile information (e.g., name, profile photo, job title, region). We will send invitation reminders to the person you invited. You can choose whether or not to share your own list of connections with your connections. Visitors have choices about how we use their data. Stay Informed Our Services allow you to stay informed about news, events and ideas regarding professional topics you care about, and from professionals you respect. Our Services also allow you to improve your professional skills, or learn new ones. We use the data we have about you (e.g., data you provide, data we collect from your engagement with our Services and inferences we make from the data we have about you), to personalize our Services for you, such as by recommending or ranking relevant content and conversations on our Services. We also use the data we have about you to suggest skills you could add to your profile and skills that you might need to pursue your next opportunity. So, if you let us know that you are interested in a new skill (e.g., by watching a learning video), we will use this information to personalize content in your feed, suggest that you follow certain Members on our site, or suggest related learning content to help you towards that new skill. We use your content, activity and other data, including your name and photo, to provide notices to your network and others. For example, subject to your settings , we may notify others that you have updated your profile, posted content, took a social action , used a feature, made new connections or were mentioned in the news . Career Our Services allow you to explore careers, evaluate educational opportunities, and seek out, and be found for, career opportunities. Your profile can be found by those looking to hire (for a job or a specific task ) or be hired by you. We will use your data to recommend jobs and show you and others relevant professional contacts (e.g., who work at a company, in an industry, function or location or have certain skills and connections). You can signal that you are interested in changing jobs and share information with recruiters. We will use your data to recommend jobs to you and you to recruiters. We may use automated systems to provide content and recommendations to help make our Services more relevant to our Members, Visitors and customers. Keeping your profile accurate and up-to-date may help you better connect to others and to opportunities through our Services. Productivity Our Services allow you to collaborate with colleagues, search for potential clients, customers, partners and others to do business with. Our Services allow you to communicate with other Members and schedule and prepare meetings with them. If your settings allow, we scan messages to provide “bots” or similar tools that facilitate tasks such as scheduling meetings, drafting responses, summarizing messages or recommending next steps. Learn more . 2.2 Premium Services Our premium Services help paying users to search for and contact Members through our Services, such as searching for and contacting job candidates, sales leads and co-workers, manage talent and promote content. We sell premium Services that provide our customers and subscribers with customized-search functionality and tools (including messaging and activity alerts) as part of our talent, marketing and sales solutions. Customers can export limited information from your profile, such as name, headline, current company, current title, and general location (e.g., Dublin), such as to manage sales leads or talent, unless you opt-out . We do not provide contact information to customers as part of these premium Services without your consent. Premium Services customers can store information they have about you in our premium Services, such as a resume or contact information or sales history. The data stored about you by these customers is subject to the policies of those customers. Other enterprise Services and features that use your data include TeamLink and LinkedIn Pages (e.g., content analytics and followers). 2.3 Communications We contact you and enable communications between Members. We offer settings to control what messages you receive and how often you receive some types of messages. We will contact you through email, mobile phone, notices posted on our websites or apps, messages to your LinkedIn inbox, and other ways through our Services, including text messages and push notifications. We will send you messages about the availability of our Services, security, or other service-related issues. We also send messages about how to use our Services, network updates, reminders, job suggestions and promotional messages from us and our partners. You may change your communication preferences at any time. Please be aware that you cannot opt out of receiving service messages from us, including security and legal notices. We also enable communications between you and others through our Services, including for example invitations , InMail , groups and messages between connections. 2.4 Advertising We serve you tailored ads both on and off our Services. We offer you choices regarding personalized ads, but you cannot opt-out of seeing non-personalized ads. We target (and measure the performance of) ads to Members, Visitors and others both on and off our Services directly or through a variety of partners, using the following data, whether separately or combined: Data collected by advertising technologies on and off our Services using pixels, ad tags (e.g., when an advertiser installs a LinkedIn tag on their website), cookies, and other device identifiers; Member-provided information (e.g., profile, contact information, title and industry); Data from your use of our Services (e.g., search history, feed, content you read, who you follow or is following you, connections, groups participation, page visits, videos you watch, clicking on an ad, etc.), including as described in Section 1.3; Information from advertising partners , vendors and publishers ; and Information inferred from data described above (e.g., using job titles from a profile to infer industry, seniority, and compensation bracket; using graduation dates to infer age or using first names or pronoun usage to infer gender; using your feed activity to infer your interests; or using device data to recognize you as a Member). Learn more about the inferences we make and how they may be used for advertising. Learn more about the ad technologies we use and our advertising services and partners. You can learn more about our compliance with laws in the Designated Countries or the UK in our European Regional Privacy Notice . We will show you ads called sponsored content which look similar to non-sponsored content, except that they are labeled as advertising (e.g., as “ad” or “sponsored”). If you take a social action (such as like, comment or share) on these ads, your action is associated with your name and viewable by others, including the advertiser. Subject to your settings , if you take a social action on the LinkedIn Services, that action may be mentioned with related ads. For example, when you like a company we may include your name and photo when their sponsored content is shown. Ad Choices You have choices regarding our uses of certain categories of data to show you more relevant ads. Member settings can be found here . For Visitors, the setting is here . Info to Ad Providers We do not share your personal data with any non-Affiliated third-party advertisers or ad networks except for: (i) hashed IDs or device identifiers (to the extent they are personal data in some countries); (ii) with your separate permission (e.g., in a lead generation form) or (iii) data already visible to any users of the Services (e.g., profile). However, if you view or click on an ad on or off our Services, the ad provider will get a signal that someone visited the page that displayed the ad, and they may, through the use of mechanisms such as cookies, determine it is you. Advertising partners can associate personal data collected by the advertiser directly from you with hashed IDs or device identifiers received from us. We seek to contractually require such advertising partners to obtain your explicit, opt-in consent before doing so where legally required, and in such instances, we take steps to ensure that consent has been provided before processing data from them. 2.5 Marketing We promote our Services to you and others. In addition to advertising our Services, we use Members’ data and content for invitations and communications promoting membership and network growth, engagement and our Services, such as by showing your connections that you have used a feature on our Services. 2.6 Developing Services and Research We develop our Services and conduct research Service Development We use data, including public feedback, to conduct research and development for our Services in order to provide you and others with a better, more intuitive and personalized experience, drive membership growth and engagement on our Services, and help connect professionals to each other and to economic opportunity. Other Research We seek to create economic opportunity for Members of the global workforce and to help them be more productive and successful. We use the personal data available to us to research social, economic and workplace trends, such as jobs availability and skills needed for these jobs and policies that help bridge the gap in various industries and geographic areas. In some cases, we work with trusted third parties to perform this research, under controls that are designed to protect your privacy. We may also make public data available to researchers to enable assessment of the safety and legal compliance of our Services. We publish or allow others to publish economic insights, presented as aggregated data rather than personal data. Surveys Polls and surveys are conducted by us and others through our Services. You are not obligated to respond to polls or surveys, and you have choices about the information you provide. You may opt-out of survey invitations. 2.7 Customer Support We use data to help you and fix problems. We use data (which can include your communications) to investigate, respond to and resolve complaints and for Service issues (e.g., bugs). 2.8 Insights That Do Not Identify You We use data to generate insights that do not identify you. We use your data to perform analytics to produce and share insights that do not identify you. For example, we may use your data to generate statistics about our Members, their profession or industry, to calculate ad impressions served or clicked on (e.g., for basic business reporting to support billing and budget management or, subject to your settings , for reports to advertisers who may use them to inform their advertising campaigns), to show Members' information about engagement with a post or LinkedIn Page , to publish visitor demographics for a Service or create demographic workforce insights, or to understand usage of our services. 2.9 Security and Investigations We use data for security, fraud prevention and investigations. We and our Affiliates, including Microsoft, may use your data (including your communications) for security purposes or to prevent or investigate possible fraud or other violations of the law, our User Agreement and/or attempts to harm our Members, Visitors, company, Affiliates, or others. Key Terms Social Action E.g. like, comment, follow, share Partners Partners include ad networks, exchanges and others 3. How We Share Information 3.1 Our Services Any data that you include on your profile and any content you post or social action (e.g., likes, follows, comments, shares) you take on our Services will be seen by others, consistent with your settings. Profile Your profile is fully visible to all Members and customers of our Services. Subject to your settings , it can also be visible to others on or off of our Services (e.g., Visitors to our Services or users of third-party search tools). As detailed in our Help Center , your settings, degree of connection with the viewing Member, the subscriptions they may have, their usage of our Services , access channels and search types (e.g., by name or by keyword) impact the availability of your profile and whether they can view certain fields in your profile. Posts, Likes, Follows, Comments, Messages Our Services allow viewing and sharing information including through posts, likes, follows and comments. When you share an article or a post (e.g., an update, image, video or article) publicly it can be viewed by everyone and re-shared anywhere (subject to your settings ). Members, Visitors and others will be able to find and see your publicly-shared content, including your name (and photo if you have provided one). In a group , posts are visible to others according to group type. For example, posts in private groups are visible to others in the group and posts in public groups are visible publicly. Your membership in groups is public and part of your profile, but you can change visibility in your settings . Any information you share through companies’ or other organizations’ pages on our Services will be viewable by those organizations and others who view those pages' content. When you follow a person or organization, you are visible to others and that “page owner” as a follower. We let senders know when you act on their message, subject to your settings where applicable. Subject to your settings , we let a Member know when you view their profile. We also give you choices about letting organizations know when you've viewed their Page. When you like or re-share or comment on another’s content (including ads), others will be able to view these “social actions” and associate it with you (e.g., your name, profile and photo if you provided it). Your employer can see how you use Services they provided for your work (e.g. as a recruiter or sales agent) and related information. We will not show them your job searches or personal messages. Enterprise Accounts Your employer may offer you access to our enterprise Services such as Recruiter, Sales Navigator, LinkedIn Learning or our advertising Campaign Manager. Your employer can review and manage your use of such enterprise Services. Depending on the enterprise Service, before you use such Service, we will ask for permission to share with your employer relevant data from your profile or use of our non-enterprise Services. For example, users of Sales Navigator will be asked to share their “social selling index”, a score calculated in part based on their personal account activity. We understand that certain activities such as job hunting and personal messages are sensitive, and so we do not share those with your employer unless you choose to share it with them through our Services (for example, by applying for a new position in the same company or mentioning your job hunting in a message to a co-worker through our Services). Subject to your settings , when you use workplace tools and services (e.g., interactive employee directory tools) certain of your data may also be made available to your employer or be connected with information we receive from your employer to enable these tools and services. 3.2 Communication Archival Regulated Members may need to store communications outside of our Service. Some Members (or their employers) need, for legal or professional compliance, to archive their communications and social media activity, and will use services of others to provide these archival services. We enable archiving of messages by and to those Members outside of our Services. For example, a financial advisor needs to archive communications with her clients through our Services in order to maintain her professional financial advisor license. 3.3 Others’ Services You may link your account with others’ services so that they can look up your contacts’ profiles, post your shares on such platforms, or enable you to start conversations with your connections on such platforms. Excerpts from your profile will also appear on the services of others. Subject to your settings , other services may look up your profile. When you opt to link your account with other services, personal data (e.g., your name, title, and company) will become available to them. The sharing and use of that personal data will be described in, or linked to, a consent screen when you opt to link the accounts. For example, you may link your Twitter or WeChat account to share content from our Services into these other services, or your email provider may give you the option to upload your LinkedIn contacts into its own service. Third-party services have their own privacy policies, and you may be giving them permission to use your data in ways we would not. You may revoke the link with such accounts. The information you make available to others in our Services (e.g., information from your profile, your posts, your engagement with the posts, or message to Pages) may be available to them on other services . For example, search tools, mail and calendar applications, or talent and lead managers may show a user limited profile data (subject to your settings ), and social media management tools or other platforms may display your posts. The information retained on these services may not reflect updates you make on LinkedIn. 3.4 Related Services We share your data across our different Services and LinkedIn affiliated entities. We will share your personal data with our Affiliates to provide and develop our Services. For example, we may refer a query to Bing in some instances, such as where you'd benefit from a more up to date response in a chat experience. Subject to our European Regional Privacy Notice , we may also share with our Affiliates, including Microsoft, your (1) publicly-shared content (such as your public LinkedIn posts) to provide or develop their services and (2) personal data to improve, provide or develop their advertising services. Where allowed , we may combine information internally across the different Services covered by this Privacy Policy to help our Services be more relevant and useful to you and others. For example, we may personalize your feed or job recommendations based on your learning history. 3.5 Service Providers We may use others to help us with our Services. We use others to help us provide our Services (e.g., maintenance, analysis, audit, payments, fraud detection, customer support, marketing and development). They will have access to your information (e.g., the contents of a customer support request) as reasonably necessary to perform these tasks on our behalf and are obligated not to disclose or use it for other purposes. If you purchase a Service from us, we may use a payments service provider who may separately collect information about you (e.g., for fraud prevention or to comply with legal obligations). 3.6 Legal Disclosures We may need to share your data when we believe it’s required by law or to help protect the rights and safety of you, us or others. It is possible that we will need to disclose information about you when required by law, subpoena, or other legal process or if we have a good faith belief that disclosure is reasonably necessary to (1) investigate, prevent or take action regarding suspected or actual illegal activities or to assist government enforcement agencies; (2) enforce our agreements with you; (3) investigate and defend ourselves against any third-party claims or allegations; (4) protect the security or integrity of our Services or the products or services of our Affiliates (such as by sharing with companies facing similar threats); or (5) exercise or protect the rights and safety of LinkedIn, our Members, personnel or others. We attempt to notify Members about legal demands for their personal data when appropriate in our judgment, unless prohibited by law or court order or when the request is an emergency. We may dispute such demands when we believe, in our discretion, that the requests are overbroad, vague or lack proper authority, but we do not promise to challenge every demand. To learn more see our Data Request Guidelines and Transparency Report . 3.7 Change in Control or Sale We may share your data when our business is sold to others, but it must continue to be used in accordance with this Privacy Policy. We can also share your personal data as part of a sale, merger or change in control, or in preparation for any of these events. Any other entity which buys us or part of our business will have the right to continue to use your data, but only in the manner set out in this Privacy Policy unless you agree otherwise. 4. Your Choices & Obligations 4.1 Data Retention We keep most of your personal data for as long as your account is open. We generally retain your personal data as long as you keep your account open or as needed to provide you Services. This includes data you or others provided to us and data generated or inferred from your use of our Services. Even if you only use our Services when looking for a new job every few years, we will retain your information and keep your profile open, unless you close your account. In some cases we choose to retain certain information (e.g., insights about Services use) in a depersonalized or aggregated form. 4.2 Rights to Access and Control Your Personal Data You can access or delete your personal data. You have many choices about how your data is collected, used and shared. We provide many choices about the collection, use and sharing of your data, from deleting or correcting data you include in your profile and controlling the visibility of your posts to advertising opt-outs and communication controls. We offer you settings to control and manage the personal data we have about you. For personal data that we have about you, you can: Delete Data : You can ask us to erase or delete all or some of your personal data (e.g., if it is no longer necessary to provide Services to you). Change or Correct Data : You can edit some of your personal data through your account. You can also ask us to change, update or fix your data in certain cases, particularly if it’s inaccurate. Object to, or Limit or Restrict, Use of Data : You can ask us to stop using all or some of your personal data (e.g., if we have no legal right to keep using it) or to limit our use of it (e.g., if your personal data is inaccurate or unlawfully held). Right to Access and/or Take Your Data : You can ask us for a copy of your personal data and can ask for a copy of personal data you provided in machine readable form. Visitors can learn more about how to make these requests here . You may also contact us using the contact information below, and we will consider your request in accordance with applicable laws. Residents in the Designated Countries and the UK , and other regions , may have additional rights under their laws. 4.3 Account Closure We keep some of your data even after you close your account. If you choose to close your LinkedIn account, your personal data will generally stop being visible to others on our Services within 24 hours. We generally delete closed account information within 30 days of account closure, except as noted below. We retain your personal data even after you have closed your account if reasonably necessary to comply with our legal obligations (including law enforcement requests), meet regulatory requirements, resolve disputes, maintain security, prevent fraud and abuse (e.g., if we have restricted your account for breach of our Professional Community Policies ), enforce our User Agreement, or fulfill your request to "unsubscribe" from further messages from us. We will retain de-personalized information after your account has been closed. Information you have shared with others (e.g., through InMail, updates or group posts) will remain visible after you close your account or delete the information from your own profile or mailbox, and we do not control data that other Members have copied out of our Services. Groups content and ratings or review content associated with closed accounts will show an unknown user as the source. Your profile may continue to be displayed in the services of others (e.g., search tools) until they refresh their cache. 5. Other Important Information 5.1. Security We monitor for and try to prevent security breaches. Please use the security features available through our Services. We implement security safeguards designed to protect your data, such as HTTPS. We regularly monitor our systems for possible vulnerabilities and attacks. However, we cannot warrant the security of any information that you send us. There is no guarantee that data may not be accessed, disclosed, altered, or destroyed by breach of any of our physical, technical, or managerial safeguards. 5.2. Cross-Border Data Transfers We store and use your data outside your country. We process data both inside and outside of the United States and rely on legally-provided mechanisms to lawfully transfer data across borders. Learn more . Countries where we process data may have laws which are different from, and potentially not as protective as, the laws of your own country. 5.3 Lawful Bases for Processing We have lawful bases to collect, use and share data about you. You have choices about our use of your data. At any time, you can withdraw consent you have provided by going to settings. We will only collect and process personal data about you where we have lawful bases. Lawful bases include consent (where you have given consent), contract (where processing is necessary for the performance of a contract with you (e.g., to deliver the LinkedIn Services you have requested) and “legitimate interests.” Learn more . Where we rely on your consent to process personal data, you have the right to withdraw or decline your consent at any time and where we rely on legitimate interests, you have the right to object. Learn More . If you have any questions about the lawful bases upon which we collect and use your personal data, please contact our Data Protection Officer here . If you're located in one of the Designated Countries or the UK, you can learn more about our lawful bases for processing in our European Regional Privacy Notice . 5.4. Direct Marketing and Do Not Track Signals Our statements regarding direct marketing and “do not track” signals. We currently do not share personal data with third parties for their direct marketing purposes without your permission. Learn more about this and about our response to “do not track” signals. 5.5. Contact Information You can contact us or use other options to resolve any complaints. If you have questions or complaints regarding this Policy, please first contact LinkedIn online. You can also reach us by physical mail . If contacting us does not resolve your complaint, you have more options . Residents in the Designated Countries and other regions may also have the right to contact our Data Protection Officer here . If this does not resolve your complaint, Residents in the Designated Countries and other regions may have more options under their laws. Key Terms Consent Where we process data based on consent, we will ask for your explicit consent. You may withdraw your consent at any time, but that will not affect the lawfulness of the processing of your personal data prior to such withdrawal. Where we rely on contract, we will ask that you agree to the processing of personal data that is necessary for entering into or performance of your contract with us. We will rely on legitimate interests as a basis for data processing where the processing of your data is not overridden by your interests or fundamental rights and freedoms. LinkedIn © 2026 About Accessibility User Agreement Privacy Policy Cookie Policy Copyright Policy Brand Policy Guest Controls Community Guidelines العربية (Arabic) বাংলা (Bangla) Čeština (Czech) Dansk (Danish) Deutsch (German) Ελληνικά (Greek) English (English) Español (Spanish) فارسی (Persian) Suomi (Finnish) Français (French) हिंदी (Hindi) Magyar (Hungarian) Bahasa Indonesia (Indonesian) Italiano (Italian) עברית (Hebrew) 日本語 (Japanese) 한국어 (Korean) मराठी (Marathi) Bahasa Malaysia (Malay) Nederlands (Dutch) Norsk (Norwegian) ਪੰਜਾਬੀ (Punjabi) Polski (Polish) Português (Portuguese) Română (Romanian) Русский (Russian) Svenska (Swedish) తెలుగు (Telugu) ภาษาไทย (Thai) Tagalog (Tagalog) Türkçe (Turkish) Українська (Ukrainian) Tiếng Việt (Vietnamese) 简体中文 (Chinese (Simplified)) 正體中文 (Chinese (Traditional)) Language | 2026-01-13T09:29:14 |
https://doc.rust-lang.org/book/ch01-01-installation.html | Installation - The Rust Programming Language Keyboard shortcuts Press ← or → to navigate between chapters Press S or / to search in the book Press ? to show this help Press Esc to hide this help Auto Light Rust Coal Navy Ayu The Rust Programming Language Installation The first step is to install Rust. We’ll download Rust through rustup , a command line tool for managing Rust versions and associated tools. You’ll need an internet connection for the download. Note: If you prefer not to use rustup for some reason, please see the Other Rust Installation Methods page for more options. The following steps install the latest stable version of the Rust compiler. Rust’s stability guarantees ensure that all the examples in the book that compile will continue to compile with newer Rust versions. The output might differ slightly between versions because Rust often improves error messages and warnings. In other words, any newer, stable version of Rust you install using these steps should work as expected with the content of this book. Command Line Notation In this chapter and throughout the book, we’ll show some commands used in the terminal. Lines that you should enter in a terminal all start with $ . You don’t need to type the $ character; it’s the command line prompt shown to indicate the start of each command. Lines that don’t start with $ typically show the output of the previous command. Additionally, PowerShell-specific examples will use > rather than $ . Installing rustup on Linux or macOS If you’re using Linux or macOS, open a terminal and enter the following command: $ curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh The command downloads a script and starts the installation of the rustup tool, which installs the latest stable version of Rust. You might be prompted for your password. If the install is successful, the following line will appear: Rust is installed now. Great! You will also need a linker , which is a program that Rust uses to join its compiled outputs into one file. It is likely you already have one. If you get linker errors, you should install a C compiler, which will typically include a linker. A C compiler is also useful because some common Rust packages depend on C code and will need a C compiler. On macOS, you can get a C compiler by running: $ xcode-select --install Linux users should generally install GCC or Clang, according to their distribution’s documentation. For example, if you use Ubuntu, you can install the build-essential package. Installing rustup on Windows On Windows, go to https://www.rust-lang.org/tools/install and follow the instructions for installing Rust. At some point in the installation, you’ll be prompted to install Visual Studio. This provides a linker and the native libraries needed to compile programs. If you need more help with this step, see https://rust-lang.github.io/rustup/installation/windows-msvc.html . The rest of this book uses commands that work in both cmd.exe and PowerShell. If there are specific differences, we’ll explain which to use. Troubleshooting To check whether you have Rust installed correctly, open a shell and enter this line: $ rustc --version You should see the version number, commit hash, and commit date for the latest stable version that has been released, in the following format: rustc x.y.z (abcabcabc yyyy-mm-dd) If you see this information, you have installed Rust successfully! If you don’t see this information, check that Rust is in your %PATH% system variable as follows. In Windows CMD, use: > echo %PATH% In PowerShell, use: > echo $env:Path In Linux and macOS, use: $ echo $PATH If that’s all correct and Rust still isn’t working, there are a number of places you can get help. Find out how to get in touch with other Rustaceans (a silly nickname we call ourselves) on the community page . Updating and Uninstalling Once Rust is installed via rustup , updating to a newly released version is easy. From your shell, run the following update script: $ rustup update To uninstall Rust and rustup , run the following uninstall script from your shell: $ rustup self uninstall Reading the Local Documentation The installation of Rust also includes a local copy of the documentation so that you can read it offline. Run rustup doc to open the local documentation in your browser. Any time a type or function is provided by the standard library and you’re not sure what it does or how to use it, use the application programming interface (API) documentation to find out! Using Text Editors and IDEs This book makes no assumptions about what tools you use to author Rust code. Just about any text editor will get the job done! However, many text editors and integrated development environments (IDEs) have built-in support for Rust. You can always find a fairly current list of many editors and IDEs on the tools page on the Rust website. Working Offline with This Book In several examples, we will use Rust packages beyond the standard library. To work through those examples, you will either need to have an internet connection or to have downloaded those dependencies ahead of time. To download the dependencies ahead of time, you can run the following commands. (We’ll explain what cargo is and what each of these commands does in detail later.) $ cargo new get-dependencies $ cd get-dependencies $ cargo add rand@0.8.5 trpl@0.2.0 This will cache the downloads for these packages so you will not need to download them later. Once you have run this command, you do not need to keep the get-dependencies folder. If you have run this command, you can use the --offline flag with all cargo commands in the rest of the book to use these cached versions instead of attempting to use the network. | 2026-01-13T09:29:14 |
https://www.facebook.com/login/?next=https%3A%2F%2Fl.facebook.com%2Fl.php%3Fu%3Dhttps%253A%252F%252Fwww.instagram.com%252F%26amp%253Bh%3DAT1ho_VP7aujGp5hB4ABLthmbsEWrryyldymj0vBdjJwyRf7zNOtfd1oG7waETjDOdLBwcZdBo3rgfTtglHDh6uX0PyAMCZgocf5nLGRtfjyQI5DR8xukPL7vIBSBrdeFJ7kQX0NDPsm3Epp | Facebook Facebook 이메일 또는 휴대폰 비밀번호 계정을 잊으셨나요? 새 계정 만들기 일시적으로 차단됨 일시적으로 차단됨 회원님의 이 기능 사용 속도가 너무 빠른 것 같습니다. 이 기능 사용에서 일시적으로 차단되었습니다. Back 한국어 English (US) Tiếng Việt Bahasa Indonesia ภาษาไทย Español 中文(简体) 日本語 Português (Brasil) Français (France) Deutsch 가입하기 로그인 Messenger Facebook Lite 동영상 Meta Pay Meta 스토어 Meta Quest Ray-Ban Meta Meta AI Meta AI 콘텐츠 더 보기 Instagram Threads 투표 정보 센터 개인정보처리방침 개인정보 보호 센터 정보 광고 만들기 페이지 만들기 개발자 채용 정보 쿠키 AdChoices 이용 약관 고객 센터 연락처 업로드 및 비사용자 설정 활동 로그 Meta © 2026 | 2026-01-13T09:29:14 |
https://doc.rust-lang.org/stable/book/ | The Rust Programming Language - The Rust Programming Language Keyboard shortcuts Press ← or → to navigate between chapters Press S or / to search in the book Press ? to show this help Press Esc to hide this help Auto Light Rust Coal Navy Ayu The Rust Programming Language The Rust Programming Language by Steve Klabnik, Carol Nichols, and Chris Krycho, with contributions from the Rust Community This version of the text assumes you’re using Rust 1.85.0 (released 2025-02-17) or later with edition = "2024" in the Cargo.toml file of all projects to configure them to use Rust 2024 Edition idioms. See the “Installation” section of Chapter 1 for instructions on installing or updating Rust, and see Appendix E for information on editions. The HTML format is available online at https://doc.rust-lang.org/stable/book/ and offline with installations of Rust made with rustup ; run rustup doc --book to open. Several community translations are also available. This text is available in paperback and ebook format from No Starch Press . 🚨 Want a more interactive learning experience? Try out a different version of the Rust Book, featuring: quizzes, highlighting, visualizations, and more : https://rust-book.cs.brown.edu | 2026-01-13T09:29:14 |
https://api.docs.oasis.io/py/sapphirepy/genindex.html | Index - sapphirepy documentation Contents Menu Expand Light mode Dark mode Auto light/dark, in light mode Auto light/dark, in dark mode Hide navigation sidebar Hide table of contents sidebar Skip to content Toggle site navigation sidebar sapphirepy documentation Toggle Light / Dark / Auto color theme Toggle table of contents sidebar sapphirepy documentation Contents: sapphirepy Toggle navigation of sapphirepy sapphirepy package Back to top Toggle Light / Dark / Auto color theme Toggle table of contents sidebar Index A | B | C | D | E | F | I | K | L | M | N | O | P | R | S | T | U | W | X A add() (sapphirepy.sapphire.CalldataPublicKeyManager method) AeadEnvelope (class in sapphirepy.envelope) async_wrap_make_request() (sapphirepy.sapphire.ConstructSapphireMiddlewareBuilder method) B bc_encrypt() (in module sapphirepy.deoxysii) body (sapphirepy.envelope.RequestEnvelope attribute) build (sapphirepy.sapphire.ConstructSapphireMiddlewareBuilder attribute) C CalldataPublicKey (class in sapphirepy.sapphire) CalldataPublicKeyManager (class in sapphirepy.sapphire) CallError checksum (sapphirepy.sapphire.CalldataPublicKey attribute) cipher (sapphirepy.envelope.TransactionCipher attribute) code (sapphirepy.envelope.Failure attribute) ConstructSapphireMiddlewareBuilder (class in sapphirepy.sapphire) D data (sapphirepy.envelope.AeadEnvelope attribute) (sapphirepy.envelope.RequestBody attribute) decrypt() (sapphirepy.deoxysii.DeoxysII method) (sapphirepy.envelope.TransactionCipher method) DecryptError DeoxysII (class in sapphirepy.deoxysii) derive_sub_tweak_keys() (in module sapphirepy.deoxysii) derived_k (sapphirepy.deoxysii.DeoxysII attribute) E encode_enc_tweak() (in module sapphirepy.deoxysii) encode_tag_tweak() (in module sapphirepy.deoxysii) encrypt() (sapphirepy.deoxysii.DeoxysII method) (sapphirepy.envelope.TransactionCipher method) EnvelopeError ephemeral_pubkey (sapphirepy.envelope.TransactionCipher attribute) epoch (sapphirepy.envelope.RequestBody attribute) (sapphirepy.envelope.TransactionCipher attribute) (sapphirepy.sapphire.CalldataPublicKey attribute) F fail (sapphirepy.envelope.ResultInner attribute) Failure (class in sapphirepy.envelope) failure (sapphirepy.envelope.ResultOuter attribute) format (sapphirepy.envelope.RequestEnvelope attribute) I implementation (sapphirepy.deoxysii.DeoxysII property) K key (sapphirepy.sapphire.CalldataPublicKey attribute) L lfsr2() (in module sapphirepy.deoxysii) lfsr3() (in module sapphirepy.deoxysii) M make_envelope() (sapphirepy.envelope.TransactionCipher method) message (sapphirepy.envelope.Failure attribute) module sapphirepy , [1] sapphirepy.deoxysii sapphirepy.envelope sapphirepy.error sapphirepy.sapphire module (sapphirepy.envelope.Failure attribute) N newest (sapphirepy.sapphire.CalldataPublicKeyManager property) nonce (sapphirepy.envelope.AeadEnvelope attribute) (sapphirepy.envelope.RequestBody attribute) O ok (sapphirepy.envelope.ResultInner attribute) (sapphirepy.envelope.ResultOuter attribute) P pk (sapphirepy.envelope.RequestBody attribute) R RequestBody (class in sapphirepy.envelope) RequestEnvelope (class in sapphirepy.envelope) ResultInner (class in sapphirepy.envelope) ResultOuter (class in sapphirepy.envelope) S sapphire_account (sapphirepy.sapphire.ConstructSapphireMiddlewareBuilder attribute) SapphireError sapphirepy module , [1] sapphirepy.deoxysii module sapphirepy.envelope module sapphirepy.error module sapphirepy.sapphire module signature (sapphirepy.sapphire.CalldataPublicKey attribute) stk_derive_k() (in module sapphirepy.deoxysii) stk_shuffle() (in module sapphirepy.deoxysii) T TransactionCipher (class in sapphirepy.envelope) U uint8() (in module sapphirepy.deoxysii) unknown (sapphirepy.envelope.ResultOuter attribute) W wrap() (in module sapphirepy.sapphire) wrap_make_request() (sapphirepy.sapphire.ConstructSapphireMiddlewareBuilder method) X xor_bytes() (in module sapphirepy.deoxysii) xor_rc() (in module sapphirepy.deoxysii) Copyright © 2025, Oasis Protocol Foundation Made with Sphinx and @pradyunsg 's Furo | 2026-01-13T09:29:14 |
https://doc.rust-lang.org/std/cmp/trait.Eq.html | Eq in std::cmp - Rust This old browser is unsupported and will most likely display funky things. Eq std 1.92.0 (ded5c06cf 2025-12-08) Eq Sections Derivable How can I implement Eq ? Dyn Compatibility Implementors In std:: cmp std :: cmp Trait Eq Copy item path 1.0.0 (const: unstable ) · Source pub trait Eq: PartialEq { } Expand description Trait for comparisons corresponding to equivalence relations . The primary difference to PartialEq is the additional requirement for reflexivity. A type that implements PartialEq guarantees that for all a , b and c : symmetric: a == b implies b == a and a != b implies !(a == b) transitive: a == b and b == c implies a == c Eq , which builds on top of PartialEq also implies: reflexive: a == a This property cannot be checked by the compiler, and therefore Eq is a trait without methods. Violating this property is a logic error. The behavior resulting from a logic error is not specified, but users of the trait must ensure that such logic errors do not result in undefined behavior. This means that unsafe code must not rely on the correctness of these methods. Floating point types such as f32 and f64 implement only PartialEq but not Eq because NaN != NaN . § Derivable This trait can be used with #[derive] . When derive d, because Eq has no extra methods, it is only informing the compiler that this is an equivalence relation rather than a partial equivalence relation. Note that the derive strategy requires all fields are Eq , which isn’t always desired. § How can I implement Eq ? If you cannot use the derive strategy, specify that your type implements Eq , which has no extra methods: enum BookFormat { Paperback, Hardback, Ebook, } struct Book { isbn: i32, format: BookFormat, } impl PartialEq for Book { fn eq( & self , other: & Self ) -> bool { self .isbn == other.isbn } } impl Eq for Book {} Dyn Compatibility § This trait is not dyn compatible . In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe. Implementors § Source § impl Eq for AsciiChar 1.65.0 · Source § impl Eq for BacktraceStatus Source § impl Eq for TryReserveErrorKind 1.34.0 (const: unstable ) · Source § impl Eq for Infallible 1.0.0 · Source § impl Eq for VarError 1.64.0 · Source § impl Eq for FromBytesWithNulError 1.28.0 · Source § impl Eq for std::fmt:: Alignment Source § impl Eq for DebugAsHex Source § impl Eq for Sign Source § impl Eq for AtomicOrdering 1.0.0 · Source § impl Eq for ErrorKind 1.0.0 · Source § impl Eq for SeekFrom 1.7.0 · Source § impl Eq for IpAddr Source § impl Eq for Ipv6MulticastScope 1.0.0 · Source § impl Eq for Shutdown 1.0.0 · Source § impl Eq for SocketAddr 1.0.0 · Source § impl Eq for FpCategory 1.55.0 · Source § impl Eq for IntErrorKind Source § impl Eq for BacktraceStyle 1.86.0 · Source § impl Eq for GetDisjointMutError Source § impl Eq for SearchStep 1.0.0 · Source § impl Eq for std::sync::atomic:: Ordering 1.12.0 · Source § impl Eq for RecvTimeoutError 1.0.0 · Source § impl Eq for TryRecvError 1.0.0 (const: unstable ) · Source § impl Eq for std::cmp:: Ordering 1.0.0 (const: unstable ) · Source § impl Eq for bool 1.0.0 (const: unstable ) · Source § impl Eq for char 1.0.0 (const: unstable ) · Source § impl Eq for i8 1.0.0 (const: unstable ) · Source § impl Eq for i16 1.0.0 (const: unstable ) · Source § impl Eq for i32 1.0.0 (const: unstable ) · Source § impl Eq for i64 1.0.0 (const: unstable ) · Source § impl Eq for i128 1.0.0 (const: unstable ) · Source § impl Eq for isize Source § impl Eq for ! 1.0.0 (const: unstable ) · Source § impl Eq for str 1.0.0 (const: unstable ) · Source § impl Eq for u8 1.0.0 (const: unstable ) · Source § impl Eq for u16 1.0.0 (const: unstable ) · Source § impl Eq for u32 1.0.0 (const: unstable ) · Source § impl Eq for u64 1.0.0 (const: unstable ) · Source § impl Eq for u128 1.0.0 (const: unstable ) · Source § impl Eq for () 1.0.0 (const: unstable ) · Source § impl Eq for usize 1.27.0 · Source § impl Eq for CpuidResult Source § impl Eq for AllocError 1.28.0 · Source § impl Eq for Layout 1.50.0 · Source § impl Eq for LayoutError 1.0.0 (const: unstable ) · Source § impl Eq for TypeId Source § impl Eq for ByteStr Source § impl Eq for ByteString 1.34.0 · Source § impl Eq for CharTryFromError 1.9.0 · Source § impl Eq for DecodeUtf16Error 1.20.0 · Source § impl Eq for ParseCharError 1.59.0 · Source § impl Eq for TryFromCharError Source § impl Eq for UnorderedKeyError 1.57.0 · Source § impl Eq for TryReserveError 1.64.0 · Source § impl Eq for CStr 1.64.0 · Source § impl Eq for CString 1.69.0 · Source § impl Eq for FromBytesUntilNulError 1.64.0 · Source § impl Eq for FromVecWithNulError 1.64.0 · Source § impl Eq for IntoStringError 1.64.0 · Source § impl Eq for NulError 1.0.0 · Source § impl Eq for OsStr 1.0.0 · Source § impl Eq for OsString 1.0.0 · Source § impl Eq for Error Source § impl Eq for FormattingOptions 1.1.0 · Source § impl Eq for FileType 1.0.0 · Source § impl Eq for Permissions 1.33.0 · Source § impl Eq for PhantomPinned Source § impl Eq for Assume 1.0.0 · Source § impl Eq for AddrParseError 1.0.0 · Source § impl Eq for Ipv4Addr 1.0.0 · Source § impl Eq for Ipv6Addr 1.0.0 · Source § impl Eq for SocketAddrV4 1.0.0 · Source § impl Eq for SocketAddrV6 1.0.0 · Source § impl Eq for ParseFloatError 1.0.0 · Source § impl Eq for ParseIntError 1.34.0 · Source § impl Eq for TryFromIntError 1.0.0 · Source § impl Eq for RangeFull Source § impl Eq for UCred Available on Unix only. 1.63.0 · Source § impl Eq for InvalidHandleError Available on Windows only. 1.63.0 · Source § impl Eq for NullHandleError Available on Windows only. 1.10.0 · Source § impl Eq for Location <'_> 1.0.0 · Source § impl Eq for Components <'_> 1.0.0 · Source § impl Eq for Path 1.0.0 · Source § impl Eq for PathBuf 1.7.0 · Source § impl Eq for StripPrefixError 1.0.0 · Source § impl Eq for ExitStatus Source § impl Eq for ExitStatusError 1.0.0 · Source § impl Eq for Output Source § impl Eq for std::ptr:: Alignment 1.0.0 · Source § impl Eq for ParseBoolError 1.0.0 · Source § impl Eq for Utf8Error 1.0.0 · Source § impl Eq for FromUtf8Error 1.0.0 · Source § impl Eq for String 1.0.0 · Source § impl Eq for RecvError 1.5.0 · Source § impl Eq for WaitTimeoutResult 1.26.0 · Source § impl Eq for AccessError 1.19.0 · Source § impl Eq for ThreadId 1.3.0 · Source § impl Eq for Duration 1.8.0 · Source § impl Eq for Instant 1.8.0 · Source § impl Eq for SystemTime 1.66.0 · Source § impl Eq for TryFromFloatSecsError 1.0.0 · Source § impl<'a> Eq for Component <'a> 1.0.0 · Source § impl<'a> Eq for Prefix <'a> Source § impl<'a> Eq for Utf8Pattern <'a> Source § impl<'a> Eq for PhantomContravariantLifetime <'a> Source § impl<'a> Eq for PhantomCovariantLifetime <'a> Source § impl<'a> Eq for PhantomInvariantLifetime <'a> 1.0.0 · Source § impl<'a> Eq for PrefixComponent <'a> 1.79.0 · Source § impl<'a> Eq for Utf8Chunk <'a> 1.0.0 (const: unstable ) · Source § impl<A> Eq for &A where A: Eq + ? Sized , 1.0.0 (const: unstable ) · Source § impl<A> Eq for &mut A where A: Eq + ? Sized , 1.0.0 · Source § impl<B> Eq for Cow <'_, B> where B: Eq + ToOwned + ? Sized , 1.55.0 (const: unstable ) · Source § impl<B, C> Eq for ControlFlow <B, C> where B: Eq , C: Eq , Source § impl<Dyn> Eq for DynMetadata <Dyn> where Dyn: ? Sized , 1.4.0 · Source § impl<F> Eq for F where F: FnPtr , 1.29.0 · Source § impl<H> Eq for BuildHasherDefault <H> 1.0.0 · Source § impl<Idx> Eq for std::ops:: Range <Idx> where Idx: Eq , 1.0.0 · Source § impl<Idx> Eq for std::ops:: RangeFrom <Idx> where Idx: Eq , 1.26.0 · Source § impl<Idx> Eq for std::ops:: RangeInclusive <Idx> where Idx: Eq , 1.0.0 · Source § impl<Idx> Eq for RangeTo <Idx> where Idx: Eq , 1.26.0 · Source § impl<Idx> Eq for std::ops:: RangeToInclusive <Idx> where Idx: Eq , Source § impl<Idx> Eq for std::range:: Range <Idx> where Idx: Eq , Source § impl<Idx> Eq for std::range:: RangeFrom <Idx> where Idx: Eq , Source § impl<Idx> Eq for std::range:: RangeInclusive <Idx> where Idx: Eq , Source § impl<Idx> Eq for std::range:: RangeToInclusive <Idx> where Idx: Eq , 1.0.0 · Source § impl<K, V, A> Eq for BTreeMap <K, V, A> where K: Eq , V: Eq , A: Allocator + Clone , 1.0.0 · Source § impl<K, V, S> Eq for HashMap <K, V, S> where K: Eq + Hash , V: Eq , S: BuildHasher , 1.41.0 · Source § impl<Ptr> Eq for Pin <Ptr> where Ptr: Deref , <Ptr as Deref >:: Target : Eq , 1.17.0 · Source § impl<T> Eq for Bound <T> where T: Eq , 1.0.0 (const: unstable ) · Source § impl<T> Eq for Option <T> where T: Eq , 1.36.0 · Source § impl<T> Eq for Poll <T> where T: Eq , 1.0.0 · Source § impl<T> Eq for *const T where T: ? Sized , Pointer equality is an equivalence relation. 1.0.0 · Source § impl<T> Eq for *mut T where T: ? Sized , Pointer equality is an equivalence relation. 1.0.0 (const: unstable ) · Source § impl<T> Eq for [T] where T: Eq , 1.0.0 (const: unstable ) · Source § impl<T> Eq for (T₁, T₂, …, Tₙ) where T: Eq , This trait is implemented for tuples up to twelve items long. 1.2.0 · Source § impl<T> Eq for Cell <T> where T: Eq + Copy , 1.70.0 · Source § impl<T> Eq for OnceCell <T> where T: Eq , 1.2.0 · Source § impl<T> Eq for RefCell <T> where T: Eq + ? Sized , Source § impl<T> Eq for PhantomContravariant <T> where T: ? Sized , Source § impl<T> Eq for PhantomCovariant <T> where T: ? Sized , 1.0.0 · Source § impl<T> Eq for PhantomData <T> where T: ? Sized , Source § impl<T> Eq for PhantomInvariant <T> where T: ? Sized , 1.21.0 · Source § impl<T> Eq for Discriminant <T> 1.20.0 · Source § impl<T> Eq for ManuallyDrop <T> where T: Eq + ? Sized , 1.28.0 (const: unstable ) · Source § impl<T> Eq for NonZero <T> where T: ZeroablePrimitive + Eq , 1.74.0 · Source § impl<T> Eq for Saturating <T> where T: Eq , 1.0.0 · Source § impl<T> Eq for Wrapping <T> where T: Eq , 1.25.0 · Source § impl<T> Eq for NonNull <T> where T: ? Sized , Source § impl<T> Eq for Exclusive <T> where T: Sync + Eq + ? Sized , 1.19.0 (const: unstable ) · Source § impl<T> Eq for Reverse <T> where T: Eq , 1.0.0 · Source § impl<T, A> Eq for Box <T, A> where T: Eq + ? Sized , A: Allocator , 1.0.0 · Source § impl<T, A> Eq for BTreeSet <T, A> where T: Eq , A: Allocator + Clone , 1.0.0 · Source § impl<T, A> Eq for LinkedList <T, A> where T: Eq , A: Allocator , 1.0.0 · Source § impl<T, A> Eq for VecDeque <T, A> where T: Eq , A: Allocator , 1.0.0 · Source § impl<T, A> Eq for Rc <T, A> where T: Eq + ? Sized , A: Allocator , Source § impl<T, A> Eq for UniqueRc <T, A> where T: Eq + ? Sized , A: Allocator , 1.0.0 · Source § impl<T, A> Eq for Arc <T, A> where T: Eq + ? Sized , A: Allocator , Source § impl<T, A> Eq for UniqueArc <T, A> where T: Eq + ? Sized , A: Allocator , 1.0.0 · Source § impl<T, A> Eq for Vec <T, A> where T: Eq , A: Allocator , 1.0.0 (const: unstable ) · Source § impl<T, E> Eq for Result <T, E> where T: Eq , E: Eq , 1.0.0 · Source § impl<T, S> Eq for HashSet <T, S> where T: Eq + Hash , S: BuildHasher , 1.0.0 (const: unstable ) · Source § impl<T, const N: usize > Eq for [T; N] where T: Eq , Source § impl<T, const N: usize > Eq for Simd <T, N> where LaneCount <N>: SupportedLaneCount , T: SimdElement + Eq , Source § impl<T: Eq > Eq for SendTimeoutError <T> 1.0.0 · Source § impl<T: Eq > Eq for TrySendError <T> 1.0.0 · Source § impl<T: Eq > Eq for Cursor <T> 1.0.0 · Source § impl<T: Eq > Eq for SendError <T> 1.70.0 · Source § impl<T: Eq > Eq for OnceLock <T> Source § impl<Y, R> Eq for CoroutineState <Y, R> where Y: Eq , R: Eq , | 2026-01-13T09:29:14 |
https://ben.balter.com/2014/10/08/open-source-licensing-for-government-attorneys/#fnref:1 | Everything a government attorney needs to know about open source software licensing | Ben Balter Ben Balter Posts About Contact Technology leadership, collaboration, and open source Everything a government attorney needs to know about open source software licensing TL;DR : A high-level overview to highlight common legal issues government agencies may face when participating in the open source community 7 minute read Government agencies can and should participate in the open source community. Open source software is more than simply software for which the underlying human-readable code had been made available to the public . Along with the code comes an intellectual property license grant , a legal framework which government agencies are embracing with increasing frequency. Here are some common legal issues to look out for: Note: this is an early draft. If you notice anything wonky, please help improve it . Open source licenses generally Open source licenses are a straight-forward intellectual property license with one unique feature: they’re standardized . The software industry has adopted approximately fifteen mainstream and three primary licenses . While the wording and specific terms vary, most licenses have the following common clauses: An explicit grant to use, copy, modify, redistribute, sublicense, or sell the software. Disclaimer of implied warranties such as the warranties of merchantability or fitness for a particular purpose and other limitations on liability. A requirement that attribution to the author, the license name, or both be included in any redistributed software. Instructions on how to properly mark the code itself for distribution under the license. Some licenses may also include: The requirement that any submissions contributed to the project by the public be licensed under the same terms as the project (a copyright grant from contributors to downstream consumers). A patent grant from contributors to downstream consumers. The requirement that any changes to the original software be described when distributed. Changing requirements depending on whether the software is distributed in its original, human-readable form, or its compiled (binary), machine-readable form. Why standardized licenses In order for open source to work, downstream users must be able to use the code free of legal restriction or ambiguity, and must be able to do so without the need to retain costly legal counsel. Most developers and software firms are familiar with the most common open source licenses and terms, and thus can use such software freely. As such use of a standardized license serves as a proxy for those without legal training to know precisely what they can and can’t do with the software. Unless absolutely required, avoid custom, modified, or non-standard terms, which will serve as a barrier to downstream use of the agency code. The open source community is just that, a community, and one with a strong tradition. Open source software is published so that others may use it, and doing so under a legal framework alien to the community, is the easiest way to make sure it’s not used. Optimize for the code’s reuse, not its publication. Common licenses Within the software industry, the canonical source for most main licenses, along with a brief overview of their terms can be found at choosealicense.com . The three most popular licenses are the MIT, Apache, and GPL licenses: MIT - The most common license is the MIT license, which is a simple grant, copyright notice requirement, and disclaimer of warranty. Apache - The Apache license is functionally equivalent to the MIT license, but is more heavily lawyered and includes an explicit patent grant GPL The GPL is the most commonly used copyleft license, with v2, v3, and “v2 or later” variants. Copyleft Some licenses, most notably the GPL family of licenses, are copyleft licenses, meaning the license uses copyright law to ensure the code remains open source. The WordPress and Drupal content management systems are both licensed under the GPL license. Any work derived from copyleft-licensed code, if distributed, must be distributed under the same (or compatible terms). There are two threshold issues there: Derivative work - There are nuances within the particular license, but for most cases, if the new code depends on the original, copyleft-licensed code, such as a WordPress theme or a Drupal module, it is considered a derivative work subject to the copyleft requirements. Distribution - The copyleft requirements are not triggered unless the derivative work is distributed. Agencies are free to make derivative works and maintain that work as a closed-source project. When the underlying source code is published to the public, distribution is clear. Less clear is distribution to other business units within the same agency, or with other agency. Unless licensed under the AGPL license, using the code as part of a hosted service (for example, a site) does not trigger that requirement. When faced with copyleft restrictions, an agency should release code under the least-restrictive means available under the circumstances, which is often the copyleft license itself. While the government’s particular code may not be subject to copyright (see below), the project as a whole is encumbered by upstream license restrictions, and thus the agency does not have the right to release the code under less-restrictive terms. Consuming open source software There is nothing to legally bar agencies from using open source software on their servers or on their employees’s computers. Three common concerns: For procurement purposes, open source software is treated as commercial, off the shelf software (COTS). The work of contributors does not trigger gift authority or Anti-Deficiency Act obligations, unless the work is performed specifically for the agency. Under a traditional open source workflow, project contributors publish their code publicly and license their work to the world. See accepting contributions from the public below. The software must still go through the agency’s traditional approval process, such as security or privacy reviews, just as the agency would do before operationalizing a piece of commercial software Publishing open source software The agency can and under the digital strategy and open data policy is encouraged to publish the agency’s purpose-build software. This can arise under two arrangements: Government-created code Code created by government employees on government time is consider a government work, and thus is not subject to domestic copyright protection under 17 USC § 105. The internet, and thus open source, however, is not bound by geographic lines. It is not uncommon for government created code to be used by foreign citizens. As such, the agency should make it explicit under what terms foreign citizens can use the code. Best practices suggest that agencies release their code under the Creative Commons Zero license , a public domain dedication and copyright disclaimer, to ensure all downstream users receive the same rights in the software. Where not possible, (for example, a copyleft derivative work), prefer the least-restrictive terms possible. Contractor created code Under the FAR, by default, the government receives unlimited rights in any software developed under contract, and thus is free to publish the code as they see fit. Due to market forces and contracting tradition, many typical government IT contracts, however, contract away this right in favor of simple government purpose rights, with the contractor retaining the original copyright. If that’s the case, the agency has several options: Ask - Government contractors are typically contractually prohibited from talking about their work. As a result, most, if not all, would prefer their work be open sourced. For typical web or mobile development contracts, there is often little proprietary IP in the purpose-built code, and thus contractors have an incentive to grant the agency additional rights on request. Contractor licenses to agency - Rather than granting copyright or broad redistribution rights, the contractor can license the code to the agency under an open source license of their choosing. Once in the agency’s hands, the agency is free to redistribute the software under those same terms as they see fit. This may require a mod on the contract. Contractor publishes - The contractor, at the agency’s request, can independently publish the code under an open source license. While the agency will not get “credit” for publishing the software, the obligation to maintain the software will shift to the contractor. Once open source, the agency can consume that software as they would any other open source software. Contributing to open source software A central tenet of open source software is contributing downstream improvements to the upstream open source project. Agency-created code should be no exception. While there may be a business decision to prohibit government employees from contributing to community projects on government time, nothing should prohibit them legally. Whether a contribution to the community-maintained project directly (for example, contributing to WordPress or Drupal), or a derivative work (a plugin, theme, or module), agency contributions should be licensed under the terms of the parent project, using the project’s standard workflow and distribution channels. One thing to watch out for are contributor license agreements (CLAss) which may proscribe an explicit copyright grant (as opposed to a license), or the granting of additional rights beyond the copyright license, which may conflict with the contributor’s obligations as a government employee. Accepting contributions from the public Once published, there’s a high probability a member of the public will submit a proposed improvement to the agency project. There are two potential issues: Agency request - As is common practice in the open source world, the agency may maintain a project roadmap and backlog of known bugs or potential enhancements, but should not directly instruct potential contributors to address a certain issue. License - The proposed change (often in the form of a “pull request”) is licensed under the same terms as the project itself (for example, MIT, GPL, or CC0) and thus is independent open source software. 1 The agency is free to incorporate that code into the government project, just as it is free to use any other open source code. Open source community engagement platforms The open source community uses several platforms for communicating project plans and sharing source code. These platforms may be project specific, such as wordpress.org or drupal.org or can be general open source platforms such as GitHub or RubyGems . When used for public engagement, the agency’s use of such platforms is governed by OMB M-10–23. Agencies should review any terms of service (in many cases, there are custom, fed-friendly terms already negotiated), and ensure the agency itself establishes a formal presence on the platform. For platforms like GitHub, per the terms of service, government employees should add their government email address to their existing account, if they have one, or should create a new personal (non-agency-specific account). The service automatically disambiguates between personal and professional contexts to make ownership and agency clear. See also If you found this post helpful, there are two other resources you may be interested in reading: A more expansive post on open source licensing geared towards open source project maintainers An overview of the best way to handle copyright notices for open source projects in for example, Licenses or the readme, and Go forth and open source This is a high-level overview intended to highlight common legal issues agencies may face when participating in the open source community, and should not be consider to be legal advice or specific to a particular matter. Although this is my personal blog, agencies should feel free to contact [email protected] or post in the github.com/government peer group with any open-source related questions. The full mechanics of a pull request are beyond the scope of this post, but in short, a member of the public will fork the agency project, or make a copy in their personal account. In many cases, that is all downstream users do. The contributor may then modify the software, in their own personal copy, under the right to modify as granted in the open source license. Again, many downstream users will stop at this point as well, using the modified software for their own purposes. At both steps, the software is freely available to anyone in the world from the user’s account and is licensed under the project terms. The upstream project is free to incorporate the downstream users changes as they wish. A contributor may also choose to contribute that code back to the original project, by explicitly asking the upstream project to incorporate their changes. ↩ Originally published October 8, 2014 | View revision history If you enjoyed this post, you might also enjoy: Everything an open source maintainer might need to know about open source licensing Why you shouldn't write your own open source license Government's Release of Federally Funded Source Code: Public Domain or Open Source? Yes. Why isn't all government software open source? Open source, not just software anymore Eight reasons why government contractors should embrace open source software What's Missing from CFPB's Awesome New Source Code Policy A White House open source policy written by a geek Disclosed source is not the same as open source Why open source Twelve tips for growing communities around your open source project Ben Balter is the Director of Hubber Enablement within the Office of the COO at GitHub , the world’s largest software development platform, ensuring all Hubbers can do their best (remote) work. Previously, he served as the Director of Technical Business Operations, and as Chief of Staff for Security, he managed the office of the Chief Security Officer, improving overall business effectiveness of the Security organization through portfolio management, strategy, planning, culture, and values. As a Staff Technical Program manager for Enterprise and Compliance, Ben managed GitHub’s on-premises and SaaS enterprise offerings, and as the Senior Product Manager overseeing the platform’s Trust and Safety efforts, Ben shipped more than 500 features in support of community management, privacy, compliance, content moderation, product security, platform health, and open source workflows to ensure the GitHub community and platform remained safe, secure, and welcoming for all software developers. Before joining GitHub’s Product team, Ben served as GitHub’s Government Evangelist, leading the efforts to encourage more than 2,000 government organizations across 75 countries to adopt open source philosophies for code, data, and policy development. More about the author → This page is open source. Please help improve it . Edit Other recommended reading Fine Print | 2026-01-13T09:29:14 |
https://l.facebook.com/l.php?u=https%3A%2F%2Fwww.instagram.com%2F&h=AT2U1czzVLASrr8GEzQeti9NEjlT5xGEka9KiphsFXSEAtlkJqDhP7LmTW5jgG0HA_u2Sa0D34Z9Zb-npKNcJPE33JfN0K3ewQP2VsGPY0xhKGrXejuhMgECIumoAtSHvGKnqZXA1PrBHHsC | Facebook Facebook 이메일 또는 휴대폰 비밀번호 계정을 잊으셨나요? 새 계정 만들기 일시적으로 차단됨 일시적으로 차단됨 회원님의 이 기능 사용 속도가 너무 빠른 것 같습니다. 이 기능 사용에서 일시적으로 차단되었습니다. Back 한국어 English (US) Tiếng Việt Bahasa Indonesia ภาษาไทย Español 中文(简体) 日本語 Português (Brasil) Français (France) Deutsch 가입하기 로그인 Messenger Facebook Lite 동영상 Meta Pay Meta 스토어 Meta Quest Ray-Ban Meta Meta AI Meta AI 콘텐츠 더 보기 Instagram Threads 투표 정보 센터 개인정보처리방침 개인정보 보호 센터 정보 광고 만들기 페이지 만들기 개발자 채용 정보 쿠키 AdChoices 이용 약관 고객 센터 연락처 업로드 및 비사용자 설정 활동 로그 Meta © 2026 | 2026-01-13T09:29:14 |
https://doc.rust-lang.org/std/clone/trait.Clone.html | Clone in std::clone - Rust This old browser is unsupported and will most likely display funky things. Clone std 1.92.0 (ded5c06cf 2025-12-08) Clone Sections Derivable How can I implement Clone ? Clone and PartialEq / Eq Additional implementors Required Methods clone Provided Methods clone_from Dyn Compatibility Implementors In std:: clone std :: clone Trait Clone Copy item path 1.0.0 (const: unstable ) · Source pub trait Clone: Sized { // Required method fn clone (&self) -> Self; // Provided method fn clone_from (&mut self, source: &Self) { ... } } Expand description A common trait that allows explicit creation of a duplicate value. Calling clone always produces a new value. However, for types that are references to other data (such as smart pointers or references), the new value may still point to the same underlying data, rather than duplicating it. See Clone::clone for more details. This distinction is especially important when using #[derive(Clone)] on structs containing smart pointers like Arc<Mutex<T>> - the cloned struct will share mutable state with the original. Differs from Copy in that Copy is implicit and an inexpensive bit-wise copy, while Clone is always explicit and may or may not be expensive. In order to enforce these characteristics, Rust does not allow you to reimplement Copy , but you may reimplement Clone and run arbitrary code. Since Clone is more general than Copy , you can automatically make anything Copy be Clone as well. § Derivable This trait can be used with #[derive] if all fields are Clone . The derive d implementation of Clone calls clone on each field. For a generic struct, #[derive] implements Clone conditionally by adding bound Clone on generic parameters. // `derive` implements Clone for Reading<T> when T is Clone. #[derive(Clone)] struct Reading<T> { frequency: T, } § How can I implement Clone ? Types that are Copy should have a trivial implementation of Clone . More formally: if T: Copy , x: T , and y: &T , then let x = y.clone(); is equivalent to let x = *y; . Manual implementations should be careful to uphold this invariant; however, unsafe code must not rely on it to ensure memory safety. An example is a generic struct holding a function pointer. In this case, the implementation of Clone cannot be derive d, but can be implemented as: struct Generate<T>( fn () -> T); impl <T> Copy for Generate<T> {} impl <T> Clone for Generate<T> { fn clone( & self ) -> Self { * self } } If we derive : #[derive(Copy, Clone)] struct Generate<T>( fn () -> T); the auto-derived implementations will have unnecessary T: Copy and T: Clone bounds: // Automatically derived impl <T: Copy> Copy for Generate<T> { } // Automatically derived impl <T: Clone> Clone for Generate<T> { fn clone( & self ) -> Generate<T> { Generate(Clone::clone( & self . 0 )) } } The bounds are unnecessary because clearly the function itself should be copy- and cloneable even if its return type is not: ⓘ #[derive(Copy, Clone)] struct Generate<T>( fn () -> T); struct NotCloneable; fn generate_not_cloneable() -> NotCloneable { NotCloneable } Generate(generate_not_cloneable).clone(); // error: trait bounds were not satisfied // Note: With the manual implementations the above line will compile. § Clone and PartialEq / Eq Clone is intended for the duplication of objects. Consequently, when implementing both Clone and PartialEq , the following property is expected to hold: x == x -> x.clone() == x In other words, if an object compares equal to itself, its clone must also compare equal to the original. For types that also implement Eq – for which x == x always holds – this implies that x.clone() == x must always be true. Standard library collections such as HashMap , HashSet , BTreeMap , BTreeSet and BinaryHeap rely on their keys respecting this property for correct behavior. Furthermore, these collections require that cloning a key preserves the outcome of the Hash and Ord methods. Thankfully, this follows automatically from x.clone() == x if Hash and Ord are correctly implemented according to their own requirements. When deriving both Clone and PartialEq using #[derive(Clone, PartialEq)] or when additionally deriving Eq using #[derive(Clone, PartialEq, Eq)] , then this property is automatically upheld – provided that it is satisfied by the underlying types. Violating this property is a logic error. The behavior resulting from a logic error is not specified, but users of the trait must ensure that such logic errors do not result in undefined behavior. This means that unsafe code must not rely on this property being satisfied. § Additional implementors In addition to the implementors listed below , the following types also implement Clone : Function item types (i.e., the distinct types defined for each function) Function pointer types (e.g., fn() -> i32 ) Closure types, if they capture no value from the environment or if all such captured values implement Clone themselves. Note that variables captured by shared reference always implement Clone (even if the referent doesn’t), while variables captured by mutable reference never implement Clone . Required Methods § 1.0.0 · Source fn clone (&self) -> Self Returns a duplicate of the value. Note that what “duplicate” means varies by type: For most types, this creates a deep, independent copy For reference types like &T , this creates another reference to the same value For smart pointers like Arc or Rc , this increments the reference count but still points to the same underlying data § Examples let hello = "Hello" ; // &str implements Clone assert_eq! ( "Hello" , hello.clone()); Example with a reference-counted type: use std::sync::{Arc, Mutex}; let data = Arc::new(Mutex::new( vec! [ 1 , 2 , 3 ])); let data_clone = data.clone(); // Creates another Arc pointing to the same Mutex { let mut lock = data.lock().unwrap(); lock.push( 4 ); } // Changes are visible through the clone because they share the same underlying data assert_eq! ( * data_clone.lock().unwrap(), vec! [ 1 , 2 , 3 , 4 ]); Provided Methods § 1.0.0 · Source fn clone_from (&mut self, source: &Self) Performs copy-assignment from source . a.clone_from(&b) is equivalent to a = b.clone() in functionality, but can be overridden to reuse the resources of a to avoid unnecessary allocations. Dyn Compatibility § This trait is not dyn compatible . In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe. Implementors § Source § impl Clone for AsciiChar 1.0.0 (const: unstable ) · Source § impl Clone for std::cmp:: Ordering Source § impl Clone for TryReserveErrorKind 1.34.0 (const: unstable ) · Source § impl Clone for Infallible 1.0.0 · Source § impl Clone for VarError 1.64.0 · Source § impl Clone for FromBytesWithNulError 1.28.0 · Source § impl Clone for std::fmt:: Alignment Source § impl Clone for DebugAsHex Source § impl Clone for Sign 1.0.0 · Source § impl Clone for ErrorKind 1.0.0 · Source § impl Clone for SeekFrom 1.7.0 · Source § impl Clone for IpAddr Source § impl Clone for Ipv6MulticastScope 1.0.0 · Source § impl Clone for Shutdown 1.0.0 · Source § impl Clone for std::net:: SocketAddr 1.0.0 · Source § impl Clone for FpCategory 1.55.0 · Source § impl Clone for IntErrorKind Source § impl Clone for BacktraceStyle 1.86.0 · Source § impl Clone for GetDisjointMutError Source § impl Clone for SearchStep 1.0.0 · Source § impl Clone for std::sync::atomic:: Ordering 1.12.0 · Source § impl Clone for RecvTimeoutError 1.0.0 · Source § impl Clone for TryRecvError 1.0.0 (const: unstable ) · Source § impl Clone for bool 1.0.0 (const: unstable ) · Source § impl Clone for char 1.0.0 (const: unstable ) · Source § impl Clone for f16 1.0.0 (const: unstable ) · Source § impl Clone for f32 1.0.0 (const: unstable ) · Source § impl Clone for f64 1.0.0 (const: unstable ) · Source § impl Clone for f128 1.0.0 (const: unstable ) · Source § impl Clone for i8 1.0.0 (const: unstable ) · Source § impl Clone for i16 1.0.0 (const: unstable ) · Source § impl Clone for i32 1.0.0 (const: unstable ) · Source § impl Clone for i64 1.0.0 (const: unstable ) · Source § impl Clone for i128 1.0.0 (const: unstable ) · Source § impl Clone for isize Source § impl Clone for ! 1.0.0 (const: unstable ) · Source § impl Clone for u8 1.0.0 (const: unstable ) · Source § impl Clone for u16 1.0.0 (const: unstable ) · Source § impl Clone for u32 1.0.0 (const: unstable ) · Source § impl Clone for u64 1.0.0 (const: unstable ) · Source § impl Clone for u128 1.0.0 (const: unstable ) · Source § impl Clone for usize 1.27.0 · Source § impl Clone for CpuidResult 1.27.0 · Source § impl Clone for __m128 1.89.0 · Source § impl Clone for __m128bh 1.27.0 · Source § impl Clone for __m128d Source § impl Clone for __m128h 1.27.0 · Source § impl Clone for __m128i 1.27.0 · Source § impl Clone for __m256 1.89.0 · Source § impl Clone for __m256bh 1.27.0 · Source § impl Clone for __m256d Source § impl Clone for __m256h 1.27.0 · Source § impl Clone for __m256i 1.72.0 · Source § impl Clone for __m512 1.89.0 · Source § impl Clone for __m512bh 1.72.0 · Source § impl Clone for __m512d Source § impl Clone for __m512h 1.72.0 · Source § impl Clone for __m512i Source § impl Clone for bf16 Source § impl Clone for AllocError Source § impl Clone for Global 1.28.0 · Source § impl Clone for Layout 1.50.0 · Source § impl Clone for LayoutError 1.28.0 · Source § impl Clone for System 1.0.0 (const: unstable ) · Source § impl Clone for TypeId 1.34.0 · Source § impl Clone for TryFromSliceError 1.0.0 · Source § impl Clone for std::ascii:: EscapeDefault 1.3.0 · Source § impl Clone for Box < str > Source § impl Clone for Box < ByteStr > 1.29.0 · Source § impl Clone for Box < CStr > 1.29.0 · Source § impl Clone for Box < OsStr > 1.29.0 · Source § impl Clone for Box < Path > Source § impl Clone for ByteString 1.34.0 · Source § impl Clone for CharTryFromError 1.9.0 · Source § impl Clone for DecodeUtf16Error 1.20.0 · Source § impl Clone for std::char:: EscapeDebug 1.0.0 · Source § impl Clone for std::char:: EscapeDefault 1.0.0 · Source § impl Clone for std::char:: EscapeUnicode 1.20.0 · Source § impl Clone for ParseCharError 1.0.0 · Source § impl Clone for ToLowercase 1.0.0 · Source § impl Clone for ToUppercase 1.59.0 · Source § impl Clone for TryFromCharError Source § impl Clone for UnorderedKeyError 1.57.0 · Source § impl Clone for TryReserveError 1.64.0 · Source § impl Clone for CString 1.69.0 · Source § impl Clone for FromBytesUntilNulError 1.64.0 · Source § impl Clone for FromVecWithNulError 1.64.0 · Source § impl Clone for IntoStringError 1.64.0 · Source § impl Clone for NulError 1.0.0 · Source § impl Clone for OsString 1.0.0 · Source § impl Clone for Error Source § impl Clone for FormattingOptions 1.75.0 · Source § impl Clone for FileTimes 1.1.0 · Source § impl Clone for FileType 1.0.0 · Source § impl Clone for Metadata 1.0.0 · Source § impl Clone for OpenOptions 1.0.0 · Source § impl Clone for Permissions 1.7.0 · Source § impl Clone for DefaultHasher 1.7.0 · Source § impl Clone for RandomState 1.0.0 · Source § impl Clone for SipHasher 1.0.0 · Source § impl Clone for std::io:: Empty 1.0.0 · Source § impl Clone for Sink 1.33.0 · Source § impl Clone for PhantomPinned Source § impl Clone for Assume 1.0.0 · Source § impl Clone for AddrParseError 1.0.0 · Source § impl Clone for Ipv4Addr 1.0.0 · Source § impl Clone for Ipv6Addr 1.0.0 · Source § impl Clone for SocketAddrV4 1.0.0 · Source § impl Clone for SocketAddrV6 1.0.0 · Source § impl Clone for ParseFloatError 1.0.0 · Source § impl Clone for ParseIntError 1.34.0 · Source § impl Clone for TryFromIntError 1.0.0 · Source § impl Clone for RangeFull 1.1.0 · Source § impl Clone for stat Available on Linux only. 1.10.0 · Source § impl Clone for std::os::unix::net:: SocketAddr Available on Unix only. Source § impl Clone for SocketCred Available on (Android or Linux or Cygwin) and Unix only. Source § impl Clone for UCred Available on Unix only. 1.63.0 · Source § impl Clone for InvalidHandleError Available on Windows only. 1.63.0 · Source § impl Clone for NullHandleError Available on Windows only. 1.0.0 · Source § impl Clone for PathBuf 1.7.0 · Source § impl Clone for StripPrefixError 1.61.0 · Source § impl Clone for ExitCode 1.0.0 · Source § impl Clone for ExitStatus Source § impl Clone for ExitStatusError 1.0.0 · Source § impl Clone for Output Source § impl Clone for std::ptr:: Alignment Source § impl Clone for DefaultRandomSource 1.0.0 · Source § impl Clone for ParseBoolError 1.0.0 · Source § impl Clone for Utf8Error 1.0.0 · Source § impl Clone for FromUtf8Error Source § impl Clone for IntoChars 1.0.0 · Source § impl Clone for String 1.0.0 · Source § impl Clone for RecvError 1.5.0 · Source § impl Clone for WaitTimeoutResult Source § impl Clone for LocalWaker 1.36.0 · Source § impl Clone for RawWakerVTable 1.36.0 · Source § impl Clone for Waker 1.26.0 · Source § impl Clone for AccessError 1.0.0 · Source § impl Clone for Thread 1.19.0 · Source § impl Clone for ThreadId 1.3.0 · Source § impl Clone for Duration 1.8.0 · Source § impl Clone for Instant 1.8.0 · Source § impl Clone for SystemTime 1.8.0 · Source § impl Clone for SystemTimeError 1.66.0 · Source § impl Clone for TryFromFloatSecsError 1.0.0 · Source § impl<'a> Clone for Component <'a> 1.0.0 · Source § impl<'a> Clone for Prefix <'a> Source § impl<'a> Clone for Utf8Pattern <'a> Source § impl<'a> Clone for Source <'a> Source § impl<'a> Clone for core::ffi::c_str:: Bytes <'a> 1.0.0 · Source § impl<'a> Clone for Arguments <'a> 1.36.0 · Source § impl<'a> Clone for IoSlice <'a> Source § impl<'a> Clone for PhantomContravariantLifetime <'a> Source § impl<'a> Clone for PhantomCovariantLifetime <'a> Source § impl<'a> Clone for PhantomInvariantLifetime <'a> 1.0.0 · Source § impl<'a> Clone for EncodeWide <'a> Available on Windows only. Source § impl<'a> Clone for ProcThreadAttributeListBuilder <'a> Available on Windows only. 1.10.0 · Source § impl<'a> Clone for Location <'a> 1.28.0 · Source § impl<'a> Clone for Ancestors <'a> 1.0.0 · Source § impl<'a> Clone for Components <'a> 1.0.0 · Source § impl<'a> Clone for std::path:: Iter <'a> 1.0.0 · Source § impl<'a> Clone for PrefixComponent <'a> 1.60.0 · Source § impl<'a> Clone for EscapeAscii <'a> Source § impl<'a> Clone for CharSearcher <'a> 1.0.0 · Source § impl<'a> Clone for std::str:: Bytes <'a> 1.0.0 · Source § impl<'a> Clone for CharIndices <'a> 1.0.0 · Source § impl<'a> Clone for Chars <'a> 1.8.0 · Source § impl<'a> Clone for EncodeUtf16 <'a> 1.34.0 · Source § impl<'a> Clone for std::str:: EscapeDebug <'a> 1.34.0 · Source § impl<'a> Clone for std::str:: EscapeDefault <'a> 1.34.0 · Source § impl<'a> Clone for std::str:: EscapeUnicode <'a> 1.0.0 · Source § impl<'a> Clone for Lines <'a> 1.0.0 · Source § impl<'a> Clone for LinesAny <'a> 1.34.0 · Source § impl<'a> Clone for SplitAsciiWhitespace <'a> 1.1.0 · Source § impl<'a> Clone for SplitWhitespace <'a> 1.79.0 · Source § impl<'a> Clone for Utf8Chunk <'a> 1.79.0 · Source § impl<'a> Clone for Utf8Chunks <'a> Source § impl<'a, 'b> Clone for CharSliceSearcher <'a, 'b> Source § impl<'a, 'b> Clone for StrSearcher <'a, 'b> Source § impl<'a, 'b, const N: usize > Clone for CharArrayRefSearcher <'a, 'b, N> Source § impl<'a, F> Clone for CharPredicateSearcher <'a, F> where F: Clone + FnMut ( char ) -> bool , Source § impl<'a, K> Clone for std::collections::btree_set:: Cursor <'a, K> where K: Clone + 'a, 1.5.0 · Source § impl<'a, P> Clone for MatchIndices <'a, P> where P: Pattern , <P as Pattern >:: Searcher <'a>: Clone , 1.2.0 · Source § impl<'a, P> Clone for Matches <'a, P> where P: Pattern , <P as Pattern >:: Searcher <'a>: Clone , 1.5.0 · Source § impl<'a, P> Clone for RMatchIndices <'a, P> where P: Pattern , <P as Pattern >:: Searcher <'a>: Clone , 1.2.0 · Source § impl<'a, P> Clone for RMatches <'a, P> where P: Pattern , <P as Pattern >:: Searcher <'a>: Clone , 1.0.0 · Source § impl<'a, P> Clone for std::str:: RSplit <'a, P> where P: Pattern , <P as Pattern >:: Searcher <'a>: Clone , 1.0.0 · Source § impl<'a, P> Clone for RSplitN <'a, P> where P: Pattern , <P as Pattern >:: Searcher <'a>: Clone , 1.0.0 · Source § impl<'a, P> Clone for RSplitTerminator <'a, P> where P: Pattern , <P as Pattern >:: Searcher <'a>: Clone , 1.0.0 · Source § impl<'a, P> Clone for std::str:: Split <'a, P> where P: Pattern , <P as Pattern >:: Searcher <'a>: Clone , 1.51.0 · Source § impl<'a, P> Clone for std::str:: SplitInclusive <'a, P> where P: Pattern , <P as Pattern >:: Searcher <'a>: Clone , 1.0.0 · Source § impl<'a, P> Clone for SplitN <'a, P> where P: Pattern , <P as Pattern >:: Searcher <'a>: Clone , 1.0.0 · Source § impl<'a, P> Clone for SplitTerminator <'a, P> where P: Pattern , <P as Pattern >:: Searcher <'a>: Clone , 1.31.0 · Source § impl<'a, T> Clone for RChunksExact <'a, T> 1.89.0 · Source § impl<'a, T, P> Clone for ChunkBy <'a, T, P> where T: 'a, P: Clone , Source § impl<'a, T, const N: usize > Clone for ArrayWindows <'a, T, N> where T: Clone + 'a, Source § impl<'a, const N: usize > Clone for CharArraySearcher <'a, N> Source § impl<'f> Clone for VaListImpl <'f> 1.63.0 · Source § impl<'fd> Clone for BorrowedFd <'fd> Available on Unix or HermitCore or target_os=trusty or WASI or target_os=motor only. 1.63.0 · Source § impl<'handle> Clone for BorrowedHandle <'handle> Available on Windows only. 1.63.0 · Source § impl<'socket> Clone for BorrowedSocket <'socket> Available on Windows only. 1.0.0 · Source § impl<A> Clone for Repeat <A> where A: Clone , 1.82.0 · Source § impl<A> Clone for RepeatN <A> where A: Clone , 1.0.0 · Source § impl<A> Clone for std::option:: IntoIter <A> where A: Clone , 1.0.0 · Source § impl<A> Clone for std::option:: Iter <'_, A> Source § impl<A> Clone for IterRange <A> where A: Clone , Source § impl<A> Clone for IterRangeFrom <A> where A: Clone , Source § impl<A> Clone for IterRangeInclusive <A> where A: Clone , 1.0.0 · Source § impl<A, B> Clone for Chain <A, B> where A: Clone , B: Clone , 1.0.0 · Source § impl<A, B> Clone for Zip <A, B> where A: Clone , B: Clone , 1.0.0 · Source § impl<B> Clone for Cow <'_, B> where B: ToOwned + ? Sized , 1.55.0 (const: unstable ) · Source § impl<B, C> Clone for ControlFlow <B, C> where B: Clone , C: Clone , Source § impl<Dyn> Clone for DynMetadata <Dyn> where Dyn: ? Sized , 1.34.0 · Source § impl<F> Clone for FromFn <F> where F: Clone , 1.43.0 · Source § impl<F> Clone for OnceWith <F> where F: Clone , 1.28.0 · Source § impl<F> Clone for RepeatWith <F> where F: Clone , Source § impl<G> Clone for FromCoroutine <G> where G: Clone , 1.7.0 · Source § impl<H> Clone for BuildHasherDefault <H> Source § impl<I> Clone for FromIter <I> where I: Clone , 1.9.0 · Source § impl<I> Clone for DecodeUtf16 <I> where I: Clone + Iterator <Item = u16 >, 1.1.0 · Source § impl<I> Clone for Cloned <I> where I: Clone , 1.36.0 · Source § impl<I> Clone for Copied <I> where I: Clone , 1.0.0 · Source § impl<I> Clone for Cycle <I> where I: Clone , 1.0.0 · Source § impl<I> Clone for Enumerate <I> where I: Clone , 1.0.0 · Source § impl<I> Clone for Fuse <I> where I: Clone , Source § impl<I> Clone for Intersperse <I> where I: Clone + Iterator , <I as Iterator >:: Item : Clone , 1.0.0 · Source § impl<I> Clone for Peekable <I> where I: Clone + Iterator , <I as Iterator >:: Item : Clone , 1.0.0 · Source § impl<I> Clone for Skip <I> where I: Clone , 1.28.0 · Source § impl<I> Clone for StepBy <I> where I: Clone , 1.0.0 · Source § impl<I> Clone for Take <I> where I: Clone , 1.0.0 · Source § impl<I, F> Clone for FilterMap <I, F> where I: Clone , F: Clone , 1.0.0 · Source § impl<I, F> Clone for Inspect <I, F> where I: Clone , F: Clone , 1.0.0 · Source § impl<I, F> Clone for Map <I, F> where I: Clone , F: Clone , Source § impl<I, F, const N: usize > Clone for MapWindows <I, F, N> where I: Iterator + Clone , F: Clone , <I as Iterator >:: Item : Clone , Source § impl<I, G> Clone for IntersperseWith <I, G> where I: Iterator + Clone , <I as Iterator >:: Item : Clone , G: Clone , 1.0.0 · Source § impl<I, P> Clone for Filter <I, P> where I: Clone , P: Clone , 1.57.0 · Source § impl<I, P> Clone for MapWhile <I, P> where I: Clone , P: Clone , 1.0.0 · Source § impl<I, P> Clone for SkipWhile <I, P> where I: Clone , P: Clone , 1.0.0 · Source § impl<I, P> Clone for TakeWhile <I, P> where I: Clone , P: Clone , 1.0.0 · Source § impl<I, St, F> Clone for Scan <I, St, F> where I: Clone , St: Clone , F: Clone , 1.29.0 · Source § impl<I, U> Clone for Flatten <I> where I: Clone + Iterator , <I as Iterator >:: Item : IntoIterator <IntoIter = U, Item = <U as Iterator >:: Item >, U: Clone + Iterator , 1.0.0 · Source § impl<I, U, F> Clone for FlatMap <I, U, F> where I: Clone , F: Clone , U: Clone + IntoIterator , <U as IntoIterator >:: IntoIter : Clone , Source § impl<I, const N: usize > Clone for ArrayChunks <I, N> where I: Clone + Iterator , <I as Iterator >:: Item : Clone , 1.0.0 · Source § impl<Idx> Clone for std::ops:: Range <Idx> where Idx: Clone , 1.0.0 · Source § impl<Idx> Clone for std::ops:: RangeFrom <Idx> where Idx: Clone , 1.26.0 · Source § impl<Idx> Clone for std::ops:: RangeInclusive <Idx> where Idx: Clone , 1.0.0 · Source § impl<Idx> Clone for RangeTo <Idx> where Idx: Clone , 1.26.0 · Source § impl<Idx> Clone for std::ops:: RangeToInclusive <Idx> where Idx: Clone , Source § impl<Idx> Clone for std::range:: Range <Idx> where Idx: Clone , Source § impl<Idx> Clone for std::range:: RangeFrom <Idx> where Idx: Clone , Source § impl<Idx> Clone for std::range:: RangeInclusive <Idx> where Idx: Clone , Source § impl<Idx> Clone for std::range:: RangeToInclusive <Idx> where Idx: Clone , 1.0.0 · Source § impl<K> Clone for std::collections::hash_set:: Iter <'_, K> Source § impl<K, V> Clone for std::collections::btree_map:: Cursor <'_, K, V> 1.0.0 · Source § impl<K, V> Clone for std::collections::btree_map:: Iter <'_, K, V> 1.0.0 · Source § impl<K, V> Clone for std::collections::btree_map:: Keys <'_, K, V> 1.17.0 · Source § impl<K, V> Clone for std::collections::btree_map:: Range <'_, K, V> 1.0.0 · Source § impl<K, V> Clone for std::collections::btree_map:: Values <'_, K, V> 1.0.0 · Source § impl<K, V> Clone for std::collections::hash_map:: Iter <'_, K, V> 1.0.0 · Source § impl<K, V> Clone for std::collections::hash_map:: Keys <'_, K, V> 1.0.0 · Source § impl<K, V> Clone for std::collections::hash_map:: Values <'_, K, V> 1.0.0 · Source § impl<K, V, A> Clone for BTreeMap <K, V, A> where K: Clone , V: Clone , A: Allocator + Clone , 1.0.0 · Source § impl<K, V, S> Clone for HashMap <K, V, S> where K: Clone , V: Clone , S: Clone , 1.33.0 · Source § impl<Ptr> Clone for Pin <Ptr> where Ptr: Clone , 1.0.0 · Source § impl<T> ! Clone for &mut T where T: ? Sized , Shared references can be cloned, but mutable references cannot ! 1.17.0 · Source § impl<T> Clone for Bound <T> where T: Clone , 1.0.0 (const: unstable ) · Source § impl<T> Clone for Option <T> where T: Clone , 1.36.0 · Source § impl<T> Clone for Poll <T> where T: Clone , 1.0.0 (const: unstable ) · Source § impl<T> Clone for *const T where T: ? Sized , 1.0.0 (const: unstable ) · Source § impl<T> Clone for *mut T where T: ? Sized , 1.0.0 (const: unstable ) · Source § impl<T> Clone for &T where T: ? Sized , Shared references can be cloned, but mutable references cannot ! 1.0.0 · Source § impl<T> Clone for Cell <T> where T: Copy , 1.70.0 · Source § impl<T> Clone for OnceCell <T> where T: Clone , 1.0.0 · Source § impl<T> Clone for RefCell <T> where T: Clone , 1.19.0 · Source § impl<T> Clone for Reverse <T> where T: Clone , 1.0.0 · Source § impl<T> Clone for std::collections::binary_heap:: Iter <'_, T> 1.0.0 · Source § impl<T> Clone for std::collections::btree_set:: Iter <'_, T> 1.17.0 · Source § impl<T> Clone for std::collections::btree_set:: Range <'_, T> 1.0.0 · Source § impl<T> Clone for std::collections::btree_set:: SymmetricDifference <'_, T> 1.0.0 · Source § impl<T> Clone for std::collections::btree_set:: Union <'_, T> 1.0.0 · Source § impl<T> Clone for std::collections::linked_list:: Iter <'_, T> 1.0.0 · Source § impl<T> Clone for std::collections::vec_deque:: Iter <'_, T> 1.48.0 · Source § impl<T> Clone for Pending <T> 1.48.0 · Source § impl<T> Clone for Ready <T> where T: Clone , 1.0.0 · Source § impl<T> Clone for std::io:: Cursor <T> where T: Clone , 1.2.0 · Source § impl<T> Clone for std::iter:: Empty <T> 1.2.0 · Source § impl<T> Clone for Once <T> where T: Clone , 1.0.0 · Source § impl<T> Clone for Rev <T> where T: Clone , Source § impl<T> Clone for PhantomContravariant <T> where T: ? Sized , Source § impl<T> Clone for PhantomCovariant <T> where T: ? Sized , 1.0.0 · Source § impl<T> Clone for PhantomData <T> where T: ? Sized , Source § impl<T> Clone for PhantomInvariant <T> where T: ? Sized , 1.21.0 · Source § impl<T> Clone for Discriminant <T> 1.20.0 · Source § impl<T> Clone for ManuallyDrop <T> where T: Clone + ? Sized , 1.28.0 · Source § impl<T> Clone for NonZero <T> where T: ZeroablePrimitive , 1.74.0 · Source § impl<T> Clone for Saturating <T> where T: Clone , 1.0.0 · Source § impl<T> Clone for Wrapping <T> where T: Clone , 1.25.0 · Source § impl<T> Clone for NonNull <T> where T: ? Sized , 1.0.0 · Source § impl<T> Clone for std::result:: IntoIter <T> where T: Clone , 1.0.0 · Source § impl<T> Clone for std::result:: Iter <'_, T> 1.0.0 · Source § impl<T> Clone for Chunks <'_, T> 1.31.0 · Source § impl<T> Clone for ChunksExact <'_, T> 1.0.0 · Source § impl<T> Clone for std::slice:: Iter <'_, T> 1.31.0 · Source § impl<T> Clone for RChunks <'_, T> 1.0.0 · Source § impl<T> Clone for Windows <'_, T> Source § impl<T> Clone for Receiver <T> Source § impl<T> Clone for std::sync::mpmc:: Sender <T> 1.0.0 · Source § impl<T> Clone for std::sync::mpsc:: Sender <T> 1.0.0 · Source § impl<T> Clone for SyncSender <T> Source § impl<T> Clone for Exclusive <T> where T: Sync + Clone , 1.36.0 · Source § impl<T> Clone for MaybeUninit <T> where T: Copy , 1.3.0 · Source § impl<T, A> Clone for Box < [T] , A> where T: Clone , A: Allocator + Clone , 1.0.0 · Source § impl<T, A> Clone for Box <T, A> where T: Clone , A: Allocator + Clone , 1.0.0 · Source § impl<T, A> Clone for std::collections::binary_heap:: IntoIter <T, A> where T: Clone , A: Clone + Allocator , Source § impl<T, A> Clone for IntoIterSorted <T, A> where T: Clone , A: Clone + Allocator , 1.0.0 · Source § impl<T, A> Clone for std::collections::btree_set:: Difference <'_, T, A> where A: Allocator + Clone , 1.0.0 · Source § impl<T, A> Clone for std::collections::btree_set:: Intersection <'_, T, A> where A: Allocator + Clone , Source § impl<T, A> Clone for std::collections::linked_list:: Cursor <'_, T, A> where A: Allocator , 1.0.0 · Source § impl<T, A> Clone for std::collections::linked_list:: IntoIter <T, A> where T: Clone , A: Clone + Allocator , 1.0.0 · Source § impl<T, A> Clone for BTreeSet <T, A> where T: Clone , A: Allocator + Clone , 1.0.0 · Source § impl<T, A> Clone for BinaryHeap <T, A> where T: Clone , A: Allocator + Clone , 1.0.0 · Source § impl<T, A> Clone for LinkedList <T, A> where T: Clone , A: Allocator + Clone , 1.0.0 · Source § impl<T, A> Clone for VecDeque <T, A> where T: Clone , A: Allocator + Clone , 1.0.0 · Source § impl<T, A> Clone for std::collections::vec_deque:: IntoIter <T, A> where T: Clone , A: Clone + Allocator , 1.0.0 · Source § impl<T, A> Clone for Rc <T, A> where A: Allocator + Clone , T: ? Sized , 1.4.0 · Source § impl<T, A> Clone for std::rc:: Weak <T, A> where A: Allocator + Clone , T: ? Sized , 1.0.0 · Source § impl<T, A> Clone for Arc <T, A> where A: Allocator + Clone , T: ? Sized , 1.4.0 · Source § impl<T, A> Clone for std::sync:: Weak <T, A> where A: Allocator + Clone , T: ? Sized , 1.8.0 · Source § impl<T, A> Clone for std::vec:: IntoIter <T, A> where T: Clone , A: Allocator + Clone , 1.0.0 · Source § impl<T, A> Clone for Vec <T, A> where T: Clone , A: Allocator + Clone , 1.0.0 · Source § impl<T, E> Clone for Result <T, E> where T: Clone , E: Clone , 1.34.0 · Source § impl<T, F> Clone for Successors <T, F> where T: Clone , F: Clone , 1.27.0 · Source § impl<T, P> Clone for std::slice:: RSplit <'_, T, P> where P: Clone + FnMut ( &T ) -> bool , 1.0.0 · Source § impl<T, P> Clone for std::slice:: Split <'_, T, P> where P: Clone + FnMut ( &T ) -> bool , 1.51.0 · Source § impl<T, P> Clone for std::slice:: SplitInclusive <'_, T, P> where P: Clone + FnMut ( &T ) -> bool , 1.0.0 · Source § impl<T, S> Clone for std::collections::hash_set:: Difference <'_, T, S> 1.0.0 · Source § impl<T, S> Clone for std::collections::hash_set:: Intersection <'_, T, S> 1.0.0 · Source § impl<T, S> Clone for std::collections::hash_set:: SymmetricDifference <'_, T, S> 1.0.0 · Source § impl<T, S> Clone for std::collections::hash_set:: Union <'_, T, S> 1.0.0 · Source § impl<T, S> Clone for HashSet <T, S> where T: Clone , S: Clone , 1.58.0 · Source § impl<T, const N: usize > Clone for [T; N] where T: Clone , 1.51.0 · Source § impl<T, const N: usize > Clone for std::array:: IntoIter <T, N> where T: Clone , Source § impl<T, const N: usize > Clone for Mask <T, N> where T: MaskElement , LaneCount <N>: SupportedLaneCount , Source § impl<T, const N: usize > Clone for Simd <T, N> where LaneCount <N>: SupportedLaneCount , T: SimdElement , Source § impl<T: Clone > Clone for SendTimeoutError <T> 1.0.0 · Source § impl<T: Clone > Clone for TrySendError <T> 1.0.0 · Source § impl<T: Clone > Clone for SendError <T> 1.70.0 · Source § impl<T: Clone > Clone for OnceLock <T> Source § impl<Y, R> Clone for CoroutineState <Y, R> where Y: Clone , R: Clone , | 2026-01-13T09:29:14 |
Telegram Messenger English Bahasa Indonesia Bahasa Melayu Deutsch Español Français Italiano Nederlands O‘zbek Polski Português (Brasil) Türkçe Беларуская Русский Українська Қазақша العربية فارسی 한국어 Twitter Home FAQ Apps API Moderation Recent News Jan 3 AI Summaries, New Design and More Dec 12 Passkeys, Gift Purchase Offers and More Nov 19 Live Stories, Repeated Messages, Auctions for Gifts and More a new era of messaging Telegram for Android Telegram for iPhone / iPad Telegram for Windows / Mac / Linux Browse more Telegram apps Telegram for PC / Linux Telegram for macOS Recent News AI Summaries, New Design and More Telegram's first update of 2026 brings even more Liquid Glass interfaces on iOS and AI summaries for channel posts and Instant View pages — built to maximize privacy and protect user… Jan 3, 2026 Passkeys, Gift Purchase Offers and More In today's update, we add secure passkeys for instant login without SMS codes, gift purchase offers with built-in scam protection, and a simple way to add audio from your profile to… Dec 12, 2025 Why Telegram? Simple Telegram is so simple you already know how to use it. Private Telegram messages are heavily encrypted and can self-destruct. Synced Telegram lets you access your chats from multiple devices. Fast Telegram delivers messages faster than any other application. Powerful Telegram has no limits on the size of your media and chats. Open Telegram has an open API and source code free for everyone. Secure Telegram keeps your messages safe from hacker attacks. Social Telegram groups can hold up to 200,000 members. Expressive Telegram lets you completely customize your messenger. Telegram Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed. About FAQ Privacy Press Mobile Apps iPhone/iPad Android Mobile Web Desktop Apps PC/Mac/Linux macOS Web-browser Platform API Translations Instant View About Blog Press Moderation | 2026-01-13T09:29:14 | |
https://doc.rust-lang.org/std/error/trait.Error.html#method.downcast_ref-2 | Error in std::error - Rust This old browser is unsupported and will most likely display funky things. Error std 1.92.0 (ded5c06cf 2025-12-08) Error Sections Error source Example Provided Methods cause description provide source Methods downcast downcast downcast downcast_mut downcast_mut downcast_mut downcast_ref downcast_ref downcast_ref is is is sources Trait Implementations From<&str> From<&str> From<Cow<'b, str>> From<Cow<'b, str>> From<E> From<E> From<String> From<String> Implementors In std:: error std :: error Trait Error Copy item path 1.0.0 · Source pub trait Error: Debug + Display { // Provided methods fn source (&self) -> Option <&(dyn Error + 'static)> { ... } fn description (&self) -> & str { ... } fn cause (&self) -> Option <&dyn Error > { ... } fn provide <'a>(&'a self, request: &mut Request <'a>) { ... } } Expand description Error is a trait representing the basic expectations for error values, i.e., values of type E in Result<T, E> . Errors must describe themselves through the Display and Debug traits. Error messages are typically concise lowercase sentences without trailing punctuation: let err = "NaN" .parse::<u32>().unwrap_err(); assert_eq! (err.to_string(), "invalid digit found in string" ); § Error source Errors may provide cause information. Error::source() is generally used when errors cross “abstraction boundaries”. If one module must report an error that is caused by an error from a lower-level module, it can allow accessing that error via Error::source() . This makes it possible for the high-level module to provide its own errors while also revealing some of the implementation for debugging. In error types that wrap an underlying error, the underlying error should be either returned by the outer error’s Error::source() , or rendered by the outer error’s Display implementation, but not both. § Example Implementing the Error trait only requires that Debug and Display are implemented too. use std::error::Error; use std::fmt; use std::path::PathBuf; #[derive(Debug)] struct ReadConfigError { path: PathBuf } impl fmt::Display for ReadConfigError { fn fmt( & self , f: &mut fmt::Formatter< '_ >) -> fmt::Result { let path = self .path.display(); write! (f, "unable to read configuration at {path}" ) } } impl Error for ReadConfigError {} Provided Methods § 1.30.0 · Source fn source (&self) -> Option <&(dyn Error + 'static)> Returns the lower-level source of this error, if any. § Examples use std::error::Error; use std::fmt; #[derive(Debug)] struct SuperError { source: SuperErrorSideKick, } impl fmt::Display for SuperError { fn fmt( & self , f: &mut fmt::Formatter< '_ >) -> fmt::Result { write! (f, "SuperError is here!" ) } } impl Error for SuperError { fn source( & self ) -> Option < & ( dyn Error + 'static )> { Some ( & self .source) } } #[derive(Debug)] struct SuperErrorSideKick; impl fmt::Display for SuperErrorSideKick { fn fmt( & self , f: &mut fmt::Formatter< '_ >) -> fmt::Result { write! (f, "SuperErrorSideKick is here!" ) } } impl Error for SuperErrorSideKick {} fn get_super_error() -> Result <(), SuperError> { Err (SuperError { source: SuperErrorSideKick }) } fn main() { match get_super_error() { Err (e) => { println! ( "Error: {e}" ); println! ( "Caused by: {}" , e.source().unwrap()); } _ => println! ( "No error" ), } } 1.0.0 · Source fn description (&self) -> & str 👎 Deprecated since 1.42.0: use the Display impl or to_string() if let Err (e) = "xc" .parse::<u32>() { // Print `e` itself, no need for description(). eprintln! ( "Error: {e}" ); } 1.0.0 · Source fn cause (&self) -> Option <&dyn Error > 👎 Deprecated since 1.33.0: replaced by Error::source, which can support downcasting Source fn provide <'a>(&'a self, request: &mut Request <'a>) 🔬 This is a nightly-only experimental API. ( error_generic_member_access #99301 ) Provides type-based access to context intended for error reports. Used in conjunction with Request::provide_value and Request::provide_ref to extract references to member variables from dyn Error trait objects. § Example #![feature(error_generic_member_access)] use core::fmt; use core::error::{request_ref, Request}; #[derive(Debug)] enum MyLittleTeaPot { Empty, } #[derive(Debug)] struct MyBacktrace { // ... } impl MyBacktrace { fn new() -> MyBacktrace { // ... } } #[derive(Debug)] struct Error { backtrace: MyBacktrace, } impl fmt::Display for Error { fn fmt( & self , f: &mut fmt::Formatter< '_ >) -> fmt::Result { write! (f, "Example Error" ) } } impl std::error::Error for Error { fn provide< 'a >( & 'a self , request: &mut Request< 'a >) { request .provide_ref::<MyBacktrace>( & self .backtrace); } } fn main() { let backtrace = MyBacktrace::new(); let error = Error { backtrace }; let dyn_error = & error as & dyn std::error::Error; let backtrace_ref = request_ref::<MyBacktrace>(dyn_error).unwrap(); assert! (core::ptr::eq( & error.backtrace, backtrace_ref)); assert! (request_ref::<MyLittleTeaPot>(dyn_error).is_none()); } Implementations § Source § impl dyn Error 1.3.0 · Source pub fn is <T>(&self) -> bool where T: Error + 'static, Returns true if the inner type is the same as T . 1.3.0 · Source pub fn downcast_ref <T>(&self) -> Option < &T > where T: Error + 'static, Returns some reference to the inner value if it is of type T , or None if it isn’t. 1.3.0 · Source pub fn downcast_mut <T>(&mut self) -> Option < &mut T > where T: Error + 'static, Returns some mutable reference to the inner value if it is of type T , or None if it isn’t. Source § impl dyn Error + Send 1.3.0 · Source pub fn is <T>(&self) -> bool where T: Error + 'static, Forwards to the method defined on the type dyn Error . 1.3.0 · Source pub fn downcast_ref <T>(&self) -> Option < &T > where T: Error + 'static, Forwards to the method defined on the type dyn Error . 1.3.0 · Source pub fn downcast_mut <T>(&mut self) -> Option < &mut T > where T: Error + 'static, Forwards to the method defined on the type dyn Error . Source § impl dyn Error + Send + Sync 1.3.0 · Source pub fn is <T>(&self) -> bool where T: Error + 'static, Forwards to the method defined on the type dyn Error . 1.3.0 · Source pub fn downcast_ref <T>(&self) -> Option < &T > where T: Error + 'static, Forwards to the method defined on the type dyn Error . 1.3.0 · Source pub fn downcast_mut <T>(&mut self) -> Option < &mut T > where T: Error + 'static, Forwards to the method defined on the type dyn Error . Source § impl dyn Error Source pub fn sources (&self) -> Source <'_> ⓘ 🔬 This is a nightly-only experimental API. ( error_iter #58520 ) Returns an iterator starting with the current error and continuing with recursively calling Error::source . If you want to omit the current error and only use its sources, use skip(1) . § Examples #![feature(error_iter)] use std::error::Error; use std::fmt; #[derive(Debug)] struct A; #[derive(Debug)] struct B( Option <Box< dyn Error + 'static >>); impl fmt::Display for A { fn fmt( & self , f: &mut fmt::Formatter< '_ >) -> fmt::Result { write! (f, "A" ) } } impl fmt::Display for B { fn fmt( & self , f: &mut fmt::Formatter< '_ >) -> fmt::Result { write! (f, "B" ) } } impl Error for A {} impl Error for B { fn source( & self ) -> Option < & ( dyn Error + 'static )> { self . 0 .as_ref().map(|e| e.as_ref()) } } let b = B( Some (Box::new(A))); // let err : Box<Error> = b.into(); // or let err = & b as & dyn Error; let mut iter = err.sources(); assert_eq! ( "B" .to_string(), iter.next().unwrap().to_string()); assert_eq! ( "A" .to_string(), iter.next().unwrap().to_string()); assert! (iter.next().is_none()); assert! (iter.next().is_none()); Source § impl dyn Error 1.3.0 · Source pub fn downcast <T>(self: Box <dyn Error >) -> Result < Box <T>, Box <dyn Error >> where T: Error + 'static, Attempts to downcast the box to a concrete type. Source § impl dyn Error + Send 1.3.0 · Source pub fn downcast <T>( self: Box <dyn Error + Send >, ) -> Result < Box <T>, Box <dyn Error + Send >> where T: Error + 'static, Attempts to downcast the box to a concrete type. Source § impl dyn Error + Send + Sync 1.3.0 · Source pub fn downcast <T>( self: Box <dyn Error + Send + Sync >, ) -> Result < Box <T>, Box <dyn Error + Send + Sync >> where T: Error + 'static, Attempts to downcast the box to a concrete type. Trait Implementations § 1.6.0 · Source § impl<'a> From <& str > for Box <dyn Error + 'a> Source § fn from (err: & str ) -> Box <dyn Error + 'a> Converts a str into a box of dyn Error . § Examples use std::error::Error; let a_str_error = "a str error" ; let a_boxed_error = Box::< dyn Error>::from(a_str_error); assert! (size_of::<Box< dyn Error>>() == size_of_val( & a_boxed_error)) 1.0.0 · Source § impl<'a> From <& str > for Box <dyn Error + Send + Sync + 'a> Source § fn from (err: & str ) -> Box <dyn Error + Send + Sync + 'a> Converts a str into a box of dyn Error + Send + Sync . § Examples use std::error::Error; let a_str_error = "a str error" ; let a_boxed_error = Box::< dyn Error + Send + Sync>::from(a_str_error); assert! ( size_of::<Box< dyn Error + Send + Sync>>() == size_of_val( & a_boxed_error)) 1.22.0 · Source § impl<'a, 'b> From < Cow <'b, str >> for Box <dyn Error + 'a> Source § fn from (err: Cow <'b, str >) -> Box <dyn Error + 'a> Converts a Cow into a box of dyn Error . § Examples use std::error::Error; use std::borrow::Cow; let a_cow_str_error = Cow::from( "a str error" ); let a_boxed_error = Box::< dyn Error>::from(a_cow_str_error); assert! (size_of::<Box< dyn Error>>() == size_of_val( & a_boxed_error)) 1.22.0 · Source § impl<'a, 'b> From < Cow <'b, str >> for Box <dyn Error + Send + Sync + 'a> Source § fn from (err: Cow <'b, str >) -> Box <dyn Error + Send + Sync + 'a> Converts a Cow into a box of dyn Error + Send + Sync . § Examples use std::error::Error; use std::borrow::Cow; let a_cow_str_error = Cow::from( "a str error" ); let a_boxed_error = Box::< dyn Error + Send + Sync>::from(a_cow_str_error); assert! ( size_of::<Box< dyn Error + Send + Sync>>() == size_of_val( & a_boxed_error)) 1.0.0 · Source § impl<'a, E> From <E> for Box <dyn Error + 'a> where E: Error + 'a, Source § fn from (err: E) -> Box <dyn Error + 'a> Converts a type of Error into a box of dyn Error . § Examples use std::error::Error; use std::fmt; #[derive(Debug)] struct AnError; impl fmt::Display for AnError { fn fmt( & self , f: &mut fmt::Formatter< '_ >) -> fmt::Result { write! (f, "An error" ) } } impl Error for AnError {} let an_error = AnError; assert! ( 0 == size_of_val( & an_error)); let a_boxed_error = Box::< dyn Error>::from(an_error); assert! (size_of::<Box< dyn Error>>() == size_of_val( & a_boxed_error)) 1.0.0 · Source § impl<'a, E> From <E> for Box <dyn Error + Send + Sync + 'a> where E: Error + Send + Sync + 'a, Source § fn from (err: E) -> Box <dyn Error + Send + Sync + 'a> Converts a type of Error + Send + Sync into a box of dyn Error + Send + Sync . § Examples use std::error::Error; use std::fmt; #[derive(Debug)] struct AnError; impl fmt::Display for AnError { fn fmt( & self , f: &mut fmt::Formatter< '_ >) -> fmt::Result { write! (f, "An error" ) } } impl Error for AnError {} unsafe impl Send for AnError {} unsafe impl Sync for AnError {} let an_error = AnError; assert! ( 0 == size_of_val( & an_error)); let a_boxed_error = Box::< dyn Error + Send + Sync>::from(an_error); assert! ( size_of::<Box< dyn Error + Send + Sync>>() == size_of_val( & a_boxed_error)) 1.6.0 · Source § impl<'a> From < String > for Box <dyn Error + 'a> Source § fn from (str_err: String ) -> Box <dyn Error + 'a> Converts a String into a box of dyn Error . § Examples use std::error::Error; let a_string_error = "a string error" .to_string(); let a_boxed_error = Box::< dyn Error>::from(a_string_error); assert! (size_of::<Box< dyn Error>>() == size_of_val( & a_boxed_error)) 1.0.0 · Source § impl<'a> From < String > for Box <dyn Error + Send + Sync + 'a> Source § fn from (err: String ) -> Box <dyn Error + Send + Sync + 'a> Converts a String into a box of dyn Error + Send + Sync . § Examples use std::error::Error; let a_string_error = "a string error" .to_string(); let a_boxed_error = Box::< dyn Error + Send + Sync>::from(a_string_error); assert! ( size_of::<Box< dyn Error + Send + Sync>>() == size_of_val( & a_boxed_error)) Implementors § 1.65.0 · Source § impl ! Error for & str 1.8.0 · Source § impl Error for Infallible 1.0.0 · Source § impl Error for VarError 1.17.0 · Source § impl Error for FromBytesWithNulError 1.89.0 · Source § impl Error for std::fs:: TryLockError 1.86.0 · Source § impl Error for GetDisjointMutError 1.15.0 · Source § impl Error for RecvTimeoutError 1.0.0 · Source § impl Error for TryRecvError Source § impl Error for ! Source § impl Error for AllocError 1.28.0 · Source § impl Error for LayoutError 1.34.0 · Source § impl Error for TryFromSliceError 1.13.0 · Source § impl Error for BorrowError 1.13.0 · Source § impl Error for BorrowMutError 1.34.0 · Source § impl Error for CharTryFromError 1.9.0 · Source § impl Error for DecodeUtf16Error 1.20.0 · Source § impl Error for ParseCharError 1.59.0 · Source § impl Error for TryFromCharError Source § impl Error for UnorderedKeyError 1.57.0 · Source § impl Error for TryReserveError 1.0.0 · Source § impl Error for JoinPathsError 1.69.0 · Source § impl Error for FromBytesUntilNulError 1.58.0 · Source § impl Error for FromVecWithNulError 1.7.0 · Source § impl Error for IntoStringError 1.0.0 · Source § impl Error for NulError 1.11.0 · Source § impl Error for std::fmt:: Error 1.0.0 · Source § impl Error for std::io:: Error 1.56.0 · Source § impl Error for WriterPanicked 1.4.0 · Source § impl Error for AddrParseError 1.0.0 · Source § impl Error for ParseFloatError 1.0.0 · Source § impl Error for ParseIntError 1.34.0 · Source § impl Error for TryFromIntError 1.63.0 · Source § impl Error for InvalidHandleError Available on Windows only. 1.63.0 · Source § impl Error for NullHandleError Available on Windows only. Source § impl Error for NormalizeError 1.7.0 · Source § impl Error for StripPrefixError Source § impl Error for ExitStatusError 1.0.0 · Source § impl Error for ParseBoolError 1.0.0 · Source § impl Error for Utf8Error 1.0.0 · Source § impl Error for FromUtf8Error 1.0.0 · Source § impl Error for FromUtf16Error 1.0.0 · Source § impl Error for RecvError 1.26.0 · Source § impl Error for AccessError 1.8.0 · Source § impl Error for SystemTimeError 1.66.0 · Source § impl Error for TryFromFloatSecsError Source § impl<'a, K, V> Error for std::collections::btree_map:: OccupiedError <'a, K, V> where K: Debug + Ord , V: Debug , Source § impl<'a, K: Debug , V: Debug > Error for std::collections::hash_map:: OccupiedError <'a, K, V> 1.51.0 · Source § impl<'a, T> Error for &'a T where T: Error + ? Sized , 1.8.0 · Source § impl<E> Error for Box <E> where E: Error , 1.0.0 · Source § impl<T> Error for std::sync:: TryLockError <T> Source § impl<T> Error for SendTimeoutError <T> 1.0.0 · Source § impl<T> Error for TrySendError <T> Source § impl<T> Error for ThinBox <T> where T: Error + ? Sized , 1.0.0 · Source § impl<T> Error for SendError <T> 1.52.0 · Source § impl<T> Error for Arc <T> where T: Error + ? Sized , 1.0.0 · Source § impl<T> Error for PoisonError <T> 1.0.0 · Source § impl<W: Send + Debug > Error for IntoInnerError <W> | 2026-01-13T09:29:14 |
https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/sys/conf/newvers.sh#rev1.1 | CVS log for src/sys/conf/newvers.sh CVS log for src/sys/conf/newvers.sh Up to [local] / src / sys / conf Request diff between arbitrary revisions Default branch: MAIN Revision 1.212.2.1 / ( download ) - annotate - [select for diffs] , Thu Oct 23 21:23:34 2025 UTC (2 months, 2 weeks ago) by bluhm Branch: OPENBSD_7_8 Changes since 1.212: +3 -3 lines Diff to previous 1.212 ( colored ) next main 1.213 ( colored ) 7.8-stable Revision 1.213 / ( download ) - annotate - [select for diffs] , Wed Oct 8 21:55:19 2025 UTC (3 months ago) by jsg Branch: MAIN CVS Tags: HEAD Changes since 1.212: +3 -3 lines Diff to previous 1.212 ( colored ) 7.8-current ok deraadt@ Revision 1.212 / ( download ) - annotate - [select for diffs] , Tue Sep 30 14:49:51 2025 UTC (3 months, 1 week ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_7_8_BASE Branch point for: OPENBSD_7_8 Changes since 1.211: +3 -3 lines Diff to previous 1.211 ( colored ) move out of -beta Revision 1.211 / ( download ) - annotate - [select for diffs] , Wed Sep 10 16:00:04 2025 UTC (4 months ago) by deraadt Branch: MAIN Changes since 1.210: +4 -4 lines Diff to previous 1.210 ( colored ) crank to 7.8-beta Revision 1.209.4.1 / ( download ) - annotate - [select for diffs] , Mon Apr 28 13:06:32 2025 UTC (8 months, 2 weeks ago) by bluhm Branch: OPENBSD_7_7 Changes since 1.209: +3 -3 lines Diff to previous 1.209 ( colored ) next main 1.210 ( colored ) 7.7-stable Revision 1.210 / ( download ) - annotate - [select for diffs] , Sat Apr 12 02:13:14 2025 UTC (9 months ago) by deraadt Branch: MAIN Changes since 1.209: +3 -3 lines Diff to previous 1.209 ( colored ) now working on 7.7-current Revision 1.209 / ( download ) - annotate - [select for diffs] , Sun Mar 30 20:43:36 2025 UTC (9 months, 2 weeks ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_7_7_BASE Branch point for: OPENBSD_7_7 Changes since 1.208: +3 -3 lines Diff to previous 1.208 ( colored ) head out of -beta to 7.7 Revision 1.208 / ( download ) - annotate - [select for diffs] , Sat Mar 1 19:44:07 2025 UTC (10 months, 1 week ago) by deraadt Branch: MAIN Changes since 1.207: +4 -4 lines Diff to previous 1.207 ( colored ) move to 7.7-beta Revision 1.205.2.1 / ( download ) - annotate - [select for diffs] , Tue Oct 8 11:42:49 2024 UTC (15 months ago) by bluhm Branch: OPENBSD_7_6 Changes since 1.205: +3 -3 lines Diff to previous 1.205 ( colored ) next main 1.206 ( colored ) 7.6-stable Revision 1.207 / ( download ) - annotate - [select for diffs] , Mon Sep 23 21:05:28 2024 UTC (15 months, 2 weeks ago) by deraadt Branch: MAIN Changes since 1.206: +2 -2 lines Diff to previous 1.206 ( colored ) now hacking on 7.6-current (corrected) Revision 1.206 / ( download ) - annotate - [select for diffs] , Mon Sep 23 20:50:47 2024 UTC (15 months, 2 weeks ago) by deraadt Branch: MAIN Changes since 1.205: +2 -2 lines Diff to previous 1.205 ( colored ) now hacking on 7.6-current Revision 1.205 / ( download ) - annotate - [select for diffs] , Tue Sep 17 13:39:17 2024 UTC (15 months, 3 weeks ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_7_6_BASE Branch point for: OPENBSD_7_6 Changes since 1.204: +3 -3 lines Diff to previous 1.204 ( colored ) head into release Revision 1.204 / ( download ) - annotate - [select for diffs] , Wed Aug 7 15:59:24 2024 UTC (17 months ago) by deraadt Branch: MAIN Changes since 1.203: +4 -4 lines Diff to previous 1.203 ( colored ) crank to 7.6-beta, release date is vague Revision 1.202.2.1 / ( download ) - annotate - [select for diffs] , Wed Apr 3 20:36:37 2024 UTC (21 months, 1 week ago) by bluhm Branch: OPENBSD_7_5 Changes since 1.202: +3 -3 lines Diff to previous 1.202 ( colored ) next main 1.203 ( colored ) 7.5-stable Revision 1.203 / ( download ) - annotate - [select for diffs] , Tue Mar 12 01:20:30 2024 UTC (22 months ago) by deraadt Branch: MAIN Changes since 1.202: +3 -3 lines Diff to previous 1.202 ( colored ) moving on to 7.5-current Revision 1.202 / ( download ) - annotate - [select for diffs] , Thu Feb 29 17:05:10 2024 UTC (22 months, 2 weeks ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_7_5_BASE Branch point for: OPENBSD_7_5 Changes since 1.201: +3 -3 lines Diff to previous 1.201 ( colored ) move from 7.5-beta to 7.5 Revision 1.201 / ( download ) - annotate - [select for diffs] , Sat Feb 17 16:13:24 2024 UTC (22 months, 3 weeks ago) by deraadt Branch: MAIN Changes since 1.200: +4 -4 lines Diff to previous 1.200 ( colored ) move to 7.5-beta Revision 1.200 / ( download ) - annotate - [select for diffs] , Tue Jan 2 16:40:03 2024 UTC (2 years ago) by bluhm Branch: MAIN Changes since 1.199: +2 -3 lines Diff to previous 1.199 ( colored ) Revert chunk that I have commited by accident. Revision 1.199 / ( download ) - annotate - [select for diffs] , Tue Jan 2 16:32:47 2024 UTC (2 years ago) by bluhm Branch: MAIN Changes since 1.198: +3 -2 lines Diff to previous 1.198 ( colored ) Prevent simultaneous dt(4) open. Syskaller has hit the assertion "dtlookup(unit) == NULL" by opening dt(4) device in two parallel threads. Convert kassert into if condition. Move check that device is not used after sleep points in malloc. The list dtdev_list is protected by kernel lock which is released during sleep. Reported-by: syzbot+6d66c21f796c817948f0@syzkaller.appspotmail.com OK miod@ Revision 1.197.2.1 / ( download ) - annotate - [select for diffs] , Fri Oct 20 19:05:11 2023 UTC (2 years, 2 months ago) by bluhm Branch: OPENBSD_7_4 Changes since 1.197: +3 -3 lines Diff to previous 1.197 ( colored ) next main 1.198 ( colored ) 7.4-stable Revision 1.198 / ( download ) - annotate - [select for diffs] , Wed Oct 4 15:40:13 2023 UTC (2 years, 3 months ago) by bluhm Branch: MAIN Changes since 1.197: +3 -3 lines Diff to previous 1.197 ( colored ) base is unlocked, move to 7.4-current OK deraadt@ Revision 1.197 / ( download ) - annotate - [select for diffs] , Tue Sep 26 13:27:32 2023 UTC (2 years, 3 months ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_7_4_BASE Branch point for: OPENBSD_7_4 Changes since 1.196: +3 -3 lines Diff to previous 1.196 ( colored ) we are heading out of -beta Revision 1.196 / ( download ) - annotate - [select for diffs] , Mon Sep 18 13:16:13 2023 UTC (2 years, 3 months ago) by deraadt Branch: MAIN Changes since 1.195: +4 -4 lines Diff to previous 1.195 ( colored ) crank to 7.4-beta Revision 1.194.4.1 / ( download ) - annotate - [select for diffs] , Tue Apr 11 15:45:40 2023 UTC (2 years, 9 months ago) by bluhm Branch: OPENBSD_7_3 Changes since 1.194: +3 -3 lines Diff to previous 1.194 ( colored ) next main 1.195 ( colored ) 7.3-stable Revision 1.195 / ( download ) - annotate - [select for diffs] , Sat Mar 25 05:49:50 2023 UTC (2 years, 9 months ago) by deraadt Branch: MAIN Changes since 1.194: +3 -3 lines Diff to previous 1.194 ( colored ) we are now hacking on 7.3-current Revision 1.194 / ( download ) - annotate - [select for diffs] , Fri Mar 17 22:52:22 2023 UTC (2 years, 9 months ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_7_3_BASE Branch point for: OPENBSD_7_3 Changes since 1.193: +3 -3 lines Diff to previous 1.193 ( colored ) remove -beta tag Revision 1.193 / ( download ) - annotate - [select for diffs] , Sat Mar 4 14:49:37 2023 UTC (2 years, 10 months ago) by deraadt Branch: MAIN Changes since 1.192: +4 -4 lines Diff to previous 1.192 ( colored ) move to 7.3-beta Revision 1.191.2.1 / ( download ) - annotate - [select for diffs] , Thu Oct 20 09:44:17 2022 UTC (3 years, 2 months ago) by bluhm Branch: OPENBSD_7_2 Changes since 1.191: +3 -3 lines Diff to previous 1.191 ( colored ) next main 1.192 ( colored ) 7.2-stable Revision 1.192 / ( download ) - annotate - [select for diffs] , Tue Sep 27 02:39:24 2022 UTC (3 years, 3 months ago) by deraadt Branch: MAIN Changes since 1.191: +3 -3 lines Diff to previous 1.191 ( colored ) we are now working on 7.2-current Revision 1.191 / ( download ) - annotate - [select for diffs] , Sun Sep 11 14:27:09 2022 UTC (3 years, 4 months ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_7_2_BASE Branch point for: OPENBSD_7_2 Changes since 1.190: +3 -3 lines Diff to previous 1.190 ( colored ) drop the -beta Revision 1.190 / ( download ) - annotate - [select for diffs] , Wed Jul 20 15:12:38 2022 UTC (3 years, 5 months ago) by deraadt Branch: MAIN Changes since 1.189: +4 -4 lines Diff to previous 1.189 ( colored ) move to 7.2-beta. this gets done very early, to avoid finding out version number issues close to release Revision 1.188.4.1 / ( download ) - annotate - [select for diffs] , Thu Apr 21 21:44:09 2022 UTC (3 years, 8 months ago) by bluhm Branch: OPENBSD_7_1 Changes since 1.188: +3 -3 lines Diff to previous 1.188 ( colored ) next main 1.189 ( colored ) 7.1-stable Revision 1.189 / ( download ) - annotate - [select for diffs] , Tue Apr 5 16:25:30 2022 UTC (3 years, 9 months ago) by deraadt Branch: MAIN Changes since 1.188: +3 -3 lines Diff to previous 1.188 ( colored ) back to working on 7.1-current Revision 1.188 / ( download ) - annotate - [select for diffs] , Tue Mar 29 03:11:18 2022 UTC (3 years, 9 months ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_7_1_BASE Branch point for: OPENBSD_7_1 Changes since 1.187: +3 -3 lines Diff to previous 1.187 ( colored ) close enough to release, we drop -beta Revision 1.187 / ( download ) - annotate - [select for diffs] , Sun Feb 20 20:54:29 2022 UTC (3 years, 10 months ago) by sthen Branch: MAIN Changes since 1.186: +3 -3 lines Diff to previous 1.186 ( colored ) we should be 7.1-beta not 7.1-current Revision 1.186 / ( download ) - annotate - [select for diffs] , Sun Feb 20 17:11:05 2022 UTC (3 years, 10 months ago) by deraadt Branch: MAIN Changes since 1.185: +3 -3 lines Diff to previous 1.185 ( colored ) move to 7.1-beta Revision 1.184.2.1 / ( download ) - annotate - [select for diffs] , Fri Oct 22 16:05:34 2021 UTC (4 years, 2 months ago) by bluhm Branch: OPENBSD_7_0 Changes since 1.184: +3 -3 lines Diff to previous 1.184 ( colored ) next main 1.185 ( colored ) 7.0-stable Revision 1.185 / ( download ) - annotate - [select for diffs] , Wed Sep 22 18:21:35 2021 UTC (4 years, 3 months ago) by deraadt Branch: MAIN Changes since 1.184: +3 -3 lines Diff to previous 1.184 ( colored ) we are now working on 7.0-current Revision 1.184 / ( download ) - annotate - [select for diffs] , Mon Sep 13 04:02:15 2021 UTC (4 years, 4 months ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_7_0_BASE Branch point for: OPENBSD_7_0 Changes since 1.183: +3 -3 lines Diff to previous 1.183 ( colored ) take us out of beta Revision 1.183 / ( download ) - annotate - [select for diffs] , Tue Aug 17 15:03:55 2021 UTC (4 years, 4 months ago) by deraadt Branch: MAIN Changes since 1.182: +4 -4 lines Diff to previous 1.182 ( colored ) 7.0-beta Revision 1.182 / ( download ) - annotate - [select for diffs] , Sun May 2 22:10:13 2021 UTC (4 years, 8 months ago) by bluhm Branch: MAIN Changes since 1.181: +2 -1 lines Diff to previous 1.181 ( colored ) Put -stable template into #if 0 section of current newvers.sh. OK deraadt@ Revision 1.180.2.1 / ( download ) - annotate - [select for diffs] , Sun May 2 12:56:59 2021 UTC (4 years, 8 months ago) by bluhm Branch: OPENBSD_6_9 Changes since 1.180: +3 -2 lines Diff to previous 1.180 ( colored ) next main 1.181 ( colored ) 6.9-stable Revision 1.181 / ( download ) - annotate - [select for diffs] , Sun Apr 18 23:40:52 2021 UTC (4 years, 8 months ago) by deraadt Branch: MAIN Changes since 1.180: +3 -3 lines Diff to previous 1.180 ( colored ) post 6.9 development continues... Revision 1.180 / ( download ) - annotate - [select for diffs] , Sun Apr 4 23:03:07 2021 UTC (4 years, 9 months ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_6_9_BASE Branch point for: OPENBSD_6_9 Changes since 1.179: +3 -3 lines Diff to previous 1.179 ( colored ) leave -beta Revision 1.179 / ( download ) - annotate - [select for diffs] , Sat Feb 6 21:26:19 2021 UTC (4 years, 11 months ago) by deraadt Branch: MAIN Changes since 1.178: +4 -4 lines Diff to previous 1.178 ( colored ) 6.9-beta Revision 1.177.4.1 / ( download ) - annotate - [select for diffs] , Mon Oct 26 21:06:03 2020 UTC (5 years, 2 months ago) by bluhm Branch: OPENBSD_6_8 Changes since 1.177: +2 -2 lines Diff to previous 1.177 ( colored ) next main 1.178 ( colored ) 6.8-stable Revision 1.178 / ( download ) - annotate - [select for diffs] , Wed Sep 30 14:46:02 2020 UTC (5 years, 3 months ago) by jsg Branch: MAIN Changes since 1.177: +3 -3 lines Diff to previous 1.177 ( colored ) 6.8-current ok deraadt@ Revision 1.177 / ( download ) - annotate - [select for diffs] , Fri Sep 25 05:12:39 2020 UTC (5 years, 3 months ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_6_8_BASE Branch point for: OPENBSD_6_8 Changes since 1.176: +3 -3 lines Diff to previous 1.176 ( colored ) take us out of -beta Revision 1.176 / ( download ) - annotate - [select for diffs] , Mon Aug 31 16:08:28 2020 UTC (5 years, 4 months ago) by deraadt Branch: MAIN Changes since 1.175: +4 -4 lines Diff to previous 1.175 ( colored ) crank to 6.8-beta Revision 1.174.4.1 / ( download ) - annotate - [select for diffs] , Tue May 19 17:32:04 2020 UTC (5 years, 7 months ago) by bluhm Branch: OPENBSD_6_7 Changes since 1.174: +2 -2 lines Diff to previous 1.174 ( colored ) next main 1.175 ( colored ) 6.7-stable Revision 1.175 / ( download ) - annotate - [select for diffs] , Thu May 7 18:46:35 2020 UTC (5 years, 8 months ago) by deraadt Branch: MAIN Changes since 1.174: +3 -3 lines Diff to previous 1.174 ( colored ) post-6.7 development continues Revision 1.174 / ( download ) - annotate - [select for diffs] , Mon May 4 15:00:35 2020 UTC (5 years, 8 months ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_6_7_BASE Branch point for: OPENBSD_6_7 Changes since 1.173: +3 -3 lines Diff to previous 1.173 ( colored ) leave -beta. Revision 1.173 / ( download ) - annotate - [select for diffs] , Sun Apr 5 06:34:20 2020 UTC (5 years, 9 months ago) by deraadt Branch: MAIN Changes since 1.172: +4 -4 lines Diff to previous 1.172 ( colored ) crank to 6.7-beta Revision 1.171.2.1 / ( download ) - annotate - [select for diffs] , Tue Oct 22 12:21:46 2019 UTC (6 years, 2 months ago) by bluhm Branch: OPENBSD_6_6 Changes since 1.171: +2 -2 lines Diff to previous 1.171 ( colored ) next main 1.172 ( colored ) 6.6-stable Revision 1.172 / ( download ) - annotate - [select for diffs] , Sat Oct 12 14:42:51 2019 UTC (6 years, 3 months ago) by deraadt Branch: MAIN Changes since 1.171: +3 -3 lines Diff to previous 1.171 ( colored ) we are now hacking on 6.6-current Revision 1.171 / ( download ) - annotate - [select for diffs] , Tue Oct 1 17:19:03 2019 UTC (6 years, 3 months ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_6_6_BASE Branch point for: OPENBSD_6_6 Changes since 1.170: +3 -3 lines Diff to previous 1.170 ( colored ) stop this -current stuff Revision 1.170 / ( download ) - annotate - [select for diffs] , Sat Aug 10 11:49:50 2019 UTC (6 years, 5 months ago) by naddy Branch: MAIN Changes since 1.169: +2 -2 lines Diff to previous 1.169 ( colored ) really crank to 6.6-beta Revision 1.169 / ( download ) - annotate - [select for diffs] , Sat Aug 10 03:56:02 2019 UTC (6 years, 5 months ago) by deraadt Branch: MAIN Changes since 1.168: +3 -3 lines Diff to previous 1.168 ( colored ) move to 6.6-beta Revision 1.167.2.1 / ( download ) - annotate - [select for diffs] , Wed May 1 21:02:07 2019 UTC (6 years, 8 months ago) by bluhm Branch: OPENBSD_6_5 Changes since 1.167: +2 -2 lines Diff to previous 1.167 ( colored ) next main 1.168 ( colored ) 6.5-stable Revision 1.168 / ( download ) - annotate - [select for diffs] , Sat Apr 13 17:35:07 2019 UTC (6 years, 9 months ago) by deraadt Branch: MAIN Changes since 1.167: +3 -3 lines Diff to previous 1.167 ( colored ) unlock tree, we are now working on 6.5-current Revision 1.167 / ( download ) - annotate - [select for diffs] , Tue Apr 2 08:30:38 2019 UTC (6 years, 9 months ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_6_5_BASE Branch point for: OPENBSD_6_5 Changes since 1.166: +3 -3 lines Diff to previous 1.166 ( colored ) Move to 6.5 release rathe than -beta. That means "pkg_add -u -Dsnap" becomes the norm until release is out. Revision 1.166 / ( download ) - annotate - [select for diffs] , Tue Feb 26 22:24:41 2019 UTC (6 years, 10 months ago) by deraadt Branch: MAIN Changes since 1.165: +4 -4 lines Diff to previous 1.165 ( colored ) crank to 6.5-beta Revision 1.164.2.1 / ( download ) - annotate - [select for diffs] , Wed Oct 31 15:46:20 2018 UTC (7 years, 2 months ago) by bluhm Branch: OPENBSD_6_4 Changes since 1.164: +2 -2 lines Diff to previous 1.164 ( colored ) next main 1.165 ( colored ) 6.4-stable Revision 1.165 / ( download ) - annotate - [select for diffs] , Sat Oct 13 15:16:29 2018 UTC (7 years, 3 months ago) by deraadt Branch: MAIN Changes since 1.164: +3 -3 lines Diff to previous 1.164 ( colored ) we are now working on 6.4-current Revision 1.164 / ( download ) - annotate - [select for diffs] , Sat Sep 29 16:00:44 2018 UTC (7 years, 3 months ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_6_4_BASE Branch point for: OPENBSD_6_4 Changes since 1.163: +3 -3 lines Diff to previous 1.163 ( colored ) unmark -beta. There is still development happening, and we aren't locked in stone yet, but the clock starts ticking... Revision 1.163 / ( download ) - annotate - [select for diffs] , Fri Aug 10 20:27:01 2018 UTC (7 years, 5 months ago) by deraadt Branch: MAIN Changes since 1.162: +4 -4 lines Diff to previous 1.162 ( colored ) crank to 6.4-beta Revision 1.161.2.1 / ( download ) - annotate - [select for diffs] , Mon Apr 2 17:20:40 2018 UTC (7 years, 9 months ago) by bluhm Branch: OPENBSD_6_3 Changes since 1.161: +2 -2 lines Diff to previous 1.161 ( colored ) next main 1.162 ( colored ) 6.3-stable Revision 1.162 / ( download ) - annotate - [select for diffs] , Tue Mar 27 06:10:05 2018 UTC (7 years, 9 months ago) by deraadt Branch: MAIN Changes since 1.161: +3 -3 lines Diff to previous 1.161 ( colored ) take us to 6.3-current Revision 1.161 / ( download ) - annotate - [select for diffs] , Wed Mar 14 16:52:09 2018 UTC (7 years, 10 months ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_6_3_BASE Branch point for: OPENBSD_6_3 Changes since 1.160: +3 -3 lines Diff to previous 1.160 ( colored ) we head to release soon Revision 1.160 / ( download ) - annotate - [select for diffs] , Wed Feb 28 15:07:44 2018 UTC (7 years, 10 months ago) by deraadt Branch: MAIN Changes since 1.159: +2 -2 lines Diff to previous 1.159 ( colored ) oops, skipped a step cranking to 6.3-beta Revision 1.159 / ( download ) - annotate - [select for diffs] , Wed Feb 28 14:56:46 2018 UTC (7 years, 10 months ago) by deraadt Branch: MAIN Changes since 1.158: +3 -3 lines Diff to previous 1.158 ( colored ) move to 6.3-beta Revision 1.158 / ( download ) - annotate - [select for diffs] , Tue Feb 6 08:42:33 2018 UTC (7 years, 11 months ago) by tb Branch: MAIN Changes since 1.157: +3 -1 lines Diff to previous 1.157 ( colored ) Run newvers.sh with umask 007 to work around permission issues that cause 'make release' fail the first time around after building GENERIC if /usr/obj/ wasn't cleaned out properly. The proper fix would be to implement privdrop for kernel builds but this is trickier than it looks at first sight. discussed with deraadt Revision 1.155.2.1 / ( download ) - annotate - [select for diffs] , Mon Oct 9 17:15:23 2017 UTC (8 years, 3 months ago) by bluhm Branch: OPENBSD_6_2 Changes since 1.155: +2 -2 lines Diff to previous 1.155 ( colored ) next main 1.156 ( colored ) 6.2-stable Revision 1.157 / ( download ) - annotate - [select for diffs] , Wed Oct 4 17:59:41 2017 UTC (8 years, 3 months ago) by benno Branch: MAIN Changes since 1.156: +4 -1 lines Diff to previous 1.156 ( colored ) reminder to create <version>.html and roll errata pages for release. ok deraadt@ Revision 1.156 / ( download ) - annotate - [select for diffs] , Wed Oct 4 17:37:16 2017 UTC (8 years, 3 months ago) by deraadt Branch: MAIN Changes since 1.155: +3 -3 lines Diff to previous 1.155 ( colored ) 6.2-current, back to work Revision 1.155 / ( download ) - annotate - [select for diffs] , Mon Sep 25 06:45:54 2017 UTC (8 years, 3 months ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_6_2_BASE Branch point for: OPENBSD_6_2 Changes since 1.154: +3 -3 lines Diff to previous 1.154 ( colored ) take us out of -beta Revision 1.154 / ( download ) - annotate - [select for diffs] , Sun Aug 20 16:56:43 2017 UTC (8 years, 4 months ago) by deraadt Branch: MAIN Changes since 1.153: +4 -4 lines Diff to previous 1.153 ( colored ) crank to 6.2-beta Revision 1.152.4.1 / ( download ) - annotate - [select for diffs] , Tue May 2 07:35:55 2017 UTC (8 years, 8 months ago) by jsg Branch: OPENBSD_6_1 Changes since 1.152: +2 -2 lines Diff to previous 1.152 ( colored ) next main 1.153 ( colored ) 6.1-stable Revision 1.153 / ( download ) - annotate - [select for diffs] , Sun Apr 2 00:27:36 2017 UTC (8 years, 9 months ago) by deraadt Branch: MAIN Changes since 1.152: +3 -3 lines Diff to previous 1.152 ( colored ) unlock tree, we are now hacking on 6.1-current Revision 1.152 / ( download ) - annotate - [select for diffs] , Wed Mar 29 01:39:27 2017 UTC (8 years, 9 months ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_6_1_BASE Branch point for: OPENBSD_6_1 Changes since 1.151: +3 -3 lines Diff to previous 1.151 ( colored ) move to 6.1 release, drop -beta tag Revision 1.151 / ( download ) - annotate - [select for diffs] , Sat Mar 4 16:52:47 2017 UTC (8 years, 10 months ago) by deraadt Branch: MAIN Changes since 1.150: +4 -4 lines Diff to previous 1.150 ( colored ) crank to 6.1-beta Revision 1.150 / ( download ) - annotate - [select for diffs] , Tue Jan 24 11:59:41 2017 UTC (8 years, 11 months ago) by tb Branch: MAIN Changes since 1.149: +2 -2 lines Diff to previous 1.149 ( colored ) logname(1) uses getlogin(2) to determine the user associated with the current session. This way kernels built during 'make release' should again have names such as deraadt@... bluhm@... instead of build@... in most environments. Issue reported by bluhm on icb eons ago. ok deraadt Revision 1.149 / ( download ) - annotate - [select for diffs] , Sun Oct 16 17:31:36 2016 UTC (9 years, 2 months ago) by tb Branch: MAIN Changes since 1.148: +2 -2 lines Diff to previous 1.148 ( colored ) Strip trailing obj/ from kernel build directories, so kernels are again marked with GENERIC{,.MP} RAMDISK, etc. Problem noticed by several (jsg, semarie, ...) ok many (sthen, natano, millert, deraadt, ...) Explanations why quotes aren't necessary by even more. Thanks! Revision 1.148 / ( download ) - annotate - [select for diffs] , Thu Sep 1 14:12:07 2016 UTC (9 years, 4 months ago) by tedu Branch: MAIN Changes since 1.147: +2 -2 lines Diff to previous 1.147 ( colored ) make the version symbol a fixed size (512) to reduce the potential for bad effects when savecore reads beyond it ok deraadt (and thanks to bluhm for remembering that this happens) Revision 1.146.2.1 / ( download ) - annotate - [select for diffs] , Tue Aug 2 09:48:40 2016 UTC (9 years, 5 months ago) by benno Branch: OPENBSD_6_0 Changes since 1.146: +2 -2 lines Diff to previous 1.146 ( colored ) next main 1.147 ( colored ) OPENBSD_6_0 is now -stable ok deraadt@ Revision 1.147 / ( download ) - annotate - [select for diffs] , Tue Jul 26 17:57:14 2016 UTC (9 years, 5 months ago) by kettenis Branch: MAIN Changes since 1.146: +3 -3 lines Diff to previous 1.146 ( colored ) Welcome to 6.0-current. ok deraadt@ Revision 1.146 / ( download ) - annotate - [select for diffs] , Fri Jul 15 05:06:24 2016 UTC (9 years, 6 months ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_6_0_BASE Branch point for: OPENBSD_6_0 Changes since 1.145: +3 -3 lines Diff to previous 1.145 ( colored ) take us out of -beta Revision 1.145 / ( download ) - annotate - [select for diffs] , Wed May 11 18:01:33 2016 UTC (9 years, 8 months ago) by deraadt Branch: MAIN Changes since 1.144: +4 -4 lines Diff to previous 1.144 ( colored ) crank to 6.0-beta Revision 1.143.2.1 / ( download ) - annotate - [select for diffs] , Thu Mar 24 05:08:56 2016 UTC (9 years, 9 months ago) by jsg Branch: OPENBSD_5_9 Changes since 1.143: +2 -2 lines Diff to previous 1.143 ( colored ) next main 1.144 ( colored ) 5.9-stable Revision 1.144 / ( download ) - annotate - [select for diffs] , Thu Feb 25 00:31:25 2016 UTC (9 years, 10 months ago) by deraadt Branch: MAIN Changes since 1.143: +3 -3 lines Diff to previous 1.143 ( colored ) we are now hacking on 5.9-current Revision 1.143 / ( download ) - annotate - [select for diffs] , Mon Feb 1 22:15:30 2016 UTC (9 years, 11 months ago) by jsg Branch: MAIN CVS Tags: OPENBSD_5_9_BASE Branch point for: OPENBSD_5_9 Changes since 1.142: +3 -3 lines Diff to previous 1.142 ( colored ) move to -release mode requested by deraadt@ Revision 1.142 / ( download ) - annotate - [select for diffs] , Wed Jan 6 23:14:05 2016 UTC (10 years ago) by benno Branch: MAIN Changes since 1.141: +3 -1 lines Diff to previous 1.141 ( colored ) document the signify command for the next release, so that users can verify before the netx upgrade. document that signify.1 needs an edit bump once in a while. ok tedu@ florian@ Revision 1.141 / ( download ) - annotate - [select for diffs] , Sat Dec 19 19:44:09 2015 UTC (10 years ago) by deraadt Branch: MAIN Changes since 1.140: +4 -4 lines Diff to previous 1.140 ( colored ) move to 5.9-beta Revision 1.139.4.1 / ( download ) - annotate - [select for diffs] , Sat Sep 5 11:31:55 2015 UTC (10 years, 4 months ago) by sthen Branch: OPENBSD_5_8 Changes since 1.139: +2 -2 lines Diff to previous 1.139 ( colored ) next main 1.140 ( colored ) 5.8-stable Revision 1.140 / ( download ) - annotate - [select for diffs] , Mon Aug 10 20:31:00 2015 UTC (10 years, 5 months ago) by jca Branch: MAIN Changes since 1.139: +3 -3 lines Diff to previous 1.139 ( colored ) Back to -current. Revision 1.139 / ( download ) - annotate - [select for diffs] , Thu Jul 23 16:26:57 2015 UTC (10 years, 5 months ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_5_8_BASE Branch point for: OPENBSD_5_8 Changes since 1.138: +3 -3 lines Diff to previous 1.138 ( colored ) remove -beta tag. take that as a hint. Revision 1.138 / ( download ) - annotate - [select for diffs] , Wed Jun 17 19:52:18 2015 UTC (10 years, 6 months ago) by deraadt Branch: MAIN Changes since 1.137: +4 -4 lines Diff to previous 1.137 ( colored ) move to 5.8-beta. This is a bit earlier than normal... Revision 1.136.2.1 / ( download ) - annotate - [select for diffs] , Sun Mar 22 01:13:32 2015 UTC (10 years, 9 months ago) by tedu Branch: OPENBSD_5_7 Changes since 1.136: +2 -2 lines Diff to previous 1.136 ( colored ) next main 1.137 ( colored ) -stable Revision 1.137 / ( download ) - annotate - [select for diffs] , Mon Mar 9 20:08:55 2015 UTC (10 years, 10 months ago) by miod Branch: MAIN Changes since 1.136: +3 -3 lines Diff to previous 1.136 ( colored ) If my calculations are correct, when this baby hits 5.8... you're gonna see some serious shit. Revision 1.136 / ( download ) - annotate - [select for diffs] , Wed Mar 4 14:31:13 2015 UTC (10 years, 10 months ago) by jsg Branch: MAIN CVS Tags: OPENBSD_5_7_BASE Branch point for: OPENBSD_5_7 Changes since 1.135: +3 -3 lines Diff to previous 1.135 ( colored ) move to -release mode ok deraadt@ Revision 1.135 / ( download ) - annotate - [select for diffs] , Thu Jan 1 15:50:27 2015 UTC (11 years ago) by deraadt Branch: MAIN Changes since 1.134: +4 -4 lines Diff to previous 1.134 ( colored ) move to 5.7-beta Revision 1.133.4.1 / ( download ) - annotate - [select for diffs] , Sun Sep 7 03:07:16 2014 UTC (11 years, 4 months ago) by jsg Branch: OPENBSD_5_6 Changes since 1.133: +2 -2 lines Diff to previous 1.133 ( colored ) next main 1.134 ( colored ) 5.6-stable Revision 1.134 / ( download ) - annotate - [select for diffs] , Mon Aug 11 18:33:36 2014 UTC (11 years, 5 months ago) by miod Branch: MAIN Changes since 1.133: +3 -3 lines Diff to previous 1.133 ( colored ) -current dammit Revision 1.133 / ( download ) - annotate - [select for diffs] , Tue Jul 29 12:56:41 2014 UTC (11 years, 5 months ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_5_6_BASE Branch point for: OPENBSD_5_6 Changes since 1.132: +3 -3 lines Diff to previous 1.132 ( colored ) move to -release mode Revision 1.132 / ( download ) - annotate - [select for diffs] , Tue Jul 15 21:59:17 2014 UTC (11 years, 6 months ago) by deraadt Branch: MAIN Changes since 1.131: +4 -4 lines Diff to previous 1.131 ( colored ) crank to 5.6-beta Revision 1.130.4.1 / ( download ) - annotate - [select for diffs] , Sat May 3 19:32:01 2014 UTC (11 years, 8 months ago) by jsg Branch: OPENBSD_5_5 Changes since 1.130: +2 -2 lines Diff to previous 1.130 ( colored ) next main 1.131 ( colored ) 5.5-stable Revision 1.131 / ( download ) - annotate - [select for diffs] , Wed Mar 5 18:54:32 2014 UTC (11 years, 10 months ago) by chris Branch: MAIN Changes since 1.130: +3 -3 lines Diff to previous 1.130 ( colored ) We are now 5.5-current Revision 1.130 / ( download ) - annotate - [select for diffs] , Sat Feb 22 03:53:45 2014 UTC (11 years, 10 months ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_5_5_BASE Branch point for: OPENBSD_5_5 Changes since 1.129: +3 -3 lines Diff to previous 1.129 ( colored ) take us to -release mode Revision 1.129 / ( download ) - annotate - [select for diffs] , Sun Jan 12 11:26:08 2014 UTC (12 years ago) by deraadt Branch: MAIN Changes since 1.128: +4 -4 lines Diff to previous 1.128 ( colored ) crank to 5.5beta Revision 1.127.2.1 / ( download ) - annotate - [select for diffs] , Sun Nov 3 11:24:51 2013 UTC (12 years, 2 months ago) by sthen Branch: OPENBSD_5_4 Changes since 1.127: +2 -2 lines Diff to previous 1.127 ( colored ) next main 1.128 ( colored ) -stable, for mitja :) Revision 1.128 / ( download ) - annotate - [select for diffs] , Mon Jul 29 18:43:50 2013 UTC (12 years, 5 months ago) by kettenis Branch: MAIN Changes since 1.127: +3 -3 lines Diff to previous 1.127 ( colored ) and we're hacking on 5.4-current now Revision 1.127 / ( download ) - annotate - [select for diffs] , Wed Jul 17 13:35:57 2013 UTC (12 years, 6 months ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_5_4_BASE Branch point for: OPENBSD_5_4 Changes since 1.126: +3 -3 lines Diff to previous 1.126 ( colored ) no longer beta; get moving towards release Revision 1.126 / ( download ) - annotate - [select for diffs] , Sun Jul 7 18:11:50 2013 UTC (12 years, 6 months ago) by deraadt Branch: MAIN Changes since 1.125: +4 -4 lines Diff to previous 1.125 ( colored ) move to 5.4-beta Revision 1.123.2.1 / ( download ) - annotate - [select for diffs] , Sun May 5 19:41:53 2013 UTC (12 years, 8 months ago) by sthen Branch: OPENBSD_5_3 Changes since 1.123: +2 -2 lines Diff to previous 1.123 ( colored ) next main 1.124 ( colored ) switch to -stable suffix, reminded by mitja Revision 1.125 / ( download ) - annotate - [select for diffs] , Tue Apr 9 18:47:14 2013 UTC (12 years, 9 months ago) by mlarkin Branch: MAIN Changes since 1.124: +2 -2 lines Diff to previous 1.124 ( colored ) newvers.sh uses 'basename' to determine the directory name to stamp the kernel version ID with, but it did not account for spaces in the name, leading to version strings like "OpenBSD 5.3-current ()". Quote the call to basename to permit paths with spaces in the name. ok halex@, deraadt@ Revision 1.124 / ( download ) - annotate - [select for diffs] , Fri Mar 1 21:06:04 2013 UTC (12 years, 10 months ago) by guenther Branch: MAIN Changes since 1.123: +3 -3 lines Diff to previous 1.123 ( colored ) Antici pation: back to -current Revision 1.123 / ( download ) - annotate - [select for diffs] , Thu Feb 21 15:26:20 2013 UTC (12 years, 10 months ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_5_3_BASE Branch point for: OPENBSD_5_3 Changes since 1.122: +3 -3 lines Diff to previous 1.122 ( colored ) go to release Revision 1.122 / ( download ) - annotate - [select for diffs] , Thu Jan 31 23:30:40 2013 UTC (12 years, 11 months ago) by miod Branch: MAIN Changes since 1.121: +4 -4 lines Diff to previous 1.121 ( colored ) welcome to 5.3-BETA Revision 1.120.2.1 / ( download ) - annotate - [select for diffs] , Wed Dec 19 18:51:03 2012 UTC (13 years ago) by jj Branch: OPENBSD_5_2 Changes since 1.120: +2 -2 lines Diff to previous 1.120 ( colored ) next main 1.121 ( colored ) enter -stable. ok deraadt@, reported by Mitja M. Revision 1.121 / ( download ) - annotate - [select for diffs] , Thu Jul 26 15:51:22 2012 UTC (13 years, 5 months ago) by otto Branch: MAIN Changes since 1.120: +3 -3 lines Diff to previous 1.120 ( colored ) move to -current Revision 1.120 / ( download ) - annotate - [select for diffs] , Mon Jul 16 10:50:07 2012 UTC (13 years, 6 months ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_5_2_BASE Branch point for: OPENBSD_5_2 Changes since 1.119: +3 -3 lines Diff to previous 1.119 ( colored ) and we head towards release Revision 1.119 / ( download ) - annotate - [select for diffs] , Wed Jun 20 21:40:55 2012 UTC (13 years, 6 months ago) by deraadt Branch: MAIN Changes since 1.118: +4 -4 lines Diff to previous 1.118 ( colored ) move to 5.2-beta Revision 1.117.2.1 / ( download ) - annotate - [select for diffs] , Mon Apr 23 13:55:06 2012 UTC (13 years, 8 months ago) by henning Branch: OPENBSD_5_1 Changes since 1.117: +2 -2 lines Diff to previous 1.117 ( colored ) next main 1.118 ( colored ) enter -stable Revision 1.118 / ( download ) - annotate - [select for diffs] , Tue Feb 14 19:25:05 2012 UTC (13 years, 11 months ago) by kettenis Branch: MAIN Changes since 1.117: +3 -3 lines Diff to previous 1.117 ( colored ) we are now hacking on 5.1-current Revision 1.117 / ( download ) - annotate - [select for diffs] , Tue Feb 7 17:30:00 2012 UTC (13 years, 11 months ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_5_1_BASE Branch point for: OPENBSD_5_1 Changes since 1.116: +3 -3 lines Diff to previous 1.116 ( colored ) move out of -beta Revision 1.116 / ( download ) - annotate - [select for diffs] , Thu Jan 12 00:35:59 2012 UTC (14 years ago) by sthen Branch: MAIN Changes since 1.115: +2 -2 lines Diff to previous 1.115 ( colored ) s/5.0/5.1/, ok deraadt@ Revision 1.115 / ( download ) - annotate - [select for diffs] , Wed Jan 11 22:11:35 2012 UTC (14 years ago) by deraadt Branch: MAIN Changes since 1.114: +3 -3 lines Diff to previous 1.114 ( colored ) crank to 5.1-beta Revision 1.113.2.1 / ( download ) - annotate - [select for diffs] , Wed Oct 5 10:44:46 2011 UTC (14 years, 3 months ago) by henning Branch: OPENBSD_5_0 Changes since 1.113: +2 -2 lines Diff to previous 1.113 ( colored ) next main 1.114 ( colored ) enter -stable Revision 1.114 / ( download ) - annotate - [select for diffs] , Tue Aug 16 21:00:48 2011 UTC (14 years, 5 months ago) by kettenis Branch: MAIN Changes since 1.113: +3 -3 lines Diff to previous 1.113 ( colored ) we are now hacking on 5.0-current requested by deraadt@ Revision 1.113 / ( download ) - annotate - [select for diffs] , Wed Aug 3 18:45:55 2011 UTC (14 years, 5 months ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_5_0_BASE Branch point for: OPENBSD_5_0 Changes since 1.112: +3 -3 lines Diff to previous 1.112 ( colored ) move to release Revision 1.112 / ( download ) - annotate - [select for diffs] , Mon Jul 18 07:07:52 2011 UTC (14 years, 6 months ago) by deraadt Branch: MAIN Changes since 1.111: +4 -4 lines Diff to previous 1.111 ( colored ) take us to 5.0-beta Revision 1.110.2.1 / ( download ) - annotate - [select for diffs] , Wed Apr 20 14:16:54 2011 UTC (14 years, 8 months ago) by henning Branch: OPENBSD_4_9 Changes since 1.110: +2 -2 lines Diff to previous 1.110 ( colored ) next main 1.111 ( colored ) enter -stable Revision 1.111 / ( download ) - annotate - [select for diffs] , Wed Mar 2 01:58:39 2011 UTC (14 years, 10 months ago) by deraadt Branch: MAIN Changes since 1.110: +3 -3 lines Diff to previous 1.110 ( colored ) we are now hacking on 4.9-current Revision 1.110 / ( download ) - annotate - [select for diffs] , Tue Feb 15 07:14:45 2011 UTC (14 years, 11 months ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_4_9_BASE Branch point for: OPENBSD_4_9 Changes since 1.109: +3 -3 lines Diff to previous 1.109 ( colored ) move us to real 4.9 Revision 1.109 / ( download ) - annotate - [select for diffs] , Thu Jan 13 23:17:50 2011 UTC (15 years ago) by deraadt Branch: MAIN Changes since 1.108: +4 -4 lines Diff to previous 1.108 ( colored ) move to 4.9-current Revision 1.108 / ( download ) - annotate - [select for diffs] , Mon Oct 18 19:17:29 2010 UTC (15 years, 2 months ago) by deraadt Branch: MAIN Changes since 1.107: +1 -4 lines Diff to previous 1.107 ( colored ) tmac update no longer needed Revision 1.106.2.1 / ( download ) - annotate - [select for diffs] , Sat Oct 2 03:03:15 2010 UTC (15 years, 3 months ago) by william Branch: OPENBSD_4_8 Changes since 1.106: +2 -2 lines Diff to previous 1.106 ( colored ) next main 1.107 ( colored ) 4.8-stable ok deraadt Revision 1.107 / ( download ) - annotate - [select for diffs] , Thu Aug 12 00:25:24 2010 UTC (15 years, 5 months ago) by deraadt Branch: MAIN Changes since 1.106: +3 -3 lines Diff to previous 1.106 ( colored ) we are at -current again Revision 1.106 / ( download ) - annotate - [select for diffs] , Sun Aug 8 17:18:31 2010 UTC (15 years, 5 months ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_4_8_BASE Branch point for: OPENBSD_4_8 Changes since 1.105: +3 -3 lines Diff to previous 1.105 ( colored ) take us to release Revision 1.105 / ( download ) - annotate - [select for diffs] , Sat Jul 24 15:31:53 2010 UTC (15 years, 5 months ago) by deraadt Branch: MAIN Changes since 1.104: +4 -4 lines Diff to previous 1.104 ( colored ) move to 4.8-beta Revision 1.103.2.1 / ( download ) - annotate - [select for diffs] , Fri Jun 11 01:32:25 2010 UTC (15 years, 7 months ago) by william Branch: OPENBSD_4_7 Changes since 1.103: +2 -2 lines Diff to previous 1.103 ( colored ) next main 1.104 ( colored ) 4.7-stable; ok deraadt@ Revision 1.104 / ( download ) - annotate - [select for diffs] , Thu Mar 18 21:17:48 2010 UTC (15 years, 10 months ago) by otto Branch: MAIN Changes since 1.103: +5 -3 lines Diff to previous 1.103 ( colored ) move to 4.7-current Revision 1.103 / ( download ) - annotate - [select for diffs] , Fri Mar 5 10:59:35 2010 UTC (15 years, 10 months ago) by miod Branch: MAIN CVS Tags: OPENBSD_4_7_BASE Branch point for: OPENBSD_4_7 Changes since 1.102: +3 -3 lines Diff to previous 1.102 ( colored ) head towards release, correctly. tsk tsk tsk. Revision 1.102 / ( download ) - annotate - [select for diffs] , Fri Mar 5 08:54:01 2010 UTC (15 years, 10 months ago) by deraadt Branch: MAIN Changes since 1.101: +2 -2 lines Diff to previous 1.101 ( colored ) head towards release Revision 1.101 / ( download ) - annotate - [select for diffs] , Tue Jan 26 23:04:28 2010 UTC (15 years, 11 months ago) by miod Branch: MAIN Changes since 1.100: +4 -4 lines Diff to previous 1.100 ( colored ) 4.7-BETA (also, lo-carb and ozone layer friendly) Revision 1.99.4.1 / ( download ) - annotate - [select for diffs] , Sat Aug 8 10:41:41 2009 UTC (16 years, 5 months ago) by henning Branch: OPENBSD_4_6 Changes since 1.99: +2 -2 lines Diff to previous 1.99 ( colored ) next main 1.100 ( colored ) reveal identidy Revision 1.100 / ( download ) - annotate - [select for diffs] , Sun Jul 5 23:42:51 2009 UTC (16 years, 6 months ago) by dlg Branch: MAIN Changes since 1.99: +2 -2 lines Diff to previous 1.99 ( colored ) take us to 4.6-current Revision 1.99 / ( download ) - annotate - [select for diffs] , Wed Jul 1 15:10:25 2009 UTC (16 years, 6 months ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_4_6_BASE Branch point for: OPENBSD_4_6 Changes since 1.98: +3 -3 lines Diff to previous 1.98 ( colored ) take us to 4.6, though there will still be some changes Revision 1.98 / ( download ) - annotate - [select for diffs] , Sat Jun 20 23:38:12 2009 UTC (16 years, 6 months ago) by miod Branch: MAIN Changes since 1.97: +4 -6 lines Diff to previous 1.97 ( colored ) 4.6-BETA Revision 1.97 / ( download ) - annotate - [select for diffs] , Sun May 17 02:02:30 2009 UTC (16 years, 8 months ago) by deraadt Branch: MAIN Changes since 1.96: +1 -2 lines Diff to previous 1.96 ( colored ) the previous was a bug, and has been fixed Revision 1.96 / ( download ) - annotate - [select for diffs] , Sat May 16 22:24:11 2009 UTC (16 years, 8 months ago) by miod Branch: MAIN Changes since 1.95: +2 -1 lines Diff to previous 1.95 ( colored ) distrib/miniroot/install.sub now embeds the current version number in two places, update comments accordingly. Revision 1.94.2.1 / ( download ) - annotate - [select for diffs] , Fri May 1 05:42:44 2009 UTC (16 years, 8 months ago) by deraadt Branch: OPENBSD_4_5 Changes since 1.94: +2 -2 lines Diff to previous 1.94 ( colored ) next main 1.95 ( colored ) move OPENBSD_4_5 to -stable; Maurice Janssen Revision 1.95 / ( download ) - annotate - [select for diffs] , Sun Mar 1 02:21:07 2009 UTC (16 years, 10 months ago) by deraadt Branch: MAIN Changes since 1.94: +3 -3 lines Diff to previous 1.94 ( colored ) move to 4.5-current Revision 1.94 / ( download ) - annotate - [select for diffs] , Thu Feb 26 17:55:17 2009 UTC (16 years, 10 months ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_4_5_BASE Branch point for: OPENBSD_4_5 Changes since 1.93: +3 -3 lines Diff to previous 1.93 ( colored ) declare builds from around here to be 4.5 instead of 4.5-beta, though it is not really true since there are a few more (very important) things going in. Revision 1.93 / ( download ) - annotate - [select for diffs] , Sun Feb 8 21:02:22 2009 UTC (16 years, 11 months ago) by miod Branch: MAIN Changes since 1.92: +4 -4 lines Diff to previous 1.92 ( colored ) Move to 4.5-BETA Revision 1.91.2.1 / ( download ) - annotate - [select for diffs] , Sun Nov 2 03:54:55 2008 UTC (17 years, 2 months ago) by brad Branch: OPENBSD_4_4 Changes since 1.91: +3 -2 lines Diff to previous 1.91 ( colored ) next main 1.92 ( colored ) Here comes -stable. Revision 1.92 / ( download ) - annotate - [select for diffs] , Thu Aug 7 17:18:03 2008 UTC (17 years, 5 months ago) by deraadt Branch: MAIN Changes since 1.91: +3 -3 lines Diff to previous 1.91 ( colored ) we are at 4.4-current Revision 1.91 / ( download ) - annotate - [select for diffs] , Wed Aug 6 03:56:53 2008 UTC (17 years, 5 months ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_4_4_BASE Branch point for: OPENBSD_4_4 Changes since 1.90: +3 -3 lines Diff to previous 1.90 ( colored ) we are no longer in -beta Revision 1.90 / ( download ) - annotate - [select for diffs] , Wed Jul 2 00:13:32 2008 UTC (17 years, 6 months ago) by deraadt Branch: MAIN Changes since 1.89: +4 -4 lines Diff to previous 1.89 ( colored ) move to 4.4-beta Revision 1.88.2.1 / ( download ) - annotate - [select for diffs] , Wed Jun 4 09:26:46 2008 UTC (17 years, 7 months ago) by henning Branch: OPENBSD_4_3 Changes since 1.88: +2 -2 lines Diff to previous 1.88 ( colored ) next main 1.89 ( colored ) -stable; noticed by otto Revision 1.89 / ( download ) - annotate - [select for diffs] , Sat Mar 8 00:00:17 2008 UTC (17 years, 10 months ago) by deraadt Branch: MAIN Changes since 1.88: +3 -3 lines Diff to previous 1.88 ( colored ) move us to 4.3-current Revision 1.88 / ( download ) - annotate - [select for diffs] , Tue Mar 4 18:37:52 2008 UTC (17 years, 10 months ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_4_3_BASE Branch point for: OPENBSD_4_3 Changes since 1.87: +3 -3 lines Diff to previous 1.87 ( colored ) remove -beta Revision 1.87 / ( download ) - annotate - [select for diffs] , Wed Feb 20 17:46:51 2008 UTC (17 years, 10 months ago) by miod Branch: MAIN Changes since 1.86: +4 -4 lines Diff to previous 1.86 ( colored ) 4.3-beta Revision 1.85.2.1 / ( download ) - annotate - [select for diffs] , Thu Oct 11 11:30:19 2007 UTC (18 years, 3 months ago) by henning Branch: OPENBSD_4_2 Changes since 1.85: +2 -2 lines Diff to previous 1.85 ( colored ) next main 1.86 ( colored ) enter -stable Revision 1.86 / ( download ) - annotate - [select for diffs] , Tue Aug 21 18:53:28 2007 UTC (18 years, 4 months ago) by kettenis Branch: MAIN Changes since 1.85: +3 -3 lines Diff to previous 1.85 ( colored ) unlock tree, move towards 4.2-current requested by deraadt@ Revision 1.85 / ( download ) - annotate - [select for diffs] , Sun Aug 5 14:20:36 2007 UTC (18 years, 5 months ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_4_2_BASE Branch point for: OPENBSD_4_2 Changes since 1.84: +3 -3 lines Diff to previous 1.84 ( colored ) remove -beta Revision 1.84 / ( download ) - annotate - [select for diffs] , Wed Jul 25 20:07:27 2007 UTC (18 years, 5 months ago) by deraadt Branch: MAIN Changes since 1.83: +4 -4 lines Diff to previous 1.83 ( colored ) crank to 4.2-beta Revision 1.82.2.1 / ( download ) - annotate - [select for diffs] , Thu May 3 10:12:09 2007 UTC (18 years, 8 months ago) by henning Branch: OPENBSD_4_1 Changes since 1.82: +2 -2 lines Diff to previous 1.82 ( colored ) next main 1.83 ( colored ) enter -stable Revision 1.83 / ( download ) - annotate - [select for diffs] , Mon Mar 12 00:23:25 2007 UTC (18 years, 10 months ago) by deraadt Branch: MAIN Changes since 1.82: +4 -4 lines Diff to previous 1.82 ( colored ) unlock tree, move on towards 4.1-current Revision 1.82 / ( download ) - annotate - [select for diffs] , Thu Mar 1 16:33:08 2007 UTC (18 years, 10 months ago) by pvalchev Branch: MAIN CVS Tags: OPENBSD_4_1_BASE Branch point for: OPENBSD_4_1 Changes since 1.81: +3 -3 lines Diff to previous 1.81 ( colored ) strip off -beta; ok deraadt Revision 1.81 / ( download ) - annotate - [select for diffs] , Mon Feb 12 13:10:02 2007 UTC (18 years, 11 months ago) by henning Branch: MAIN Changes since 1.80: +4 -4 lines Diff to previous 1.80 ( colored ) 4.1-beta Revision 1.78.2.1 / ( download ) - annotate - [select for diffs] , Thu Nov 2 01:49:04 2006 UTC (19 years, 2 months ago) by brad Branch: OPENBSD_4_0 Changes since 1.78: +3 -2 lines Diff to previous 1.78 ( colored ) next main 1.79 ( colored ) -stable Revision 1.80 / ( download ) - annotate - [select for diffs] , Sun Sep 17 16:47:27 2006 UTC (19 years, 4 months ago) by steven Branch: MAIN Changes since 1.79: +2 -2 lines Diff to previous 1.79 ( colored ) 4.0-current. yes deraadt Revision 1.79 / ( download ) - annotate - [select for diffs] , Sun Sep 17 16:25:30 2006 UTC (19 years, 4 months ago) by deraadt Branch: MAIN Changes since 1.78: +4 -4 lines Diff to previous 1.78 ( colored ) moving to 4.1-current Revision 1.78 / ( download ) - annotate - [select for diffs] , Mon Aug 28 21:16:16 2006 UTC (19 years, 4 months ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_4_0_BASE Branch point for: OPENBSD_4_0 Changes since 1.77: +3 -3 lines Diff to previous 1.77 ( colored ) move to official 4.0 Revision 1.77 / ( download ) - annotate - [select for diffs] , Wed Jul 26 20:34:11 2006 UTC (19 years, 5 months ago) by deraadt Branch: MAIN Changes since 1.76: +4 -4 lines Diff to previous 1.76 ( colored ) crank to 4.0-beta Revision 1.74.2.1 / ( download ) - annotate - [select for diffs] , Mon May 1 16:01:21 2006 UTC (19 years, 8 months ago) by brad Branch: OPENBSD_3_9 Changes since 1.74: +3 -2 lines Diff to previous 1.74 ( colored ) next main 1.75 ( colored ) -stable Revision 1.76 / ( download ) - annotate - [select for diffs] , Sat Mar 4 11:40:22 2006 UTC (19 years, 10 months ago) by grange Branch: MAIN Changes since 1.75: +3 -3 lines Diff to previous 1.75 ( colored ) -current, not -beta. Revision 1.75 / ( download ) - annotate - [select for diffs] , Sat Mar 4 02:56:10 2006 UTC (19 years, 10 months ago) by deraadt Branch: MAIN Changes since 1.74: +3 -3 lines Diff to previous 1.74 ( colored ) move to 3.9-current Revision 1.74 / ( download ) - annotate - [select for diffs] , Mon Feb 27 01:43:27 2006 UTC (19 years, 10 months ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_3_9_BASE Branch point for: OPENBSD_3_9 Changes since 1.73: +3 -3 lines Diff to previous 1.73 ( colored ) stop being -beta Revision 1.73 / ( download ) - annotate - [select for diffs] , Thu Jan 19 03:30:04 2006 UTC (19 years, 11 months ago) by deraadt Branch: MAIN Changes since 1.72: +4 -4 lines Diff to previous 1.72 ( colored ) crank to 3.8-beta Revision 1.71.2.1 / ( download ) - annotate - [select for diffs] , Tue Nov 1 01:07:32 2005 UTC (20 years, 2 months ago) by brad Branch: OPENBSD_3_8 Changes since 1.71: +3 -2 lines Diff to previous 1.71 ( colored ) next main 1.72 ( colored ) and here comes -stable Revision 1.72 / ( download ) - annotate - [select for diffs] , Mon Sep 5 20:43:25 2005 UTC (20 years, 4 months ago) by miod Branch: MAIN Changes since 1.71: +3 -3 lines Diff to previous 1.71 ( colored ) On the road again. Revision 1.71 / ( download ) - annotate - [select for diffs] , Sat Aug 27 16:47:04 2005 UTC (20 years, 4 months ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_3_8_BASE Branch point for: OPENBSD_3_8 Changes since 1.70: +3 -3 lines Diff to previous 1.70 ( colored ) remove -beta tag Revision 1.70 / ( download ) - annotate - [select for diffs] , Tue Aug 9 00:46:15 2005 UTC (20 years, 5 months ago) by deraadt Branch: MAIN Changes since 1.69: +4 -4 lines Diff to previous 1.69 ( colored ) move to 3.8-beta Revision 1.68.2.1 / ( download ) - annotate - [select for diffs] , Sun May 22 21:34:52 2005 UTC (20 years, 7 months ago) by brad Branch: OPENBSD_3_7 Changes since 1.68: +3 -2 lines Diff to previous 1.68 ( colored ) next main 1.69 ( colored ) and here comes -stable Revision 1.69 / ( download ) - annotate - [select for diffs] , Mon Mar 21 22:29:45 2005 UTC (20 years, 9 months ago) by miod Branch: MAIN Changes since 1.68: +3 -3 lines Diff to previous 1.68 ( colored ) Voltage reinforcements. Revision 1.68 / ( download ) - annotate - [select for diffs] , Tue Mar 15 21:26:50 2005 UTC (20 years, 10 months ago) by deraadt Branch: MAIN CVS Tags: OPENBSD_3_7_BASE Branch point for: OPENBSD_3_7 Changes since 1.67: +3 -3 lines Diff to previous 1.67 ( colored ) tag for release, more things coming, but ports needs this Revision 1.67 / ( download ) - annotate - [select for diff | 2026-01-13T09:29:14 |
https://twitter.com/BenBalter | JavaScript is not available. We’ve detected that JavaScript is disabled in this browser. Please enable JavaScript or switch to a supported browser to continue using x.com. You can see a list of supported browsers in our Help Center. Help Center Terms of Service Privacy Policy Cookie Policy Imprint Ads info © 2026 X Corp. Something went wrong, but don’t fret — let’s give it another shot. Try again Some privacy related extensions may cause issues on x.com. Please disable them and try again. | 2026-01-13T09:29:14 |
https://doc.rust-lang.org/stable/src/core/num/f64.rs.html#281 | f64.rs - source This old browser is unsupported and will most likely display funky things. Files core/num/ f64.rs 1 //! Constants for the `f64` double-precision floating point type. 2 //! 3 //! *[See also the `f64` primitive type][f64].* 4 //! 5 //! Mathematically significant numbers are provided in the `consts` sub-module. 6 //! 7 //! For the constants defined directly in this module 8 //! (as distinct from those defined in the `consts` sub-module), 9 //! new code should instead use the associated constants 10 //! defined directly on the `f64` type. 11 12 #![stable(feature = "rust1" , since = "1.0.0" )] 13 14 use crate ::convert::FloatToInt; 15 use crate ::num::FpCategory; 16 use crate ::panic::const_assert; 17 use crate ::{intrinsics, mem}; 18 19 /// The radix or base of the internal representation of `f64`. 20 /// Use [`f64::RADIX`] instead. 21 /// 22 /// # Examples 23 /// 24 /// ```rust 25 /// // deprecated way 26 /// # #[allow(deprecated, deprecated_in_future)] 27 /// let r = std::f64::RADIX; 28 /// 29 /// // intended way 30 /// let r = f64::RADIX; 31 /// ``` 32 #[stable(feature = "rust1" , since = "1.0.0" )] 33 #[deprecated(since = "TBD" , note = "replaced by the `RADIX` associated constant on `f64`" )] 34 #[rustc_diagnostic_item = "f64_legacy_const_radix" ] 35 pub const RADIX: u32 = f64::RADIX; 36 37 /// Number of significant digits in base 2. 38 /// Use [`f64::MANTISSA_DIGITS`] instead. 39 /// 40 /// # Examples 41 /// 42 /// ```rust 43 /// // deprecated way 44 /// # #[allow(deprecated, deprecated_in_future)] 45 /// let d = std::f64::MANTISSA_DIGITS; 46 /// 47 /// // intended way 48 /// let d = f64::MANTISSA_DIGITS; 49 /// ``` 50 #[stable(feature = "rust1" , since = "1.0.0" )] 51 #[deprecated( 52 since = "TBD" , 53 note = "replaced by the `MANTISSA_DIGITS` associated constant on `f64`" 54 )] 55 #[rustc_diagnostic_item = "f64_legacy_const_mantissa_dig" ] 56 pub const MANTISSA_DIGITS: u32 = f64::MANTISSA_DIGITS; 57 58 /// Approximate number of significant digits in base 10. 59 /// Use [`f64::DIGITS`] instead. 60 /// 61 /// # Examples 62 /// 63 /// ```rust 64 /// // deprecated way 65 /// # #[allow(deprecated, deprecated_in_future)] 66 /// let d = std::f64::DIGITS; 67 /// 68 /// // intended way 69 /// let d = f64::DIGITS; 70 /// ``` 71 #[stable(feature = "rust1" , since = "1.0.0" )] 72 #[deprecated(since = "TBD" , note = "replaced by the `DIGITS` associated constant on `f64`" )] 73 #[rustc_diagnostic_item = "f64_legacy_const_digits" ] 74 pub const DIGITS: u32 = f64::DIGITS; 75 76 /// [Machine epsilon] value for `f64`. 77 /// Use [`f64::EPSILON`] instead. 78 /// 79 /// This is the difference between `1.0` and the next larger representable number. 80 /// 81 /// [Machine epsilon]: https://en.wikipedia.org/wiki/Machine_epsilon 82 /// 83 /// # Examples 84 /// 85 /// ```rust 86 /// // deprecated way 87 /// # #[allow(deprecated, deprecated_in_future)] 88 /// let e = std::f64::EPSILON; 89 /// 90 /// // intended way 91 /// let e = f64::EPSILON; 92 /// ``` 93 #[stable(feature = "rust1" , since = "1.0.0" )] 94 #[deprecated(since = "TBD" , note = "replaced by the `EPSILON` associated constant on `f64`" )] 95 #[rustc_diagnostic_item = "f64_legacy_const_epsilon" ] 96 pub const EPSILON: f64 = f64::EPSILON; 97 98 /// Smallest finite `f64` value. 99 /// Use [`f64::MIN`] instead. 100 /// 101 /// # Examples 102 /// 103 /// ```rust 104 /// // deprecated way 105 /// # #[allow(deprecated, deprecated_in_future)] 106 /// let min = std::f64::MIN; 107 /// 108 /// // intended way 109 /// let min = f64::MIN; 110 /// ``` 111 #[stable(feature = "rust1" , since = "1.0.0" )] 112 #[deprecated(since = "TBD" , note = "replaced by the `MIN` associated constant on `f64`" )] 113 #[rustc_diagnostic_item = "f64_legacy_const_min" ] 114 pub const MIN: f64 = f64::MIN; 115 116 /// Smallest positive normal `f64` value. 117 /// Use [`f64::MIN_POSITIVE`] instead. 118 /// 119 /// # Examples 120 /// 121 /// ```rust 122 /// // deprecated way 123 /// # #[allow(deprecated, deprecated_in_future)] 124 /// let min = std::f64::MIN_POSITIVE; 125 /// 126 /// // intended way 127 /// let min = f64::MIN_POSITIVE; 128 /// ``` 129 #[stable(feature = "rust1" , since = "1.0.0" )] 130 #[deprecated(since = "TBD" , note = "replaced by the `MIN_POSITIVE` associated constant on `f64`" )] 131 #[rustc_diagnostic_item = "f64_legacy_const_min_positive" ] 132 pub const MIN_POSITIVE: f64 = f64::MIN_POSITIVE; 133 134 /// Largest finite `f64` value. 135 /// Use [`f64::MAX`] instead. 136 /// 137 /// # Examples 138 /// 139 /// ```rust 140 /// // deprecated way 141 /// # #[allow(deprecated, deprecated_in_future)] 142 /// let max = std::f64::MAX; 143 /// 144 /// // intended way 145 /// let max = f64::MAX; 146 /// ``` 147 #[stable(feature = "rust1" , since = "1.0.0" )] 148 #[deprecated(since = "TBD" , note = "replaced by the `MAX` associated constant on `f64`" )] 149 #[rustc_diagnostic_item = "f64_legacy_const_max" ] 150 pub const MAX: f64 = f64::MAX; 151 152 /// One greater than the minimum possible normal power of 2 exponent. 153 /// Use [`f64::MIN_EXP`] instead. 154 /// 155 /// # Examples 156 /// 157 /// ```rust 158 /// // deprecated way 159 /// # #[allow(deprecated, deprecated_in_future)] 160 /// let min = std::f64::MIN_EXP; 161 /// 162 /// // intended way 163 /// let min = f64::MIN_EXP; 164 /// ``` 165 #[stable(feature = "rust1" , since = "1.0.0" )] 166 #[deprecated(since = "TBD" , note = "replaced by the `MIN_EXP` associated constant on `f64`" )] 167 #[rustc_diagnostic_item = "f64_legacy_const_min_exp" ] 168 pub const MIN_EXP: i32 = f64::MIN_EXP; 169 170 /// Maximum possible power of 2 exponent. 171 /// Use [`f64::MAX_EXP`] instead. 172 /// 173 /// # Examples 174 /// 175 /// ```rust 176 /// // deprecated way 177 /// # #[allow(deprecated, deprecated_in_future)] 178 /// let max = std::f64::MAX_EXP; 179 /// 180 /// // intended way 181 /// let max = f64::MAX_EXP; 182 /// ``` 183 #[stable(feature = "rust1" , since = "1.0.0" )] 184 #[deprecated(since = "TBD" , note = "replaced by the `MAX_EXP` associated constant on `f64`" )] 185 #[rustc_diagnostic_item = "f64_legacy_const_max_exp" ] 186 pub const MAX_EXP: i32 = f64::MAX_EXP; 187 188 /// Minimum possible normal power of 10 exponent. 189 /// Use [`f64::MIN_10_EXP`] instead. 190 /// 191 /// # Examples 192 /// 193 /// ```rust 194 /// // deprecated way 195 /// # #[allow(deprecated, deprecated_in_future)] 196 /// let min = std::f64::MIN_10_EXP; 197 /// 198 /// // intended way 199 /// let min = f64::MIN_10_EXP; 200 /// ``` 201 #[stable(feature = "rust1" , since = "1.0.0" )] 202 #[deprecated(since = "TBD" , note = "replaced by the `MIN_10_EXP` associated constant on `f64`" )] 203 #[rustc_diagnostic_item = "f64_legacy_const_min_10_exp" ] 204 pub const MIN_10_EXP: i32 = f64::MIN_10_EXP; 205 206 /// Maximum possible power of 10 exponent. 207 /// Use [`f64::MAX_10_EXP`] instead. 208 /// 209 /// # Examples 210 /// 211 /// ```rust 212 /// // deprecated way 213 /// # #[allow(deprecated, deprecated_in_future)] 214 /// let max = std::f64::MAX_10_EXP; 215 /// 216 /// // intended way 217 /// let max = f64::MAX_10_EXP; 218 /// ``` 219 #[stable(feature = "rust1" , since = "1.0.0" )] 220 #[deprecated(since = "TBD" , note = "replaced by the `MAX_10_EXP` associated constant on `f64`" )] 221 #[rustc_diagnostic_item = "f64_legacy_const_max_10_exp" ] 222 pub const MAX_10_EXP: i32 = f64::MAX_10_EXP; 223 224 /// Not a Number (NaN). 225 /// Use [`f64::NAN`] instead. 226 /// 227 /// # Examples 228 /// 229 /// ```rust 230 /// // deprecated way 231 /// # #[allow(deprecated, deprecated_in_future)] 232 /// let nan = std::f64::NAN; 233 /// 234 /// // intended way 235 /// let nan = f64::NAN; 236 /// ``` 237 #[stable(feature = "rust1" , since = "1.0.0" )] 238 #[deprecated(since = "TBD" , note = "replaced by the `NAN` associated constant on `f64`" )] 239 #[rustc_diagnostic_item = "f64_legacy_const_nan" ] 240 pub const NAN: f64 = f64::NAN; 241 242 /// Infinity (∞). 243 /// Use [`f64::INFINITY`] instead. 244 /// 245 /// # Examples 246 /// 247 /// ```rust 248 /// // deprecated way 249 /// # #[allow(deprecated, deprecated_in_future)] 250 /// let inf = std::f64::INFINITY; 251 /// 252 /// // intended way 253 /// let inf = f64::INFINITY; 254 /// ``` 255 #[stable(feature = "rust1" , since = "1.0.0" )] 256 #[deprecated(since = "TBD" , note = "replaced by the `INFINITY` associated constant on `f64`" )] 257 #[rustc_diagnostic_item = "f64_legacy_const_infinity" ] 258 pub const INFINITY: f64 = f64::INFINITY; 259 260 /// Negative infinity (−∞). 261 /// Use [`f64::NEG_INFINITY`] instead. 262 /// 263 /// # Examples 264 /// 265 /// ```rust 266 /// // deprecated way 267 /// # #[allow(deprecated, deprecated_in_future)] 268 /// let ninf = std::f64::NEG_INFINITY; 269 /// 270 /// // intended way 271 /// let ninf = f64::NEG_INFINITY; 272 /// ``` 273 #[stable(feature = "rust1" , since = "1.0.0" )] 274 #[deprecated(since = "TBD" , note = "replaced by the `NEG_INFINITY` associated constant on `f64`" )] 275 #[rustc_diagnostic_item = "f64_legacy_const_neg_infinity" ] 276 pub const NEG_INFINITY: f64 = f64::NEG_INFINITY; 277 278 /// Basic mathematical constants. 279 #[stable(feature = "rust1" , since = "1.0.0" )] 280 #[rustc_diagnostic_item = "f64_consts_mod" ] 281 pub mod consts { 282 // FIXME: replace with mathematical constants from cmath. 283 284 /// Archimedes' constant (π) 285 #[stable(feature = "rust1" , since = "1.0.0" )] 286 pub const PI: f64 = 3.14159265358979323846264338327950288_f64 ; 287 288 /// The full circle constant (τ) 289 /// 290 /// Equal to 2π. 291 #[stable(feature = "tau_constant" , since = "1.47.0" )] 292 pub const TAU: f64 = 6.28318530717958647692528676655900577_f64 ; 293 294 /// The golden ratio (φ) 295 #[unstable(feature = "more_float_constants" , issue = "146939" )] 296 pub const PHI: f64 = 1.618033988749894848204586834365638118_f64 ; 297 298 /// The Euler-Mascheroni constant (γ) 299 #[unstable(feature = "more_float_constants" , issue = "146939" )] 300 pub const EGAMMA: f64 = 0.577215664901532860606512090082402431_f64 ; 301 302 /// π/2 303 #[stable(feature = "rust1" , since = "1.0.0" )] 304 pub const FRAC_PI_2: f64 = 1.57079632679489661923132169163975144_f64 ; 305 306 /// π/3 307 #[stable(feature = "rust1" , since = "1.0.0" )] 308 pub const FRAC_PI_3: f64 = 1.04719755119659774615421446109316763_f64 ; 309 310 /// π/4 311 #[stable(feature = "rust1" , since = "1.0.0" )] 312 pub const FRAC_PI_4: f64 = 0.785398163397448309615660845819875721_f64 ; 313 314 /// π/6 315 #[stable(feature = "rust1" , since = "1.0.0" )] 316 pub const FRAC_PI_6: f64 = 0.52359877559829887307710723054658381_f64 ; 317 318 /// π/8 319 #[stable(feature = "rust1" , since = "1.0.0" )] 320 pub const FRAC_PI_8: f64 = 0.39269908169872415480783042290993786_f64 ; 321 322 /// 1/π 323 #[stable(feature = "rust1" , since = "1.0.0" )] 324 pub const FRAC_1_PI: f64 = 0.318309886183790671537767526745028724_f64 ; 325 326 /// 1/sqrt(π) 327 #[unstable(feature = "more_float_constants" , issue = "146939" )] 328 pub const FRAC_1_SQRT_PI: f64 = 0.564189583547756286948079451560772586_f64 ; 329 330 /// 1/sqrt(2π) 331 #[doc(alias = "FRAC_1_SQRT_TAU" )] 332 #[unstable(feature = "more_float_constants" , issue = "146939" )] 333 pub const FRAC_1_SQRT_2PI: f64 = 0.398942280401432677939946059934381868_f64 ; 334 335 /// 2/π 336 #[stable(feature = "rust1" , since = "1.0.0" )] 337 pub const FRAC_2_PI: f64 = 0.636619772367581343075535053490057448_f64 ; 338 339 /// 2/sqrt(π) 340 #[stable(feature = "rust1" , since = "1.0.0" )] 341 pub const FRAC_2_SQRT_PI: f64 = 1.12837916709551257389615890312154517_f64 ; 342 343 /// sqrt(2) 344 #[stable(feature = "rust1" , since = "1.0.0" )] 345 pub const SQRT_2: f64 = 1.41421356237309504880168872420969808_f64 ; 346 347 /// 1/sqrt(2) 348 #[stable(feature = "rust1" , since = "1.0.0" )] 349 pub const FRAC_1_SQRT_2: f64 = 0.707106781186547524400844362104849039_f64 ; 350 351 /// sqrt(3) 352 #[unstable(feature = "more_float_constants" , issue = "146939" )] 353 pub const SQRT_3: f64 = 1.732050807568877293527446341505872367_f64 ; 354 355 /// 1/sqrt(3) 356 #[unstable(feature = "more_float_constants" , issue = "146939" )] 357 pub const FRAC_1_SQRT_3: f64 = 0.577350269189625764509148780501957456_f64 ; 358 359 /// Euler's number (e) 360 #[stable(feature = "rust1" , since = "1.0.0" )] 361 pub const E: f64 = 2.71828182845904523536028747135266250_f64 ; 362 363 /// log<sub>2</sub>(10) 364 #[stable(feature = "extra_log_consts" , since = "1.43.0" )] 365 pub const LOG2_10: f64 = 3.32192809488736234787031942948939018_f64 ; 366 367 /// log<sub>2</sub>(e) 368 #[stable(feature = "rust1" , since = "1.0.0" )] 369 pub const LOG2_E: f64 = 1.44269504088896340735992468100189214_f64 ; 370 371 /// log<sub>10</sub>(2) 372 #[stable(feature = "extra_log_consts" , since = "1.43.0" )] 373 pub const LOG10_2: f64 = 0.301029995663981195213738894724493027_f64 ; 374 375 /// log<sub>10</sub>(e) 376 #[stable(feature = "rust1" , since = "1.0.0" )] 377 pub const LOG10_E: f64 = 0.434294481903251827651128918916605082_f64 ; 378 379 /// ln(2) 380 #[stable(feature = "rust1" , since = "1.0.0" )] 381 pub const LN_2: f64 = 0.693147180559945309417232121458176568_f64 ; 382 383 /// ln(10) 384 #[stable(feature = "rust1" , since = "1.0.0" )] 385 pub const LN_10: f64 = 2.30258509299404568401799145468436421_f64 ; 386 } 387 388 impl f64 { 389 /// The radix or base of the internal representation of `f64`. 390 #[stable(feature = "assoc_int_consts" , since = "1.43.0" )] 391 pub const RADIX: u32 = 2 ; 392 393 /// Number of significant digits in base 2. 394 /// 395 /// Note that the size of the mantissa in the bitwise representation is one 396 /// smaller than this since the leading 1 is not stored explicitly. 397 #[stable(feature = "assoc_int_consts" , since = "1.43.0" )] 398 pub const MANTISSA_DIGITS: u32 = 53 ; 399 /// Approximate number of significant digits in base 10. 400 /// 401 /// This is the maximum <i>x</i> such that any decimal number with <i>x</i> 402 /// significant digits can be converted to `f64` and back without loss. 403 /// 404 /// Equal to floor(log<sub>10</sub>&nbsp;2<sup>[`MANTISSA_DIGITS`]&nbsp;&minus;&nbsp;1</sup>). 405 /// 406 /// [`MANTISSA_DIGITS`]: f64::MANTISSA_DIGITS 407 #[stable(feature = "assoc_int_consts" , since = "1.43.0" )] 408 pub const DIGITS: u32 = 15 ; 409 410 /// [Machine epsilon] value for `f64`. 411 /// 412 /// This is the difference between `1.0` and the next larger representable number. 413 /// 414 /// Equal to 2<sup>1&nbsp;&minus;&nbsp;[`MANTISSA_DIGITS`]</sup>. 415 /// 416 /// [Machine epsilon]: https://en.wikipedia.org/wiki/Machine_epsilon 417 /// [`MANTISSA_DIGITS`]: f64::MANTISSA_DIGITS 418 #[stable(feature = "assoc_int_consts" , since = "1.43.0" )] 419 #[rustc_diagnostic_item = "f64_epsilon" ] 420 pub const EPSILON: f64 = 2.2204460492503131e-16_f64 ; 421 422 /// Smallest finite `f64` value. 423 /// 424 /// Equal to &minus;[`MAX`]. 425 /// 426 /// [`MAX`]: f64::MAX 427 #[stable(feature = "assoc_int_consts" , since = "1.43.0" )] 428 pub const MIN: f64 = - 1.7976931348623157e+308_f64 ; 429 /// Smallest positive normal `f64` value. 430 /// 431 /// Equal to 2<sup>[`MIN_EXP`]&nbsp;&minus;&nbsp;1</sup>. 432 /// 433 /// [`MIN_EXP`]: f64::MIN_EXP 434 #[stable(feature = "assoc_int_consts" , since = "1.43.0" )] 435 pub const MIN_POSITIVE: f64 = 2.2250738585072014e-308_f64 ; 436 /// Largest finite `f64` value. 437 /// 438 /// Equal to 439 /// (1&nbsp;&minus;&nbsp;2<sup>&minus;[`MANTISSA_DIGITS`]</sup>)&nbsp;2<sup>[`MAX_EXP`]</sup>. 440 /// 441 /// [`MANTISSA_DIGITS`]: f64::MANTISSA_DIGITS 442 /// [`MAX_EXP`]: f64::MAX_EXP 443 #[stable(feature = "assoc_int_consts" , since = "1.43.0" )] 444 pub const MAX: f64 = 1.7976931348623157e+308_f64 ; 445 446 /// One greater than the minimum possible *normal* power of 2 exponent 447 /// for a significand bounded by 1 ≤ x < 2 (i.e. the IEEE definition). 448 /// 449 /// This corresponds to the exact minimum possible *normal* power of 2 exponent 450 /// for a significand bounded by 0.5 ≤ x < 1 (i.e. the C definition). 451 /// In other words, all normal numbers representable by this type are 452 /// greater than or equal to 0.5&nbsp;×&nbsp;2<sup><i>MIN_EXP</i></sup>. 453 #[stable(feature = "assoc_int_consts" , since = "1.43.0" )] 454 pub const MIN_EXP: i32 = - 1021 ; 455 /// One greater than the maximum possible power of 2 exponent 456 /// for a significand bounded by 1 ≤ x < 2 (i.e. the IEEE definition). 457 /// 458 /// This corresponds to the exact maximum possible power of 2 exponent 459 /// for a significand bounded by 0.5 ≤ x < 1 (i.e. the C definition). 460 /// In other words, all numbers representable by this type are 461 /// strictly less than 2<sup><i>MAX_EXP</i></sup>. 462 #[stable(feature = "assoc_int_consts" , since = "1.43.0" )] 463 pub const MAX_EXP: i32 = 1024 ; 464 465 /// Minimum <i>x</i> for which 10<sup><i>x</i></sup> is normal. 466 /// 467 /// Equal to ceil(log<sub>10</sub>&nbsp;[`MIN_POSITIVE`]). 468 /// 469 /// [`MIN_POSITIVE`]: f64::MIN_POSITIVE 470 #[stable(feature = "assoc_int_consts" , since = "1.43.0" )] 471 pub const MIN_10_EXP: i32 = - 307 ; 472 /// Maximum <i>x</i> for which 10<sup><i>x</i></sup> is normal. 473 /// 474 /// Equal to floor(log<sub>10</sub>&nbsp;[`MAX`]). 475 /// 476 /// [`MAX`]: f64::MAX 477 #[stable(feature = "assoc_int_consts" , since = "1.43.0" )] 478 pub const MAX_10_EXP: i32 = 308 ; 479 480 /// Not a Number (NaN). 481 /// 482 /// Note that IEEE 754 doesn't define just a single NaN value; a plethora of bit patterns are 483 /// considered to be NaN. Furthermore, the standard makes a difference between a "signaling" and 484 /// a "quiet" NaN, and allows inspecting its "payload" (the unspecified bits in the bit pattern) 485 /// and its sign. See the [specification of NaN bit patterns](f32#nan-bit-patterns) for more 486 /// info. 487 /// 488 /// This constant is guaranteed to be a quiet NaN (on targets that follow the Rust assumptions 489 /// that the quiet/signaling bit being set to 1 indicates a quiet NaN). Beyond that, nothing is 490 /// guaranteed about the specific bit pattern chosen here: both payload and sign are arbitrary. 491 /// The concrete bit pattern may change across Rust versions and target platforms. 492 #[rustc_diagnostic_item = "f64_nan" ] 493 #[stable(feature = "assoc_int_consts" , since = "1.43.0" )] 494 #[allow(clippy::eq_op)] 495 pub const NAN: f64 = 0.0_f64 / 0.0_f64 ; 496 /// Infinity (∞). 497 #[stable(feature = "assoc_int_consts" , since = "1.43.0" )] 498 pub const INFINITY: f64 = 1.0_f64 / 0.0_f64 ; 499 /// Negative infinity (−∞). 500 #[stable(feature = "assoc_int_consts" , since = "1.43.0" )] 501 pub const NEG_INFINITY: f64 = - 1.0_f64 / 0.0_f64 ; 502 503 /// Sign bit 504 pub ( crate ) const SIGN_MASK: u64 = 0x8000_0000_0000_0000 ; 505 506 /// Exponent mask 507 pub ( crate ) const EXP_MASK: u64 = 0x7ff0_0000_0000_0000 ; 508 509 /// Mantissa mask 510 pub ( crate ) const MAN_MASK: u64 = 0x000f_ffff_ffff_ffff ; 511 512 /// Minimum representable positive value (min subnormal) 513 const TINY_BITS: u64 = 0x1 ; 514 515 /// Minimum representable negative value (min negative subnormal) 516 const NEG_TINY_BITS: u64 = Self ::TINY_BITS | Self ::SIGN_MASK; 517 518 /// Returns `true` if this value is NaN. 519 /// 520 /// ``` 521 /// let nan = f64::NAN; 522 /// let f = 7.0_f64; 523 /// 524 /// assert!(nan.is_nan()); 525 /// assert!(!f.is_nan()); 526 /// ``` 527 #[must_use] 528 #[stable(feature = "rust1" , since = "1.0.0" )] 529 #[rustc_const_stable(feature = "const_float_classify" , since = "1.83.0" )] 530 #[inline] 531 #[allow(clippy::eq_op)] // > if you intended to check if the operand is NaN, use `.is_nan()` instead :) 532 pub const fn is_nan( self ) -> bool { 533 self != self 534 } 535 536 /// Returns `true` if this value is positive infinity or negative infinity, and 537 /// `false` otherwise. 538 /// 539 /// ``` 540 /// let f = 7.0f64; 541 /// let inf = f64::INFINITY; 542 /// let neg_inf = f64::NEG_INFINITY; 543 /// let nan = f64::NAN; 544 /// 545 /// assert!(!f.is_infinite()); 546 /// assert!(!nan.is_infinite()); 547 /// 548 /// assert!(inf.is_infinite()); 549 /// assert!(neg_inf.is_infinite()); 550 /// ``` 551 #[must_use] 552 #[stable(feature = "rust1" , since = "1.0.0" )] 553 #[rustc_const_stable(feature = "const_float_classify" , since = "1.83.0" )] 554 #[inline] 555 pub const fn is_infinite( self ) -> bool { 556 // Getting clever with transmutation can result in incorrect answers on some FPUs 557 // FIXME: alter the Rust <-> Rust calling convention to prevent this problem. 558 // See https://github.com/rust-lang/rust/issues/72327 559 ( self == f64::INFINITY) | ( self == f64::NEG_INFINITY) 560 } 561 562 /// Returns `true` if this number is neither infinite nor NaN. 563 /// 564 /// ``` 565 /// let f = 7.0f64; 566 /// let inf: f64 = f64::INFINITY; 567 /// let neg_inf: f64 = f64::NEG_INFINITY; 568 /// let nan: f64 = f64::NAN; 569 /// 570 /// assert!(f.is_finite()); 571 /// 572 /// assert!(!nan.is_finite()); 573 /// assert!(!inf.is_finite()); 574 /// assert!(!neg_inf.is_finite()); 575 /// ``` 576 #[must_use] 577 #[stable(feature = "rust1" , since = "1.0.0" )] 578 #[rustc_const_stable(feature = "const_float_classify" , since = "1.83.0" )] 579 #[inline] 580 pub const fn is_finite( self ) -> bool { 581 // There's no need to handle NaN separately: if self is NaN, 582 // the comparison is not true, exactly as desired. 583 self .abs() < Self ::INFINITY 584 } 585 586 /// Returns `true` if the number is [subnormal]. 587 /// 588 /// ``` 589 /// let min = f64::MIN_POSITIVE; // 2.2250738585072014e-308_f64 590 /// let max = f64::MAX; 591 /// let lower_than_min = 1.0e-308_f64; 592 /// let zero = 0.0_f64; 593 /// 594 /// assert!(!min.is_subnormal()); 595 /// assert!(!max.is_subnormal()); 596 /// 597 /// assert!(!zero.is_subnormal()); 598 /// assert!(!f64::NAN.is_subnormal()); 599 /// assert!(!f64::INFINITY.is_subnormal()); 600 /// // Values between `0` and `min` are Subnormal. 601 /// assert!(lower_than_min.is_subnormal()); 602 /// ``` 603 /// [subnormal]: https://en.wikipedia.org/wiki/Denormal_number 604 #[must_use] 605 #[stable(feature = "is_subnormal" , since = "1.53.0" )] 606 #[rustc_const_stable(feature = "const_float_classify" , since = "1.83.0" )] 607 #[inline] 608 pub const fn is_subnormal( self ) -> bool { 609 matches! ( self .classify(), FpCategory::Subnormal) 610 } 611 612 /// Returns `true` if the number is neither zero, infinite, 613 /// [subnormal], or NaN. 614 /// 615 /// ``` 616 /// let min = f64::MIN_POSITIVE; // 2.2250738585072014e-308f64 617 /// let max = f64::MAX; 618 /// let lower_than_min = 1.0e-308_f64; 619 /// let zero = 0.0f64; 620 /// 621 /// assert!(min.is_normal()); 622 /// assert!(max.is_normal()); 623 /// 624 /// assert!(!zero.is_normal()); 625 /// assert!(!f64::NAN.is_normal()); 626 /// assert!(!f64::INFINITY.is_normal()); 627 /// // Values between `0` and `min` are Subnormal. 628 /// assert!(!lower_than_min.is_normal()); 629 /// ``` 630 /// [subnormal]: https://en.wikipedia.org/wiki/Denormal_number 631 #[must_use] 632 #[stable(feature = "rust1" , since = "1.0.0" )] 633 #[rustc_const_stable(feature = "const_float_classify" , since = "1.83.0" )] 634 #[inline] 635 pub const fn is_normal( self ) -> bool { 636 matches! ( self .classify(), FpCategory::Normal) 637 } 638 639 /// Returns the floating point category of the number. If only one property 640 /// is going to be tested, it is generally faster to use the specific 641 /// predicate instead. 642 /// 643 /// ``` 644 /// use std::num::FpCategory; 645 /// 646 /// let num = 12.4_f64; 647 /// let inf = f64::INFINITY; 648 /// 649 /// assert_eq!(num.classify(), FpCategory::Normal); 650 /// assert_eq!(inf.classify(), FpCategory::Infinite); 651 /// ``` 652 #[stable(feature = "rust1" , since = "1.0.0" )] 653 #[rustc_const_stable(feature = "const_float_classify" , since = "1.83.0" )] 654 pub const fn classify( self ) -> FpCategory { 655 // We used to have complicated logic here that avoids the simple bit-based tests to work 656 // around buggy codegen for x87 targets (see 657 // https://github.com/rust-lang/rust/issues/114479). However, some LLVM versions later, none 658 // of our tests is able to find any difference between the complicated and the naive 659 // version, so now we are back to the naive version. 660 let b = self .to_bits(); 661 match (b & Self ::MAN_MASK, b & Self ::EXP_MASK) { 662 ( 0 , Self ::EXP_MASK) => FpCategory::Infinite, 663 ( _ , Self ::EXP_MASK) => FpCategory::Nan, 664 ( 0 , 0 ) => FpCategory::Zero, 665 ( _ , 0 ) => FpCategory::Subnormal, 666 _ => FpCategory::Normal, 667 } 668 } 669 670 /// Returns `true` if `self` has a positive sign, including `+0.0`, NaNs with 671 /// positive sign bit and positive infinity. 672 /// 673 /// Note that IEEE 754 doesn't assign any meaning to the sign bit in case of 674 /// a NaN, and as Rust doesn't guarantee that the bit pattern of NaNs are 675 /// conserved over arithmetic operations, the result of `is_sign_positive` on 676 /// a NaN might produce an unexpected or non-portable result. See the [specification 677 /// of NaN bit patterns](f32#nan-bit-patterns) for more info. Use `self.signum() == 1.0` 678 /// if you need fully portable behavior (will return `false` for all NaNs). 679 /// 680 /// ``` 681 /// let f = 7.0_f64; 682 /// let g = -7.0_f64; 683 /// 684 /// assert!(f.is_sign_positive()); 685 /// assert!(!g.is_sign_positive()); 686 /// ``` 687 #[must_use] 688 #[stable(feature = "rust1" , since = "1.0.0" )] 689 #[rustc_const_stable(feature = "const_float_classify" , since = "1.83.0" )] 690 #[inline] 691 pub const fn is_sign_positive( self ) -> bool { 692 ! self .is_sign_negative() 693 } 694 695 #[must_use] 696 #[stable(feature = "rust1" , since = "1.0.0" )] 697 #[deprecated(since = "1.0.0" , note = "renamed to is_sign_positive" )] 698 #[inline] 699 #[doc(hidden)] 700 pub fn is_positive( self ) -> bool { 701 self .is_sign_positive() 702 } 703 704 /// Returns `true` if `self` has a negative sign, including `-0.0`, NaNs with 705 /// negative sign bit and negative infinity. 706 /// 707 /// Note that IEEE 754 doesn't assign any meaning to the sign bit in case of 708 /// a NaN, and as Rust doesn't guarantee that the bit pattern of NaNs are 709 /// conserved over arithmetic operations, the result of `is_sign_negative` on 710 /// a NaN might produce an unexpected or non-portable result. See the [specification 711 /// of NaN bit patterns](f32#nan-bit-patterns) for more info. Use `self.signum() == -1.0` 712 /// if you need fully portable behavior (will return `false` for all NaNs). 713 /// 714 /// ``` 715 /// let f = 7.0_f64; 716 /// let g = -7.0_f64; 717 /// 718 /// assert!(!f.is_sign_negative()); 719 /// assert!(g.is_sign_negative()); 720 /// ``` 721 #[must_use] 722 #[stable(feature = "rust1" , since = "1.0.0" )] 723 #[rustc_const_stable(feature = "const_float_classify" , since = "1.83.0" )] 724 #[inline] 725 pub const fn is_sign_negative( self ) -> bool { 726 // IEEE754 says: isSignMinus(x) is true if and only if x has negative sign. isSignMinus 727 // applies to zeros and NaNs as well. 728 self .to_bits() & Self ::SIGN_MASK != 0 729 } 730 731 #[must_use] 732 #[stable(feature = "rust1" , since = "1.0.0" )] 733 #[deprecated(since = "1.0.0" , note = "renamed to is_sign_negative" )] 734 #[inline] 735 #[doc(hidden)] 736 pub fn is_negative( self ) -> bool { 737 self .is_sign_negative() 738 } 739 740 /// Returns the least number greater than `self`. 741 /// 742 /// Let `TINY` be the smallest representable positive `f64`. Then, 743 /// - if `self.is_nan()`, this returns `self`; 744 /// - if `self` is [`NEG_INFINITY`], this returns [`MIN`]; 745 /// - if `self` is `-TINY`, this returns -0.0; 746 /// - if `self` is -0.0 or +0.0, this returns `TINY`; 747 /// - if `self` is [`MAX`] or [`INFINITY`], this returns [`INFINITY`]; 748 /// - otherwise the unique least value greater than `self` is returned. 749 /// 750 /// The identity `x.next_up() == -(-x).next_down()` holds for all non-NaN `x`. When `x` 751 /// is finite `x == x.next_up().next_down()` also holds. 752 /// 753 /// ```rust 754 /// // f64::EPSILON is the difference between 1.0 and the next number up. 755 /// assert_eq!(1.0f64.next_up(), 1.0 + f64::EPSILON); 756 /// // But not for most numbers. 757 /// assert!(0.1f64.next_up() < 0.1 + f64::EPSILON); 758 /// assert_eq!(9007199254740992f64.next_up(), 9007199254740994.0); 759 /// ``` 760 /// 761 /// This operation corresponds to IEEE-754 `nextUp`. 762 /// 763 /// [`NEG_INFINITY`]: Self::NEG_INFINITY 764 /// [`INFINITY`]: Self::INFINITY 765 /// [`MIN`]: Self::MIN 766 /// [`MAX`]: Self::MAX 767 #[inline] 768 #[doc(alias = "nextUp" )] 769 #[stable(feature = "float_next_up_down" , since = "1.86.0" )] 770 #[rustc_const_stable(feature = "float_next_up_down" , since = "1.86.0" )] 771 pub const fn next_up( self ) -> Self { 772 // Some targets violate Rust's assumption of IEEE semantics, e.g. by flushing 773 // denormals to zero. This is in general unsound and unsupported, but here 774 // we do our best to still produce the correct result on such targets. 775 let bits = self .to_bits(); 776 if self .is_nan() || bits == Self ::INFINITY.to_bits() { 777 return self ; 778 } 779 780 let abs = bits & ! Self ::SIGN_MASK; 781 let next_bits = if abs == 0 { 782 Self ::TINY_BITS 783 } else if bits == abs { 784 bits + 1 785 } else { 786 bits - 1 787 }; 788 Self ::from_bits(next_bits) 789 } 790 791 /// Returns the greatest number less than `self`. 792 /// 793 /// Let `TINY` be the smallest representable positive `f64`. Then, 794 /// - if `self.is_nan()`, this returns `self`; 795 /// - if `self` is [`INFINITY`], this returns [`MAX`]; 796 /// - if `self` is `TINY`, this returns 0.0; 797 /// - if `self` is -0.0 or +0.0, this returns `-TINY`; 798 /// - if `self` is [`MIN`] or [`NEG_INFINITY`], this returns [`NEG_INFINITY`]; 799 /// - otherwise the unique greatest value less than `self` is returned. 800 /// 801 /// The identity `x.next_down() == -(-x).next_up()` holds for all non-NaN `x`. When `x` 802 /// is finite `x == x.next_down().next_up()` also holds. 803 /// 804 /// ```rust 805 /// let x = 1.0f64; 806 /// // Clamp value into range [0, 1). 807 /// let clamped = x.clamp(0.0, 1.0f64.next_down()); 808 /// assert!(clamped < 1.0); 809 /// assert_eq!(clamped.next_up(), 1.0); 810 /// ``` 811 /// 812 /// This operation corresponds to IEEE-754 `nextDown`. 813 /// 814 /// [`NEG_INFINITY`]: Self::NEG_INFINITY 815 /// [`INFINITY`]: Self::INFINITY 816 /// [`MIN`]: Self::MIN 817 /// [`MAX`]: Self::MAX 818 #[inline] 819 #[doc(alias = "nextDown" )] 820 #[stable(feature = "float_next_up_down" , since = "1.86.0" )] 821 #[rustc_const_stable(feature = "float_next_up_down" , since = "1.86.0" )] 822 pub const fn next_down( self ) -> Self { 823 // Some targets violate Rust's assumption of IEEE semantics, e.g. by flushing 824 // denormals to zero. This is in general unsound and unsupported, but here 825 // we do our best to still produce the correct result on such targets. 826 let bits = self .to_bits(); 827 if self .is_nan() || bits == Self ::NEG_INFINITY.to_bits() { 828 return self ; 829 } 830 831 let abs = bits & ! Self ::SIGN_MASK; 832 let next_bits = if abs == 0 { 833 Self ::NEG_TINY_BITS 834 } else if bits == abs { 835 bits - 1 836 } else { 837 bits + 1 838 }; 839 Self ::from_bits(next_bits) 840 } 841 842 /// Takes the reciprocal (inverse) of a number, `1/x`. 843 /// 844 /// ``` 845 /// let x = 2.0_f64; 846 /// let abs_difference = (x.recip() - (1.0 / x)).abs(); 847 /// 848 /// assert!(abs_difference < 1e-10); 849 /// ``` 850 #[must_use = "this returns the result of the operation, without modifying the original" ] 851 #[stable(feature = "rust1" , since = "1.0.0" )] 852 #[rustc_const_stable(feature = "const_float_methods" , since = "1.85.0" )] 853 #[inline] 854 pub const fn recip( self ) -> f64 { 855 1.0 / self 856 } 857 858 /// Converts radians to degrees. 859 /// 860 /// # Unspecified precision 861 /// 862 /// The precision of this function is non-deterministic. This means it varies by platform, 863 /// Rust version, and can even differ within the same execution from one invocation to the next. 864 /// 865 /// # Examples 866 /// 867 /// ``` 868 /// let angle = std::f64::consts::PI; 869 /// 870 /// let abs_difference = (angle.to_degrees() - 180.0).abs(); 871 /// 872 /// assert!(abs_difference < 1e-10); 873 /// ``` 874 #[must_use = "this returns the result of the operation, \ 875 without modifying the original" ] 876 #[stable(feature = "rust1" , since = "1.0.0" )] 877 #[rustc_const_stable(feature = "const_float_methods" , since = "1.85.0" )] 878 #[inline] 879 pub const fn to_degrees( self ) -> f64 { 880 // The division here is correctly rounded with respect to the true value of 180/π. 881 // Although π is irrational and already rounded, the double rounding happens 882 // to produce correct result for f64. 883 const PIS_IN_180: f64 = 180.0 / consts::PI; 884 self * PIS_IN_180 885 } 886 887 /// Converts degrees to radians. 888 /// 889 /// # Unspecified precision 890 /// 891 /// The precision of this function is non-deterministic. This means it varies by platform, 892 /// Rust version, and can even differ within the same execution from one invocation to the next. 893 /// 894 /// # Examples 895 /// 896 /// ``` 897 /// let angle = 180.0_f64; 898 /// 899 /// let abs_difference = (angle.to_radians() - std::f64::consts::PI).abs(); 900 /// 901 /// assert!(abs_difference < 1e-10); 902 /// ``` 903 #[must_use = "this returns the result of the operation, \ 904 without modifying the original" ] 905 #[stable(feature = "rust1" , since = "1.0.0" )] 906 #[rustc_const_stable(feature = "const_float_methods" , since = "1.85.0" )] 907 #[inline] 908 pub const fn to_radians( self ) -> f64 { 909 // The division here is correctly rounded with respect to the true value of π/180. 910 // Although π is irrational and already rounded, the double rounding happens 911 // to produce correct result for f64. 912 const RADS_PER_DEG: f64 = consts::PI / 180.0 ; 913 self * RADS_PER_DEG 914 } 915 916 /// Returns the maximum of the two numbers, ignoring NaN. 917 /// 918 /// If one of the arguments is NaN, then the other argument is returned. 919 /// This follows the IEEE 754-2008 semantics for maxNum, except for handling of signaling NaNs; 920 /// this function handles all NaNs the same way and avoids maxNum's problems with associativity. 921 /// This also matches the behavior of libm’s fmax. In particular, if the inputs compare equal 922 /// (such as for the case of `+0.0` and `-0.0`), either input may be returned non-deterministically. 923 /// 924 /// ``` 925 /// let x = 1.0_f64; 926 /// let y = 2.0_f64; 927 /// 928 /// assert_eq!(x.max(y), y); 929 /// ``` 930 #[must_use = "this returns the result of the comparison, without modifying either input" ] 931 #[stable(feature = "rust1" , since = "1.0.0" )] 932 #[rustc_const_stable(feature = "const_float_methods" , since = "1.85.0" )] 933 #[inline] 934 pub const fn max( self , other: f64) -> f64 { 935 intrinsics::maxnumf64( self , other) 936 } 937 938 /// Returns the minimum of the two numbers, ignoring NaN. 939 /// 940 /// If one of the arguments is NaN, then the other argument is returned. 941 /// This follows the IEEE 754-2008 semantics for minNum, except for handling of signaling NaNs; 942 /// this function handles all NaNs the same way and avoids minNum's problems with associativity. 943 /// This also matches the behavior of libm’s fmin. In particular, if the inputs compare equal 944 /// (such as for the case of `+0.0` and `-0.0`), either input may be returned non-deterministically. 945 /// 946 /// ``` 947 /// let x = 1.0_f64; 948 /// let y = 2.0_f64; 949 /// 950 /// assert_eq!(x.min(y), x); 951 /// ``` 952 #[must_use = "this returns the result of the comparison, without modifying either input" ] 953 #[stable(feature = "rust1" , since = "1.0.0" )] 954 #[rustc_const_stable(feature = "const_float_methods" , since = "1.85.0" )] 955 #[inline] 956 pub const fn min( self , other: f64) -> f64 { 957 intrinsics::minnumf64( self , other) 958 } 959 960 /// Returns the maximum of the two numbers, propagating NaN. 961 /// 962 /// This returns NaN when *either* argument is NaN, as opposed to 963 /// [`f64::max`] which only returns NaN when *both* arguments are NaN. 964 /// 965 /// ``` 966 /// #![feature(float_minimum_maximum)] 967 /// let x = 1.0_f64; 968 /// let y = 2.0_f64; 969 /// 970 /// assert_eq!(x.maximum(y), y); 971 /// assert!(x.maximum(f64::NAN).is_nan()); 972 /// ``` 973 /// 974 /// If one of the arguments is NaN, then NaN is returned. Otherwise this returns the greater 975 /// of the two numbers. For this operation, -0.0 is considered to be less than +0.0. 976 /// Note that this follows the semantics specified in IEEE 754-2019. 977 /// 978 /// Also note that "propagation" of NaNs here doesn't necessarily mean that the bitpattern of a NaN 979 /// operand is conserved; see the [specification of NaN bit patterns](f32#nan-bit-patterns) for more info. 980 #[must_use = "this returns the result of the comparison, without modifying either input" ] 981 #[unstable(feature = "float_minimum_maximum" , issue = "91079" )] 982 #[inline] 983 pub const fn maximum( self , other: f64) -> f64 { 984 intrinsics::maximumf64( self , other) 985 } 986 987 /// Returns the minimum of the two numbers, propagating NaN. 988 /// 989 /// This returns NaN when *either* argument is NaN, as opposed to 990 /// [`f64::min`] which only returns NaN when *both* arguments are NaN. 991 /// 992 /// ``` 993 /// #![feature(float_minimum_maximum)] 994 /// let x = 1.0_f64; 995 /// let y = 2.0_f64; 996 /// 997 /// assert_eq!(x.minimum(y), x); 998 /// assert!(x.minimum(f64::NAN).is_nan()); 999 /// ``` 1000 /// 1001 /// If one of the arguments is NaN, then NaN is returned. Otherwise this returns the lesser 1002 /// of the two numbers. For this operation, -0.0 is considered to be less than +0.0. 1003 /// Note that this follows the semantics specified in IEEE 754-2019. 1004 /// 1005 /// Also note that "propagation" of NaNs here doesn't necessarily mean that the bitpattern of a NaN 1006 /// operand is conserved; see the [specification of NaN bit patterns](f32#nan-bit-patterns) for more info. 1007 #[must_use = "this returns the result of the comparison, without modifying either input" ] 1008 #[unstable(feature = "float_minimum_maximum" , issue = "91079" )] 1009 #[inline] 1010 pub const fn minimum( self , other: f64) -> f64 { 1011 intrinsics::minimumf64( self , other) 1012 } 1013 1014 /// Calculates the midpoint (average) between `self` and `rhs`. 1015 /// 1016 /// This returns NaN when *either* argument is NaN or if a combination of 1017 /// +inf and -inf is provided as arguments. 1018 /// 1019 /// # Examples 1020 /// 1021 /// ``` 1022 /// assert_eq!(1f64.midpoint(4.0), 2.5); 1023 /// assert_eq!((-5.5f64).midpoint(8.0), 1.25); 1024 /// ``` 1025 #[inline] 1026 #[doc(alias = "average" )] 1027 #[stable(feature = "num_midpoint" , since = "1.85.0" )] 1028 #[rustc_const_stable(feature = "num_midpoint" , since = "1.85.0" )] 1029 pub const fn midpoint( self , other: f64) -> f64 { 1030 const HI: f64 = f64::MAX / 2. ; 1031 1032 let (a, b) = ( self , other); 1033 let abs_a = a.abs(); 1034 let abs_b = b.abs(); 1035 1036 if abs_a <= HI && abs_b <= HI { 1037 // Overflow is impossible 1038 (a + b) / 2. 1039 } else { 1040 (a / 2. ) + (b / 2. ) 1041 } 1042 } 1043 1044 /// Rounds toward zero and converts to any primitive integer type, 1045 /// assuming that the value is finite and fits in that type. 1046 /// 1047 /// ``` 1048 /// let value = 4.6_f64; 1049 /// let rounded = unsafe { value.to_int_unchecked::<u16>() }; 1050 /// assert_eq!(rounded, 4); 1051 /// 1052 /// let value = -128.9_f64; 1053 /// let rounded = unsafe { value.to_int_unchecked::<i8>() }; 1054 /// assert_eq!(rounded, i8::MIN); 1055 /// ``` 1056 /// 1057 /// # Safety 1058 /// 1059 /// The value must: 1060 /// 1061 /// * Not be `NaN` 1062 /// * Not be infinite 1063 /// * Be representable in the return type `Int`, after truncating off its fractional part 1064 #[must_use = "this returns the result of the operation, \ 1065 without modifying the original" ] 1066 #[stable(feature = "float_approx_unchecked_to" , since = "1.44.0" )] 1067 #[inline] 1068 pub unsafe fn to_int_unchecked<Int>( self ) -> Int 1069 where 1070 Self : FloatToInt<Int>, 1071 { 1072 // SAFETY: the caller must uphold the safety contract for 1073 // `FloatToInt::to_int_unchecked`. 1074 unsafe { FloatToInt::<Int>::to_int_unchecked( self ) } 1075 } 1076 1077 /// Raw transmutation to `u64`. 1078 /// 1079 /// This is currently identical to `transmute::<f64, u64>(self)` on all platforms. 1080 /// 1081 /// See [`from_bits`](Self::from_bits) for some discussion of the 1082 /// portability of this operation (there are almost no issues). 1083 /// 1084 /// Note that this function is distinct from `as` casting, which attempts to 1085 /// preserve the *numeric* value, and not the bitwise value. 1086 /// 1087 /// # Examples 1088 /// 1089 /// ``` 1090 /// assert!((1f64).to_bits() != 1f64 as u64); // to_bits() is not casting! 1091 /// assert_eq!((12.5f64).to_bits(), 0x4029000000000000); 1092 /// ``` 1093 #[must_use = "this returns the result of the operation, \ 1094 without modifying the original" ] 1095 #[stable(feature = "float_bits_conv" , since = "1.20.0" )] 1096 #[rustc_const_stable(feature = "const_float_bits_conv" , since = "1.83.0" )] 1097 #[allow(unnecessary_transmutes)] 1098 #[inline] 1099 pub const fn to_bits( self ) -> u64 { 1100 // SAFETY: `u64` is a plain old datatype so we can always transmute to it. 1101 unsafe { mem::transmute( self ) } 1102 } 1103 1104 /// Raw transmutation from `u64`. 1105 /// 1106 /// This is currently identical to `transmute::<u64, f64>(v)` on all platforms. 1107 /// It turns out this is incredibly portable, for two reasons: 1108 /// 1109 /// * Floats and Ints have the same endianness on all supported platforms. 1110 /// * IEEE 754 very precisely specifies the bit layout of floats. 1111 /// 1112 /// However there is one caveat: prior to the 2008 version of IEEE 754, how 1113 /// to interpret the NaN signaling bit wasn't actually specified. Most platforms 1114 /// (notably x86 and ARM) picked the interpretation that was ultimately 1115 /// standardized in 2008, but some didn't (notably MIPS). As a result, all 1116 /// signaling NaNs on MIPS are quiet NaNs on x86, and vice-versa. 1117 /// 1118 /// Rather than trying to preserve signaling-ness cross-platform, this 1119 /// implementation favors preserving the exact bits. This means that 1120 /// any payloads encoded in NaNs will be preserved even if the result of 1121 /// this method is sent over the network from an x86 machine to a MIPS one. 1122 /// 1123 /// If the results of this method are only manipulated by the same 1124 /// architecture that produced them, then there is no portability concern. 1125 /// 1126 /// If the input isn't NaN, then there is no portability concern. 1127 /// 1128 /// If you don't care about signaling-ness (very likely), then there is no 1129 /// portability concern. 1130 /// 1131 /// Note that this function is distinct from `as` casting, which attempts to 1132 /// preserve the *numeric* value, and not the bitwise value. 1133 /// 1134 /// # Examples 1135 /// 1136 /// ``` 1137 /// let v = f64::from_bits(0x4029000000000000); 1138 /// assert_eq!(v, 12.5); 1139 /// ``` 1140 #[stable(feature = "float_bits_conv" , since = "1.20.0" )] 1141 #[rustc_const_stable(feature = "const_float_bits_conv" , since = "1.83.0" )] 1142 #[must_use] 1143 #[inline] 1144 #[allow(unnecessary_transmutes)] 1145 pub const fn from_bits(v: u64) -> Self { 1146 // It turns out the safety issues with sNaN were overblown! Hooray! 1147 // SAFETY: `u64` is a plain old datatype so we can always transmute from it. 1148 unsafe { mem::transmute(v) } 1149 } 1150 1151 /// Returns the memory representation of this floating point number as a byte array in 1152 /// big-endian (network) byte order. 1153 /// 1154 /// See [`from_bits`](Self::from_bits) for some discussion of the 1155 /// portability of this operation (there are almost no issues). 1156 /// 1157 /// # Examples 1158 /// 1159 /// ``` 1160 /// let bytes = 12.5f64.to_be_bytes(); 1161 /// assert_eq!(bytes, [0x40, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]); 1162 /// ``` 1163 #[must_use = "this returns the result of the operation, \ 1164 without modifying the original" ] 1165 #[stable(feature = "float_to_from_bytes" , since = "1.40.0" )] 1166 #[rustc_const_stable(feature = "const_float_bits_conv" , since = "1.83.0" )] 1167 #[inline] 1168 pub const fn to_be_bytes( self ) -> [u8; 8 ] { 1169 self .to_bits().to_be_bytes() 1170 } 1171 1172 /// Returns the memory representation of this floating point number as a byte array in 1173 /// little-endian byte order. 1174 /// 1175 /// See [`from_bits`](Self::from_bits) for some discussion of the 1176 /// portability of this operation (there are almost no issues). 1177 /// 1178 /// # Examples 1179 /// 1180 /// ``` 1181 /// let bytes = 12.5f64.to_le_bytes(); 1182 /// assert_eq!(bytes, [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0x40]); 1183 /// ``` 1184 #[must_use = "this returns the result of the operation, \ 1185 without modifying the original" ] 1186 #[stable(feature = "float_to_from_bytes" , since = "1.40.0" )] 1187 #[rustc_const_stable(feature = "const_float_bits_conv" , since = "1.83.0" )] 1188 #[inline] 1189 pub const fn to_le_bytes( self ) -> [u8; 8 ] { 1190 self .to_bits().to_le_bytes() 1191 } 1192 1193 /// Returns the memory representation of this floating point number as a byte array in 1194 /// native byte order. 1195 /// 1196 /// As the target platform's native endianness is used, portable code 1197 /// should use [`to_be_bytes`] or [`to_le_bytes`], as appropriate, instead. 1198 /// 1199 /// [`to_be_bytes`]: f64::to_be_bytes 1200 /// [`to_le_bytes`]: f64::to_le_bytes 1201 /// 1202 /// See [`from_bits`](Self::from_bits) for some discussion of the 1203 /// portability of this operation (there are almost no issues). 1204 /// 1205 /// # Examples 1206 /// 1207 /// ``` 1208 /// let bytes = 12.5f64.to_ne_bytes(); 1209 /// assert_eq!( 1210 /// bytes, 1211 /// if cfg!(target_endian = "big") { 1212 /// [0x40, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00] 1213 /// } else { 1214 /// [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0x40] 1215 /// } 1216 /// ); 1217 /// ``` 1218 #[must_use = "this returns the result of the operation, \ 1219 without modifying the original" ] 1220 #[stable(feature = "float_to_from_bytes" , since = "1.40.0" )] 1221 #[rustc_const_stable(feature = "const_float_bits_conv" , since = "1.83.0" )] 1222 #[inline] 1223 pub const fn to_ne_bytes( self ) -> [u8; 8 ] { 1224 self .to_bits().to_ne_bytes() 1225 } 1226 1227 /// Creates a floating point value from its representation as a byte array in big endian. 1228 /// 1229 /// See [`from_bits`](Self::from_bits) for some discussion of the 1230 /// portability of this operation (there are almost no issues). 1231 /// 1232 /// # Examples 1233 /// 1234 /// ``` 1235 /// let value = f64::from_be_bytes([0x40, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]); 1236 /// assert_eq!(value, 12.5); 1237 /// ``` 1238 #[stable(feature = "float_to_from_bytes" , since = "1.40.0" )] 1239 #[rustc_const_stable(feature = "const_float_bits_conv" , since = "1.83.0" )] 1240 #[must_use] 1241 #[inline] 1242 pub const fn from_be_bytes(bytes: [u8; 8 ]) -> Self { 1243 Self ::from_bits(u64::from_be_bytes(bytes)) 1244 } 1245 1246 /// Creates a floating point value from its representation as a byte array in little endian. 1247 /// 1248 /// See [`from_bits`](Self::from_bits) for some discussion of the 1249 /// portability of this operation (there are almost no issues). 1250 /// 1251 /// # Examples 1252 /// 1253 /// ``` 1254 /// let value = f64::from_le_bytes([0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0x40]); 1255 /// assert_eq!(value, 12.5); 1256 /// ``` 1257 #[stable(feature = "float_to_from_bytes" , since = "1.40.0" )] 1258 #[rustc_const_stable(feature = "const_float_bits_conv" , since = "1.83.0" )] 1259 #[must_use] 1260 #[inline] 1261 pub const fn from_le_bytes(bytes: [u8; 8 ]) -> Self { 1262 Self ::from_bits(u64::from_le_bytes(bytes)) 1263 } 1264 1265 /// Creates a floating point value from its representation as a byte array in native endian. 1266 /// 1267 /// As the target platform's native endianness is used, portable code 1268 /// likely wants to use [`from_be_bytes`] or [`from_le_bytes`], as 1269 /// appropriate instead. 1270 /// 1271 /// [`from_be_bytes`]: f64::from_be_bytes 1272 /// [`from_le_bytes`]: f64::from_le_bytes 1273 /// 1274 /// See [`from_bits`](Self::from_bits) for some discussion of the 1275 /// portability of this operation (there are almost no issues). 1276 /// 1277 /// # Examples 1278 /// 1279 /// ``` 1280 /// let value = f64::from_ne_bytes(if cfg!(target_endian = "big") { 1281 /// [0x40, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00] 1282 /// } else { 1283 /// [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0x40] 1284 /// }); 1285 /// assert_eq!(value, 12.5); 1286 /// ``` 1287 #[stable(feature = "float_to_from_bytes" , since = "1.40.0" )] 1288 #[rustc_const_stable(feature = "const_float_bits_conv" , since = "1.83.0" )] 1289 #[must_use] 1290 #[inline] 1291 pub const fn from_ne_bytes(bytes: [u8; 8 ]) -> Self { 1292 Self ::from_bits(u64::from_ne_bytes | 2026-01-13T09:29:14 |
https://www.linkedin.com/legal/cookie-policy?session_redirect=https%3A%2F%2Fwww%2Elinkedin%2Ecom%2Fposts%2Fmakerxau_were-incredibly-proud-to-have-been-nominated-activity-7401472884281692161-_WTa&trk=registration-frontend_join-form-cookie-policy | Cookie Policy | LinkedIn Skip to main content User Agreement Summary of User Agreement Privacy Policy Professional Community Policies Cookie Policy Copyright Policy Regional Info EU Notice California Privacy Disclosure U.S. State Privacy Laws User Agreement Summary of User Agreement Privacy Policy Professional Community Policies Cookie Policy Copyright Policy Regional Info EU Notice California Privacy Disclosure U.S. State Privacy Laws Cookie Policy Effective on June 3, 2022 At LinkedIn, we believe in being clear and open about how we collect and use data related to you. This Cookie Policy applies to any LinkedIn product or service that links to this policy or incorporates it by reference. We use cookies and similar technologies such as pixels, local storage and mobile ad IDs (collectively referred to in this policy as “cookies”) to collect and use data as part of our Services, as defined in our Privacy Policy (“Services”) and which includes our sites, communications, mobile applications and off-site Services, such as our ad services and the “Apply with LinkedIn” and “Share with LinkedIn” plugins or tags. In the spirit of transparency, this policy provides detailed information about how and when we use these technologies. By continuing to visit or use our Services, you are agreeing to the use of cookies and similar technologies for the purposes described in this policy. What technologies are used? ENTER A SUMMARY Type of technology Description Cookies A cookie is a small file placed onto your device that enables LinkedIn features and functionality. Any browser visiting our sites may receive cookies from us or cookies from third parties such as our customers, partners or service providers. We or third parties may also place cookies in your browser when you visit non-LinkedIn sites that display ads or that host our plugins or tags . We use two types of cookies: persistent cookies and session cookies. A persistent cookie lasts beyond the current session and is used for many purposes, such as recognizing you as an existing user, so it’s easier to return to LinkedIn and interact with our Services without signing in again. Since a persistent cookie stays in your browser, it will be read by LinkedIn when you return to one of our sites or visit a third party site that uses our Services. Session cookies last only as long as the session (usually the current visit to a website or a browser session). Pixels A pixel is a tiny image that may be embedded within web pages and emails, requiring a call (which provides device and visit information) to our servers in order for the pixel to be rendered in those web pages and emails. We use pixels to learn more about your interactions with email content or web content, such as whether you interacted with ads or posts. Pixels can also enable us and third parties to place cookies on your browser. Local storage Local storage enables a website or application to store information locally on your device(s). Local storage may be used to improve the LinkedIn experience, for example, by enabling features, remembering your preferences and speeding up site functionality. Other similar technologies We also use other tracking technologies, such as mobile advertising IDs and tags for similar purposes as described in this Cookie Policy. References to similar technologies in this policy includes pixels, local storage, and other tracking technologies. Our cookie tables lists cookies and similar technologies that are used as part of our Services. Please note that the names of cookies and similar technologies may change over time. What are these technologies used for? Below we describe the purposes for which we use these technologies. ENTER SUMMARY Purpose Description Authentication We use cookies and similar technologies to recognize you when you visit our Services. If you’re signed into LinkedIn, these technologies help us show you the right information and personalize your experience in line with your settings. For example, cookies enable LinkedIn to identify you and verify your account. Security We use cookies and similar technologies to make your interactions with our Services faster and more secure. For example, we use cookies to enable and support our security features, keep your account safe and to help us detect malicious activity and violations of our User Agreement. Preferences, features and services We use cookies and similar technologies to enable the functionality of our Services, such as helping you to fill out forms on our Services more easily and providing you with features, insights and customized content in conjunction with our plugins. We also use these technologies to remember information about your browser and your preferences. For example, cookies can tell us which language you prefer and what your communications preferences are. We may also use local storage to speed up site functionality. Customized content We use cookies and similar technologies to customize your experience on our Services. For example, we may use cookies to remember previous searches so that when you return to our services, we can offer additional information that relates to your previous search. Plugins on and off LinkedIn We use cookies and similar technologies to enable LinkedIn plugins both on and off the LinkedIn sites. For example, our plugins, including the "Apply with LinkedIn" button or the "Share" button may be found on LinkedIn or third-party sites, such as the sites of our customers and partners. Our plugins use cookies and other technologies to provide analytics and recognize you on LinkedIn and third-party sites. If you interact with a plugin (for instance, by clicking "Apply"), the plugin will use cookies to identify you and initiate your request to apply. You can learn more about plugins in our Privacy Policy . Advertising Cookies and similar technologies help us show relevant advertising to you more effectively, both on and off our Services and to measure the performance of such ads. We use these technologies to learn whether content has been shown to you or whether someone who was presented with an ad later came back and took an action (e.g., downloaded a white paper or made a purchase) on another site. Similarly, our partners or service providers may use these technologies to determine whether we've shown an ad or a post and how it performed or provide us with information about how you interact with ads. We may also work with our customers and partners to show you an ad on or off LinkedIn, such as after you’ve visited a customer’s or partner’s site or application. These technologies help us provide aggregated information to our customers and partners. For further information regarding the use of cookies for advertising purposes, please see Sections 1.4 and 2.4 of the Privacy Policy . As noted in Section 1.4 of our Privacy Policy, outside Designated Countries , we also collect (or rely on others who collect) information about your device where you have not engaged with our Services (e.g., ad ID, IP address, operating system and browser information) so we can provide our Members with relevant ads and better understand their effectiveness. For further information, please see Section 1.4 of the Privacy Policy . Analytics and research Cookies and similar technologies help us learn more about how well our Services and plugins perform in different locations. We or our service providers use these technologies to understand, improve, and research products, features and services, including as you navigate through our sites or when you access LinkedIn from other sites, applications or devices. We or our service providers, use these technologies to determine and measure the performance of ads or posts on and off LinkedIn and to learn whether you have interacted with our websites, content or emails and provide analytics based on those interactions. We also use these technologies to provide aggregated information to our customers and partners as part of our Services. If you are a LinkedIn member but logged out of your account on a browser, LinkedIn may still continue to log your interaction with our Services on that browser until the expiration of the cookie in order to generate usage analytics for our Services. We may share these analytics in aggregate form with our customers. What third parties use these technologies in connection with our Services? Third parties such as our customers, partners and service providers may use cookies in connection with our Services. For example, third parties may use cookies in their LinkedIn pages, job posts and their advertisements on and off LinkedIn for their own marketing purposes. For an illustration, please visit LinkedIn’s Help Center . Third parties may also use cookies in connection with our off-site Services, such as LinkedIn ad services. Third parties may use cookies to help us to provide our Services. We may also work with third parties for our own marketing purposes and to enable us to analyze and research our Services. Your Choices You have choices on how LinkedIn uses cookies and similar technologies. Please note that if you limit the ability of LinkedIn to set cookies and similar technologies, you may worsen your overall user experience, since it may no longer be personalized to you. It may also stop you from saving customized settings like login information. Opt out of targeted advertising As described in Section 2.4 of the Privacy Policy , you have choices regarding the personalized ads you may see. LinkedIn Members can adjust their settings here . Visitor controls can be found here . Some mobile device operating systems such as Android provide the ability to control the use of mobile advertising IDs for ads personalization. You can learn how to use these controls by visiting the manufacturer’s website. We do not use iOS mobile advertising IDs for targeted advertising. Browser Controls Most browsers allow you to control cookies through their settings, which may be adapted to reflect your consent to the use of cookies. Further, most browsers also enable you to review and erase cookies, including LinkedIn cookies. To learn more about browser controls, please consult the documentation that your browser manufacturer provides. What is Do Not Track (DNT)? DNT is a concept that has been promoted by regulatory agencies such as the U.S. Federal Trade Commission (FTC), for the Internet industry to develop and implement a mechanism for allowing Internet users to control the tracking of their online activities across websites by using browser settings. As such, LinkedIn does not generally respond to “do not track” signals. Other helpful resources To learn more about advertisers’ use of cookies, please visit the following links: Internet Advertising Bureau (US) European Interactive Digital Advertising Alliance (EU) Internet Advertising Bureau (EU) LinkedIn © 2026 About Accessibility User Agreement Privacy Policy Cookie Policy Copyright Policy Brand Policy Guest Controls Community Guidelines العربية (Arabic) বাংলা (Bangla) Čeština (Czech) Dansk (Danish) Deutsch (German) Ελληνικά (Greek) English (English) Español (Spanish) فارسی (Persian) Suomi (Finnish) Français (French) हिंदी (Hindi) Magyar (Hungarian) Bahasa Indonesia (Indonesian) Italiano (Italian) עברית (Hebrew) 日本語 (Japanese) 한국어 (Korean) मराठी (Marathi) Bahasa Malaysia (Malay) Nederlands (Dutch) Norsk (Norwegian) ਪੰਜਾਬੀ (Punjabi) Polski (Polish) Português (Portuguese) Română (Romanian) Русский (Russian) Svenska (Swedish) తెలుగు (Telugu) ภาษาไทย (Thai) Tagalog (Tagalog) Türkçe (Turkish) Українська (Ukrainian) Tiếng Việt (Vietnamese) 简体中文 (Chinese (Simplified)) 正體中文 (Chinese (Traditional)) Language | 2026-01-13T09:29:14 |
https://docs.serde.rs/serde_json/fn.to_writer.html | to_writer in serde_json - Rust Docs.rs serde_json-1.0.149 serde_json 1.0.149 Permalink Docs.rs crate page MIT OR Apache-2.0 Links Repository crates.io Source Owners dtolnay github:serde-rs:publish Dependencies indexmap ^2.2.3 normal optional itoa ^1.0 normal memchr ^2 normal serde_core ^1.0.220 normal zmij ^1.0 normal automod ^1.0.11 dev indoc ^2.0.2 dev ref-cast ^1.0.18 dev rustversion ^1.0.13 dev serde ^1.0.194 dev serde_bytes ^0.11.10 dev serde_derive ^1.0.166 dev serde_stacker ^0.1.8 dev trybuild ^1.0.108 dev serde ^1.0.220 normal Versions 100% of the crate is documented Platform x86_64-unknown-linux-gnu Feature flags docs.rs About docs.rs Badges Builds Metadata Shorthand URLs Download Rustdoc JSON Build queue Privacy policy Rust Rust website The Book Standard Library API Reference Rust by Example The Cargo Guide Clippy Documentation This old browser is unsupported and will most likely display funky things. to_writer serde_ json 1.0.149 to_ writer Sections Errors In crate serde_ json serde_json Function to_ writer Copy item path Source pub fn to_writer<W, T>(writer: W, value: &T ) -> Result < () > where W: Write , T: ? Sized + Serialize , Available on crate feature std only. Expand description Serialize the given data structure as JSON into the I/O stream. Serialization guarantees it only feeds valid UTF-8 sequences to the writer. § Errors Serialization can fail if T ’s implementation of Serialize decides to fail, or if T contains a map with non-string keys. | 2026-01-13T09:29:14 |
https://www.linkedin.com/uas/login?session_redirect=%2Fproducts%2Fcloudflare-workers&trk=products_details_guest_primary_call_to_action | LinkedIn Login, Sign in | LinkedIn Sign in Sign in with Apple Sign in with a passkey By clicking Continue, you agree to LinkedIn’s User Agreement , Privacy Policy , and Cookie Policy . or Email or phone Password Show Forgot password? Keep me logged in Sign in We’ve emailed a one-time link to your primary email address Click on the link to sign in instantly to your LinkedIn account. If you don’t see the email in your inbox, check your spam folder. Resend email Back New to LinkedIn? Join now Agree & Join LinkedIn By clicking Continue, you agree to LinkedIn’s User Agreement , Privacy Policy , and Cookie Policy . LinkedIn © 2026 User Agreement Privacy Policy Community Guidelines Cookie Policy Copyright Policy Send Feedback Language العربية (Arabic) বাংলা (Bangla) Čeština (Czech) Dansk (Danish) Deutsch (German) Ελληνικά (Greek) English (English) Español (Spanish) فارسی (Persian) Suomi (Finnish) Français (French) हिंदी (Hindi) Magyar (Hungarian) Bahasa Indonesia (Indonesian) Italiano (Italian) עברית (Hebrew) 日本語 (Japanese) 한국어 (Korean) मराठी (Marathi) Bahasa Malaysia (Malay) Nederlands (Dutch) Norsk (Norwegian) ਪੰਜਾਬੀ (Punjabi) Polski (Polish) Português (Portuguese) Română (Romanian) Русский (Russian) Svenska (Swedish) తెలుగు (Telugu) ภาษาไทย (Thai) Tagalog (Tagalog) Türkçe (Turkish) Українська (Ukrainian) Tiếng Việt (Vietnamese) 简体中文 (Chinese (Simplified)) 正體中文 (Chinese (Traditional)) | 2026-01-13T09:29:14 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.