pub(crate) struct EntryComponent {
file: File,
path: PathBuf,
}Expand description
Fields§
§file: FileThe (read-only) file handle for the component.
path: PathBufThe path to the component during creation.
Implementations§
Source§impl EntryComponent
impl EntryComponent
Sourcepub const FILE_MODE: u32 = 0o100644
pub const FILE_MODE: u32 = 0o100644
The default permissions for a component of an alpm-db entry.
Sourcepub fn new(
entry_dir: impl AsRef<Path>,
name: EntryComponentType,
) -> Result<Self, Error>
pub fn new( entry_dir: impl AsRef<Path>, name: EntryComponentType, ) -> Result<Self, Error>
Creates a new entry component.
§Errors
Returns an error, if
- the metadata for
pathcannot be retrieved pathis not a file- the file permissions of
pathdo not match that ofSelf::FILE_MODE - the file at
pathcannot be opened for reading
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EntryComponent
impl RefUnwindSafe for EntryComponent
impl Send for EntryComponent
impl Sync for EntryComponent
impl Unpin for EntryComponent
impl UnsafeUnpin for EntryComponent
impl UnwindSafe for EntryComponent
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