[][src]Struct cargo::util::FileLock

pub struct FileLock { /* fields omitted */ }

Methods

impl FileLock[src]

pub fn file(&self) -> &File[src]

Returns the underlying file handle of this lock.

pub fn path(&self) -> &Path[src]

Returns the underlying path that this lock points to.

Note that special care must be taken to ensure that the path is not referenced outside the lifetime of this lock.

pub fn parent(&self) -> &Path[src]

Returns the parent path containing this file

pub fn remove_siblings(&self) -> CargoResult<()>[src]

Removes all sibling files to this locked file.

This can be useful if a directory is locked with a sentinel file but it needs to be cleared out as it may be corrupt.

Trait Implementations

impl Debug for FileLock[src]

impl Drop for FileLock[src]

impl Read for FileLock[src]

impl Seek for FileLock[src]

impl Write for FileLock[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> SmartSubtransportStream for T where
    T: 'static + Read + Write + Send
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,