pub struct File {Show 22 fields
pub node_key: String,
pub asset_id: Option<String>,
pub hostname: Option<String>,
pub state: u32,
pub created_timestamp: u64,
pub deleted_timestamp: u64,
pub last_seen_timestamp: u64,
pub file_name: String,
pub file_path: String,
pub file_extension: String,
pub file_mime_type: String,
pub file_size: u64,
pub file_version: String,
pub file_description: String,
pub file_product: String,
pub file_company: String,
pub file_directory: String,
pub file_inode: u64,
pub file_hard_links: u64,
pub md5_hash: String,
pub sha1_hash: String,
pub sha256_hash: String,
}
Fields§
§node_key: String
§asset_id: Option<String>
§hostname: Option<String>
§state: u32
1 = Created, 2 = Deleted, 3 = Referenced
created_timestamp: u64
§deleted_timestamp: u64
§last_seen_timestamp: u64
§file_name: String
§file_path: String
§file_extension: String
§file_mime_type: String
§file_size: u64
§file_version: String
§file_description: String
§file_product: String
§file_company: String
§file_directory: String
§file_inode: u64
§file_hard_links: u64
§md5_hash: String
§sha1_hash: String
§sha256_hash: String
Implementations§
Source§impl File
impl File
pub fn new( asset_id: impl Into<Option<String>>, hostname: impl Into<Option<String>>, state: FileState, timestamp: u64, file_name: String, file_path: String, file_extension: String, file_mime_type: String, file_size: u64, file_version: String, file_description: String, file_product: String, file_company: String, file_directory: String, file_inode: u64, file_hard_links: u64, md5_hash: String, sha1_hash: String, sha256_hash: String, ) -> File
pub fn into_json(self) -> Value
pub fn timestamp(&self) -> u64
Trait Implementations§
Source§impl<'de> Deserialize<'de> for File
impl<'de> Deserialize<'de> for File
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Message for File
impl Message for File
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Encodes the message to a buffer. Read more
Source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Encodes the message with a length-delimiter to a buffer. Read more
Source§fn decode<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
Decodes an instance of the message from a buffer. Read more
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
Decodes a length-delimited instance of the message from the buffer.
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
Decodes an instance of the message from a buffer, and merges it into
self
. Read moreSource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
Decodes a length-delimited instance of the message from buffer, and
merges it into
self
.Source§impl NodeT for File
impl NodeT for File
fn get_asset_id(&self) -> Option<&str>
fn set_asset_id(&mut self, asset_id: impl Into<String>)
fn get_node_key(&self) -> &str
fn set_node_key(&mut self, node_key: impl Into<String>)
fn merge(&mut self, other: &Self) -> bool
fn merge_into(&mut self, other: Self) -> bool
fn clone_asset_id(&self) -> Option<String>
fn clone_node_key(&self) -> String
impl Eq for File
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