Trait Revision

Source
pub trait Revision {
    type Error: Error + Send + Sync + 'static;

    // Required method
    fn object_id(&self, repo: &Repository) -> Result<Oid, Self::Error>;
}
Expand description

Supports various ways to specify a revision used in Git.

Required Associated Types§

Source

type Error: Error + Send + Sync + 'static

Required Methods§

Source

fn object_id(&self, repo: &Repository) -> Result<Oid, Self::Error>

Returns the object id of this revision in repo.

Implementations on Foreign Types§

Source§

impl Revision for &str

Source§

type Error = Error

Source§

fn object_id(&self, _repo: &Repository) -> Result<Oid, Self::Error>

Source§

impl Revision for String

Source§

type Error = Error

Source§

fn object_id(&self, _repo: &Repository) -> Result<Oid, Self::Error>

Source§

impl Revision for Qualified<'_>

Source§

type Error = Error

Source§

fn object_id(&self, repo: &Repository) -> Result<Oid, Self::Error>

Source§

impl Revision for RefString

Source§

type Error = Error

Source§

fn object_id(&self, repo: &Repository) -> Result<Oid, Self::Error>

Source§

impl Revision for Oid

Source§

impl<R: Revision> Revision for &R

Source§

type Error = <R as Revision>::Error

Source§

fn object_id(&self, repo: &Repository) -> Result<Oid, Self::Error>

Source§

impl<R: Revision> Revision for Box<R>

Source§

type Error = <R as Revision>::Error

Source§

fn object_id(&self, repo: &Repository) -> Result<Oid, Self::Error>

Implementors§