Struct lib_gistit::file::File [−][src]
pub struct File { /* fields omitted */ }
Expand description
Represents a gistit file handler and some extra data
Implementations
Same as Self::from_bytes_encoded
but doesn’t expect encoded bytes
Errors
Fails with IoError
if the file can’t be created for some reason. Also if it can’t be
written to.
Set the file name, useful when creating a File
using Self::from_bytes
.
if the File
was created using Self::from_path
it will use the provided file name.
Consumes the File
encrypting it and returning a new instance of EncryptedFile
Errors
Fails with EncryptionError
if something goes wrong during the encryption process. This
includes unexpected sizes of the nonce, hashed key.
Will also error out if the provided key and nonce is incorrect.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for File
impl !UnwindSafe for File
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more