Trait git_odb::Header

source ·
pub trait Header {
    type Error: Error + 'static;

    // Required method
    fn try_header(
        &self,
        id: impl AsRef<oid>
    ) -> Result<Option<Header>, Self::Error>;
}
Expand description

A way to obtain object properties without fully decoding it.

Required Associated Types§

source

type Error: Error + 'static

The error returned by try_header().

Required Methods§

source

fn try_header(&self, id: impl AsRef<oid>) -> Result<Option<Header>, Self::Error>

Try to read the header of the object associated with id or return None if it could not be found.

Implementations on Foreign Types§

source§

impl<T> Header for &Twhere T: Header,

§

type Error = <T as Header>::Error

source§

fn try_header(&self, id: impl AsRef<oid>) -> Result<Option<Header>, Self::Error>

source§

impl<T> Header for Arc<T>where T: Header,

§

type Error = <T as Header>::Error

source§

fn try_header(&self, id: impl AsRef<oid>) -> Result<Option<Header>, Self::Error>

source§

impl<T> Header for Rc<T>where T: Header,

§

type Error = <T as Header>::Error

source§

fn try_header(&self, id: impl AsRef<oid>) -> Result<Option<Header>, Self::Error>

Implementors§

source§

impl<S> Header for Handle<S>where S: Deref<Target = Store> + Clone,

§

type Error = Error

source§

impl<S> Header for Cache<S>where S: Header,

§

type Error = <S as Header>::Error