Skip to main content

BaseHunk

Enum BaseHunk 

Source
pub enum BaseHunk<Atom, Local> {
Show 13 variants FileMove { del: Atom, add: Atom, path: String, }, FileDel { del: Atom, contents: Option<Atom>, path: String, encoding: Option<Encoding>, }, FileUndel { undel: Atom, contents: Option<Atom>, path: String, encoding: Option<Encoding>, }, FileAdd { add_name: Atom, add_inode: Atom, contents: Option<Atom>, path: String, encoding: Option<Encoding>, }, SolveNameConflict { name: Atom, path: String, }, UnsolveNameConflict { name: Atom, path: String, }, Edit { change: Atom, local: Local, encoding: Option<Encoding>, }, Replacement { change: Atom, replacement: Atom, local: Local, encoding: Option<Encoding>, }, SolveOrderConflict { change: Atom, local: Local, }, UnsolveOrderConflict { change: Atom, local: Local, }, ResurrectZombies { change: Atom, local: Local, encoding: Option<Encoding>, }, AddRoot { name: Atom, inode: Atom, }, DelRoot { name: Atom, inode: Atom, },
}

Variants§

§

FileMove

Fields

§del: Atom
§add: Atom
§path: String
§

FileDel

Fields

§del: Atom
§contents: Option<Atom>
§path: String
§encoding: Option<Encoding>
§

FileUndel

Fields

§undel: Atom
§contents: Option<Atom>
§path: String
§encoding: Option<Encoding>
§

FileAdd

Fields

§add_name: Atom
§add_inode: Atom
§contents: Option<Atom>
§path: String
§encoding: Option<Encoding>
§

SolveNameConflict

Fields

§name: Atom
§path: String
§

UnsolveNameConflict

Fields

§name: Atom
§path: String
§

Edit

Fields

§change: Atom
§local: Local
§encoding: Option<Encoding>
§

Replacement

Fields

§change: Atom
§replacement: Atom
§local: Local
§encoding: Option<Encoding>
§

SolveOrderConflict

Fields

§change: Atom
§local: Local
§

UnsolveOrderConflict

Fields

§change: Atom
§local: Local
§

ResurrectZombies

Fields

§change: Atom
§local: Local
§encoding: Option<Encoding>
§

AddRoot

Fields

§name: Atom
§inode: Atom
§

DelRoot

Fields

§name: Atom
§inode: Atom

Implementations§

Source§

impl<L: Clone> BaseHunk<Atom<Option<Hash>>, L>

Source

pub fn inverse(&self, hash: &Hash) -> Self

Source§

impl<Context, Local> BaseHunk<Atom<Context>, Local>

Source

pub fn iter(&self) -> HunkIter<&Hunk<Context, Local>, &Atom<Context>>

Source

pub fn rev_iter(&self) -> RevHunkIter<&Hunk<Context, Local>, &Atom<Context>>

Source§

impl<H> BaseHunk<Atom<H>, Local>

Source

pub fn local(&self) -> Option<&Local>

Source

pub fn path(&self) -> &str

Source

pub fn line(&self) -> Option<usize>

Source§

impl<A, Local> BaseHunk<A, Local>

Source

pub fn atom_map<B, E, Loc, F: FnMut(A) -> Result<B, E>, L: FnMut(Local) -> Loc>( self, f: F, l: L, ) -> Result<BaseHunk<B, Loc>, E>

Source§

impl BaseHunk<Atom<Option<ChangeId>>, LocalByte>

Source

pub fn globalize<T: GraphTxnT>( self, txn: &T, ) -> Result<Hunk<Option<Hash>, Local>, T::GraphError>

Trait Implementations§

Source§

impl<Atom: Clone, Local: Clone> Clone for BaseHunk<Atom, Local>

Source§

fn clone(&self) -> BaseHunk<Atom, Local>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<Atom: Debug, Local: Debug> Debug for BaseHunk<Atom, Local>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de, Atom, Local> Deserialize<'de> for BaseHunk<Atom, Local>
where Atom: Deserialize<'de>, Local: Deserialize<'de>,

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl<Atom: Eq, Local: Eq> Eq for BaseHunk<Atom, Local>

Source§

impl<Atom: PartialEq, Local: PartialEq> PartialEq for BaseHunk<Atom, Local>

Source§

fn eq(&self, other: &BaseHunk<Atom, Local>) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl<Atom, Local> Serialize for BaseHunk<Atom, Local>
where Atom: Serialize, Local: Serialize,

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<Atom: PartialEq, Local: PartialEq> StructuralPartialEq for BaseHunk<Atom, Local>

Auto Trait Implementations§

§

impl<Atom, Local> Freeze for BaseHunk<Atom, Local>
where Atom: Freeze, Local: Freeze,

§

impl<Atom, Local> RefUnwindSafe for BaseHunk<Atom, Local>
where Atom: RefUnwindSafe, Local: RefUnwindSafe,

§

impl<Atom, Local> Send for BaseHunk<Atom, Local>
where Atom: Send, Local: Send,

§

impl<Atom, Local> Sync for BaseHunk<Atom, Local>
where Atom: Sync, Local: Sync,

§

impl<Atom, Local> Unpin for BaseHunk<Atom, Local>
where Atom: Unpin, Local: Unpin,

§

impl<Atom, Local> UnsafeUnpin for BaseHunk<Atom, Local>
where Atom: UnsafeUnpin, Local: UnsafeUnpin,

§

impl<Atom, Local> UnwindSafe for BaseHunk<Atom, Local>
where Atom: UnwindSafe, Local: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.