pub struct ObjectName {
pub checksum: Checksum,
pub ty: ObjectType,
}Expand description
A checksum and the type of the object that it identifies.
The Display form is <hexchecksum>.<typestr>. The
ostree command prints an object reference in this form. The type string
comes from ObjectType::type_str and does not depend on the repository
mode. In archive mode, a content object is also file, and its loose path
has the z suffix that ObjectType::extension adds.
Fields§
§checksum: ChecksumThe SHA-256 checksum of the object.
ty: ObjectTypeThe object type.
Implementations§
Source§impl ObjectName
impl ObjectName
Sourcepub fn new(checksum: Checksum, ty: ObjectType) -> ObjectName
pub fn new(checksum: Checksum, ty: ObjectType) -> ObjectName
Creates an object name from a checksum and an object type.
Sourcepub fn loose_path(&self, mode: RepoMode) -> String
pub fn loose_path(&self, mode: RepoMode) -> String
Returns the loose path of this object for a repository mode.
The path is relative to the objects/ directory and has the layout of
loose_path.
Trait Implementations§
Source§impl Clone for ObjectName
impl Clone for ObjectName
impl Copy for ObjectName
Source§impl Debug for ObjectName
impl Debug for ObjectName
Source§impl Display for ObjectName
impl Display for ObjectName
impl Eq for ObjectName
Source§impl Hash for ObjectName
impl Hash for ObjectName
Source§impl PartialEq for ObjectName
impl PartialEq for ObjectName
impl StructuralPartialEq for ObjectName
Auto Trait Implementations§
impl Forget for ObjectName
impl Freeze for ObjectName
impl Move for ObjectName
impl RefUnwindSafe for ObjectName
impl Send for ObjectName
impl Sync for ObjectName
impl Unpin for ObjectName
impl UnsafeUnpin for ObjectName
impl UnwindSafe for ObjectName
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