pub struct BomPath { /* private fields */ }Expand description
Represents a full path in a BOM.
This is a higher-level data structure with a Rust friendly API. It has fields for all the data constituting a path in a BOM.
Implementations§
Source§impl BomPath
impl BomPath
Sourcepub fn from_record(
path: String,
record: &BomBlockPathRecord<'_>,
) -> Result<Self, Error>
pub fn from_record( path: String, record: &BomBlockPathRecord<'_>, ) -> Result<Self, Error>
Construct an instance from a low-level BOM record.
Sourcepub fn path_type(&self) -> BomPathType
pub fn path_type(&self) -> BomPathType
The type of this path.
Sourcepub fn set_file_mode(&mut self, mode: u16) -> u16
pub fn set_file_mode(&mut self, mode: u16) -> u16
Set the file mode to an explicit value.
Sourcepub fn symbolic_mode(&self) -> String
pub fn symbolic_mode(&self) -> String
Obtain the symbolic file mode for this path.
e.g. a string like drwxr-xr-x.
Sourcepub fn set_user_id(&mut self, uid: u32) -> u32
pub fn set_user_id(&mut self, uid: u32) -> u32
Set the user identifier (UID) that owns this path.
Sourcepub fn set_group_id(&mut self, gid: u32) -> u32
pub fn set_group_id(&mut self, gid: u32) -> u32
Set the group identifier (GID) that owns this path.
Sourcepub fn modified_time(&self) -> &DateTime<Utc>
pub fn modified_time(&self) -> &DateTime<Utc>
Modified time of this path.
Sourcepub fn set_modified_time(&mut self, mtime: DateTime<Utc>) -> DateTime<Utc>
pub fn set_modified_time(&mut self, mtime: DateTime<Utc>) -> DateTime<Utc>
Set the modified time of this path.
Sourcepub fn link_name_cstring(&self) -> Option<CString>
pub fn link_name_cstring(&self) -> Option<CString>
The path that this link refers to, as a CString.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BomPath
impl RefUnwindSafe for BomPath
impl Send for BomPath
impl Sync for BomPath
impl Unpin for BomPath
impl UnwindSafe for BomPath
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