#[non_exhaustive]pub enum FileKind {
Relocatable,
Executable,
}Expand description
What a file is for: input to a linker, or a program the OS can run.
§Examples
use object_lang::{Architecture, FileKind, Object};
let obj = Object::new(FileKind::Relocatable, Architecture::X86_64);
assert_eq!(obj.kind(), FileKind::Relocatable);Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Relocatable
A relocatable object (.o, .obj): sections at no fixed address, symbol values
as offsets within their section, and relocations still to be applied by a linker.
Executable
A statically linked executable: every loadable section at its final address, symbol values as addresses, no relocations, and an entry point.
Trait Implementations§
impl Copy for FileKind
impl Eq for FileKind
impl StructuralPartialEq for FileKind
Auto Trait Implementations§
impl Freeze for FileKind
impl RefUnwindSafe for FileKind
impl Send for FileKind
impl Sync for FileKind
impl Unpin for FileKind
impl UnsafeUnpin for FileKind
impl UnwindSafe for FileKind
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