Struct git_repository::Easy [−][src]
pub struct Easy {
pub repo: Rc<Repository>,
pub state: State,
}
Expand description
A handle to a Repository
for use when the repository needs to be shared, providing state for one ObjectRef
at a time, , created with Repository::into_easy()
.
For use in one-off single-threaded commands that don’t have to deal with the changes they potentially incur.
TODO: There should be an EasyExclusive
using Rc<RefCell<…>>
but that needs GATs.
Fields
repo: Rc<Repository>
The repository
state: State
The state with interior mutability
Trait Implementations
TODO: With GATs, this can return an actual RefMut<’a, _> so mutability is possible in single-threaded mode.
type RepoRef = Rc<Repository>
type RepoRef = Rc<Repository>
The type of a shared borrow to the Repository
type RepoRefMut = &'static mut Repository
type RepoRefMut = &'static mut Repository
The type of a mutable borrow to the Repository
Return a shared borrow to the repository. Read more
Performs the conversion.
Auto Trait Implementations
impl !RefUnwindSafe for Easy
impl UnwindSafe for Easy
Blanket Implementations
Mutably borrows from an owned value. Read more