Struct git2::Oid
[−]
[src]
pub struct Oid { // some fields omitted }
Unique identity of any object (commit, tree, blob, tag).
Methods
impl Oid
fn from_str(s: &str) -> Result<Oid, Error>
Parse a hex-formatted object id into an Oid structure.
If the string is not a valid 40-character hex string, an error is returned.
fn from_bytes(bytes: &[u8]) -> Result<Oid, Error>
Parse a raw object id into an Oid structure.
If the array given is not 20 bytes in length, an error is returned.
fn as_bytes(&self) -> &[u8]
View this OID as a byte-slice 20 bytes in length.
fn is_zero(&self) -> bool
Test if this OID is all zeros.