Docs.rs
  • git-ref-0.24.1
    • git-ref 0.24.1
    • Permalink
    • Docs.rs crate page
    • MIT/Apache-2.0
    • Links
    • Repository
    • crates.io
    • Source
    • Owners
    • Byron
    • Dependencies
      • document-features ^0.2.1 normal optional
      • git-actor ^0.17.2 normal
      • git-features ^0.26.5 normal
      • git-hash ^0.10.3 normal
      • git-lock ^3.0.0 normal
      • git-object ^0.26.2 normal
      • git-path ^0.7.2 normal
      • git-tempfile ^3.0.0 normal
      • git-validate ^0.7.3 normal
      • memmap2 ^0.5.0 normal
      • nom ^7 normal
      • serde ^1.0.114 normal optional
      • thiserror ^1.0.34 normal
      • tempfile ^3.2.0 dev
    • Versions
    • 100% of the crate is documented
  • Platform
    • i686-pc-windows-msvc
    • i686-unknown-linux-gnu
    • x86_64-apple-darwin
    • x86_64-pc-windows-msvc
    • x86_64-unknown-linux-gnu
  • Feature flags
  • docs.rs
    • About docs.rs
    • Privacy policy
  • Rust
    • Rust website
    • The Book
    • Standard Library API Reference
    • Rust by Example
    • The Cargo Guide
    • Clippy Documentation

Crate git_ref

git_ref0.24.1

  • All Items

Sections

  • Feature Flags

Crate Items

  • Re-exports
  • Modules
  • Structs
  • Enums

Crates

  • git_ref

Crate git_ref

Source
Expand description

A crate for handling the references stored in various formats in a git repository.

References are also called refs which are used interchangeably.

Refs are the way to keep track of objects and come in two flavors.

  • symbolic refs are pointing to another reference
  • peeled refs point to the an object by its ObjectId

They can be identified by a relative path and stored in various flavors.

  • files
    • loose
      • one reference maps to a file on disk
    • packed
      • references are stored in a single human-readable file, along with their targets if they are symbolic.

§Feature Flags

  • serde1 — Data structures implement serde::Serialize and serde::Deserialize.

Re-exports§

pub use git_object::bstr;

Modules§

file
log
name
namespace
packed
peel
store
transaction
Transactions are the only way make changes to the ref store in order to increase the chance of consistency in a multi-threaded environment.

Structs§

FullName
Indicate that the given BString is a validate reference name or path that can be used as path on disk or written as target of a symbolic reference
FullNameRef
A validated and potentially partial reference name - it can safely be used for common operations.
Namespace
A validated prefix for references to act as a namespace.
PartialName
A validated complete and fully qualified owned reference name, safe to use for all operations.
PartialNameCow
A validated complete and fully qualified reference name, safe to use for all operations.
PartialNameRef
A validated complete and fully qualified referenced reference name, safe to use for all operations.
Reference
A fully owned backend agnostic reference

Enums§

Category
The various known categories of references.
Kind
Denotes the kind of reference.
Target
Denotes a ref target, equivalent to Kind, but with mutable data.
TargetRef
Denotes a ref target, equivalent to Kind, but with immutable data.

Results

Settings
Help
    enum
    git_ref::Target
    Denotes a ref target, equivalent to Kind, but with mutable …
    method
    git_ref::packed::Reference::target
    Decode the target as object
    struct field
    git_ref::Reference::target
    The target of the reference, either a symbolic reference …
    struct field
    git_ref::file::loose::Reference::target
    The target of the reference, either a symbolic reference …
    struct field
    git_ref::packed::Reference::target
    The target object id of the reference, hex encoded.
    enum
    git_ref::TargetRef
    Denotes a ref target, equivalent to Kind, but with …
    method
    git_ref::Target::into_id
    Target -> ObjectId
    Return the contained object id or panic
    method
    git_ref::Target::kind
    &Target -> Kind
    Returns the kind of the target the ref is pointing to.
    method
    git_ref::Target::clone
    &Target -> Target
    method
    git_ref::Target::to_ref
    &Target -> TargetRef
    Interpret this owned Target as shared Target
    method
    git_ref::Target::is_null
    &Target -> bool
    Return true if this is a peeled target with a null hash
    method
    git_ref::Target::id
    &Target -> &oid
    Interpret this target as object id or panic if it is …
    method
    git_ref::Target::try_into_id
    Target -> Result<ObjectId, Target>
    Return the contained object id if the target is peeled or …
    method
    git_ref::Target::eq
    &Target, &TargetRef -> bool
    method
    git_ref::Target::cmp
    &Target, &Target -> Ordering
    method
    git_ref::Target::try_id
    &Target -> Option<&oid>
    Interpret this target as object id which maybe None if it …
    method
    git_ref::Target::try_name
    &Target -> Option<&FullNameRef>
    Interpret this target as name of the reference it points …
    method
    git_ref::Target::serialize
    &Target, __S -> Result
    method
    git_ref::Target::fmt
    &Target, &mut Formatter -> Result
    method
    git_ref::Target::partial_cmp
    &Target, &Target -> Option<Ordering>
    method
    git_ref::Target::hash
    &Target, &mut __H -> ()
    struct field
    git_ref::Reference::target
    Reference -> Target
    The target of the reference, either a symbolic reference …
    struct field
    git_ref::file::loose::Reference::target
    Reference -> Target
    The target of the reference, either a symbolic reference …
    struct field
    git_ref::transaction::Change::Update::new
    Update -> Target
    The new state of the reference, either for updating an …
    struct field
    git_ref::file::transaction::prepare::Error::MustNotExist::new
    MustNotExist -> Target
    method
    git_ref::Target::from
    ObjectId -> Target
    struct field
    git_ref::file::transaction::prepare::Error::MustNotExist::actual
    MustNotExist -> Target
    struct field
    git_ref::file::transaction::prepare::Error::ReferenceOutOfDate::actual
    ReferenceOutOfDate -> Target
    struct field
    git_ref::file::transaction::prepare::Error::MustExist::expected
    MustExist -> Target
    struct field
    git_ref::file::transaction::prepare::Error::ReferenceOutOfDate::expected
    ReferenceOutOfDate -> Target
    method
    git_ref::TargetRef::into_owned
    TargetRef -> Target
    Convert this instance into an owned version, without …
    method
    git_ref::Target::deserialize
    __D -> Result<Target>
    method
    git_ref::Target::clone
    &Target -> Target
    method
    git_ref::Target::try_into_id
    Target -> Result<ObjectId, Target>
    Return the contained object id if the target is peeled or …