pub struct File { /* private fields */ }
Expand description

Metadata of a file stored in B2.

Implementations

The action taken to result in this File.

The ID of the bucket containing the file.

The number of bytes stored in the file.

Only meaningful when the action is FileAction::Upload or FileAction::Copy; otherwise the value is None.

The SHA-1 checksum of the bytes in the file.

There is no checksum for large files or when the action is FileAction::Hide or FileAction::Folder.

The MD5 checksum of the bytes in the file.

There is no checksum for large files or when the action is FileAction::Hide or FileAction::Folder.

When action is FileAction::Upload, FileAction::Start, or FileAction::Copy, the file’s MIME type.

The B2 ID of the file.

User-specified and other file metadata.

The name of the file.

The file’s retention policy.

See if there is a legal hold on this file.

Returns an error if the Authorization does not have Capability::ReadFileLegalHolds.

Returns None if a legal hold is not valid for the file type (e.g., the action is hide or folder).

The encryption settings for the file.

The date and time at which the file was uploaded.

If the action is Folder, returns None.

Trait Implementations

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. 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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.