Rust Search

Find the best content on Rust, curated by the community; a search engine for Rustaceans.
doc.rust-lang.org
pub enum TryLockError
An enumeration of possible errors which can occur while trying to acquire a lock from the try_lock method and try_lock_shared method on a File.
enum std Stable since 1.89.0 Version 1.100.0-nightly
doc.rust-lang.org
pub struct ReadDir
Iterator over the entries in a directory.
struct std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn set_readonly(&mut self, readonly: bool)
Modifies the readonly flag for this set of permissions. If the readonly argument is true, using the resulting Permission will update file permissions to forbid writing. Conversely, if it's false, using the resulting Permission will update file permissions to allow writing.
method std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn readonly(&self) -> bool
Returns true if these permissions describe a readonly (unwritable) file.
method std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub struct Permissions
Representation of the various permissions on a file.
struct std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn write(&mut self, write: bool) -> &mut Self
Sets the option for write access.
method std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn truncate(&mut self, truncate: bool) -> &mut Self
Sets the option for truncating a previous file.
method std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn read(&mut self, read: bool) -> &mut Self
Sets the option for read access.
method std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn open<P>(&self, path: P) -> io::Result<File>
Opens a file at path with the options specified by self.
method std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn new() -> Self
Creates a blank new set of options ready for configuration.
associated_function std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn create_new(&mut self, create_new: bool) -> &mut Self
Sets the option to create a new file, failing if it already exists.
method std Stable since 1.9.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn create(&mut self, create: bool) -> &mut Self
Sets the option to create a new file, or open it if it already exists.
method std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn append(&mut self, append: bool) -> &mut Self
Sets the option for the append mode.
method std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub struct OpenOptions
Options and flags which can be used to configure how a file is opened.
struct std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn permissions(&self) -> Permissions
Returns the permissions of the file this metadata is for.
method std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn modified(&self) -> io::Result<SystemTime>
Returns the last modification time listed in this metadata.
method std Stable since 1.10.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn len(&self) -> u64
Returns the size of the file, in bytes, this metadata is for.
method std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn is_symlink(&self) -> bool
Returns true if this metadata is for a symbolic link.
method std Stable since 1.58.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn is_file(&self) -> bool
Returns true if this metadata is for a regular file. The result is mutually exclusive to the result of Metadata::is_dir, and will be false for symlink metadata obtained from symlink_metadata.
method std Stable since 1.0.0 Version 1.100.0-nightly
doc.rust-lang.org
pub fn is_dir(&self) -> bool
Returns true if this metadata is for a directory. The result is mutually exclusive to the result of Metadata::is_file, and will be false for symlink metadata obtained from symlink_metadata.
method std Stable since 1.0.0 Version 1.100.0-nightly
"This is a common theme in Rust’s design: To reduce breakage as code evolves, you’re only allowed to rely on features that have been intentionally ..."

Search tips

Type anything to search across articles, videos (including conference talks), podcasts, research, crates, and Rust API documentation. These operators give you finer control — click an example to try it.

Find pages containing all your words. Pages where the words appear together rank higher.
Quote part of your query to keep those words together as an exact phrase within a larger search.
Wrap the whole query in quotes for a verbatim search that matches text exactly, punctuation and all — perfect for Rust syntax. Needs at least 3 characters.
Put ! first to open the top result immediately. Quote the whole query for a literal leading bang, as in '!Send'. Bangs elsewhere, such as println!, stay literal. Browser and launcher shortcuts can invoke this directly. See search integrations.
Limit results to a single site. Works on its own () too. One site: per search.

Use the tabs and filters above the results to narrow by content type, publication year, and sort order.