#[non_exhaustive]pub struct File {
pub path: String,
pub size: i64,
pub sha256: String,
pub hashed_size: i64,
pub partially_hashed: bool,
pub contents: String,
pub disk_path: Option<DiskPath>,
pub operations: Vec<FileOperation>,
/* private fields */
}Expand description
File information about the related binary/library used by an executable, or the script used by a script interpreter
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.path: StringAbsolute path of the file as a JSON encoded string.
size: i64Size of the file in bytes.
sha256: StringSHA256 hash of the first hashed_size bytes of the file encoded as a hex string. If hashed_size == size, sha256 represents the SHA256 hash of the entire file.
hashed_size: i64The length in bytes of the file prefix that was hashed. If hashed_size == size, any hashes reported represent the entire file.
partially_hashed: boolTrue when the hash covers only a prefix of the file.
contents: StringPrefix of the file contents as a JSON-encoded string.
disk_path: Option<DiskPath>Path of the file in terms of underlying disk/partition identifiers.
operations: Vec<FileOperation>Operation(s) performed on a file.
Implementations§
Source§impl File
impl File
pub fn new() -> Self
Sourcepub fn set_sha256<T: Into<String>>(self, v: T) -> Self
pub fn set_sha256<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_hashed_size<T: Into<i64>>(self, v: T) -> Self
pub fn set_hashed_size<T: Into<i64>>(self, v: T) -> Self
Sourcepub fn set_partially_hashed<T: Into<bool>>(self, v: T) -> Self
pub fn set_partially_hashed<T: Into<bool>>(self, v: T) -> Self
Sourcepub fn set_contents<T: Into<String>>(self, v: T) -> Self
pub fn set_contents<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_disk_path<T>(self, v: T) -> Self
pub fn set_disk_path<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_disk_path<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_disk_path<T>(self, v: Option<T>) -> Self
Sourcepub fn set_operations<T, V>(self, v: T) -> Self
pub fn set_operations<T, V>(self, v: T) -> Self
Sets the value of operations.
§Example
ⓘ
use google_cloud_securitycenter_v2::model::file::FileOperation;
let x = File::new()
.set_operations([
FileOperation::default()/* use setters */,
FileOperation::default()/* use (different) setters */,
]);Trait Implementations§
impl StructuralPartialEq for File
Auto Trait Implementations§
impl Freeze for File
impl RefUnwindSafe for File
impl Send for File
impl Sync for File
impl Unpin for File
impl UnwindSafe for File
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