pub enum SymlinkBehavior {
Follow,
NoFollow,
}Expand description
Enum to specify symlink following behavior.
This replaces boolean follow_symlinks parameters for better readability
at call sites. Instead of open(path, true), use open(path, SymlinkBehavior::Follow).
Variants§
Follow
Follow symlinks (resolve to their target)
NoFollow
Do not follow symlinks (operate on the symlink itself)
Implementations§
Source§impl SymlinkBehavior
impl SymlinkBehavior
Sourcepub fn should_follow(self) -> bool
pub fn should_follow(self) -> bool
Returns true if symlinks should be followed
Trait Implementations§
Source§impl Clone for SymlinkBehavior
impl Clone for SymlinkBehavior
Source§fn clone(&self) -> SymlinkBehavior
fn clone(&self) -> SymlinkBehavior
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SymlinkBehavior
impl Debug for SymlinkBehavior
Source§impl Default for SymlinkBehavior
impl Default for SymlinkBehavior
Source§fn default() -> SymlinkBehavior
fn default() -> SymlinkBehavior
Returns the “default value” for a type. Read more
Source§impl From<bool> for SymlinkBehavior
impl From<bool> for SymlinkBehavior
Source§impl PartialEq for SymlinkBehavior
impl PartialEq for SymlinkBehavior
Source§fn eq(&self, other: &SymlinkBehavior) -> bool
fn eq(&self, other: &SymlinkBehavior) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for SymlinkBehavior
impl Eq for SymlinkBehavior
impl StructuralPartialEq for SymlinkBehavior
Auto Trait Implementations§
impl Freeze for SymlinkBehavior
impl RefUnwindSafe for SymlinkBehavior
impl Send for SymlinkBehavior
impl Sync for SymlinkBehavior
impl Unpin for SymlinkBehavior
impl UnsafeUnpin for SymlinkBehavior
impl UnwindSafe for SymlinkBehavior
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more