pub struct BuildId {
pub flavour: BuildIdFlavour,
pub data: Vec<u8>,
}Expand description
Represents a build id, which could be either a GNU build ID, the build ID from Go, or a Sha256 hash of the code in the .text section.
Fields§
§flavour: BuildIdFlavour§data: Vec<u8>Implementations§
Source§impl BuildId
impl BuildId
pub fn gnu_from_bytes(bytes: &[u8]) -> Result<Self, BuildIdError>
pub fn go_from_bytes(bytes: &[u8]) -> Result<Self, BuildIdError>
pub fn sha256_from_digest(digest: &Digest) -> Result<Self, BuildIdError>
Sourcepub fn id(&self) -> Result<ExecutableId>
pub fn id(&self) -> Result<ExecutableId>
Returns an identifier for the executable using the first 8 bytes of the build id.
pub fn short(&self) -> String
pub fn formatted(&self) -> String
Trait Implementations§
impl Eq for BuildId
impl StructuralPartialEq for BuildId
Auto Trait Implementations§
impl Freeze for BuildId
impl RefUnwindSafe for BuildId
impl Send for BuildId
impl Sync for BuildId
impl Unpin for BuildId
impl UnsafeUnpin for BuildId
impl UnwindSafe for BuildId
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