Struct git_tempfile::Registration[][src]

pub struct Registration { /* fields omitted */ }
Expand description

Note

Signals interrupting the calling thread right after taking ownership of the registered tempfile will cause all but this tempfile to be removed automatically. In the common case it will persist on disk as destructors were not called or didn’t get to remove the file.

In the best case the file is a true temporary with a non-clashing name that ‘only’ fills up the disk, in the worst case the temporary file is used as a lock file which may leave the repository in a locked state forever.

This kind of raciness exists whenever take() is used and can’t be circumvented.

Implementations

Create a registered tempfile at the given path, where path includes the desired filename.

Note that intermediate directories will not be created.

Create a registered tempfile within containing_directory with a name that won’t clash. Note that intermediate directories will not be created.

Take ownership of the temporary file.

Trait Implementations

Executes the destructor for this type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.