-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2e6dc6e
commit f8c7631
Showing
15 changed files
with
590 additions
and
1,146 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
use bitflags::bitflags; | ||
|
||
/// Contains information about the library. | ||
pub struct LibraryInfo { | ||
id: u16, | ||
name: String, | ||
flags: LibraryFlags, | ||
} | ||
|
||
impl LibraryInfo { | ||
pub(crate) fn new(id: u16, name: String, flags: LibraryFlags) -> Self { | ||
Self { id, name, flags } | ||
} | ||
|
||
pub fn id(&self) -> u16 { | ||
self.id | ||
} | ||
|
||
pub fn name(&self) -> &str { | ||
self.name.as_ref() | ||
} | ||
|
||
pub fn flags(&self) -> LibraryFlags { | ||
self.flags | ||
} | ||
|
||
pub fn flags_mut(&mut self) -> &mut LibraryFlags { | ||
&mut self.flags | ||
} | ||
} | ||
|
||
bitflags! { | ||
/// Flags of [`LibraryInfo`]. | ||
#[derive(Clone, Copy)] | ||
pub struct LibraryFlags: u64 { | ||
const EXPORT = 0x010000; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/// Contains information about the module. | ||
pub struct ModuleInfo { | ||
id: u16, | ||
name: String, | ||
} | ||
|
||
impl ModuleInfo { | ||
pub(crate) fn new(id: u16, name: String) -> Self { | ||
Self { id, name } | ||
} | ||
|
||
pub fn id(&self) -> u16 { | ||
self.id | ||
} | ||
|
||
pub fn name(&self) -> &str { | ||
self.name.as_ref() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.