pub struct SourceTargetMap;Implementations§
Source§impl SourceTargetMap
impl SourceTargetMap
Sourcepub fn entries<S>(
store: &mut S,
root: Option<ContentHash>,
limit: usize,
budget: &mut MapBudget,
) -> Result<Vec<(ContentHash, ContentHash)>, MapError<<S as SourceTargetMapStore>::Error>>where
S: SourceTargetMapStore,
pub fn entries<S>(
store: &mut S,
root: Option<ContentHash>,
limit: usize,
budget: &mut MapBudget,
) -> Result<Vec<(ContentHash, ContentHash)>, MapError<<S as SourceTargetMapStore>::Error>>where
S: SourceTargetMapStore,
Bounded canonical enumeration for transfer verification and rebuilding indexes. Capture updates still use individual trie routes.
pub fn get<S>(
store: &mut S,
root: Option<ContentHash>,
key: ContentHash,
budget: &mut MapBudget,
) -> Result<Option<ContentHash>, MapError<<S as SourceTargetMapStore>::Error>>where
S: SourceTargetMapStore,
Sourcepub fn update<S>(
store: &mut S,
root: Option<ContentHash>,
key: ContentHash,
value: Option<ContentHash>,
budget: &mut MapBudget,
) -> Result<Option<ContentHash>, MapError<<S as SourceTargetMapStore>::Error>>where
S: SourceTargetMapStore,
pub fn update<S>(
store: &mut S,
root: Option<ContentHash>,
key: ContentHash,
value: Option<ContentHash>,
budget: &mut MapBudget,
) -> Result<Option<ContentHash>, MapError<<S as SourceTargetMapStore>::Error>>where
S: SourceTargetMapStore,
None deletes the key. Empty maps use a None root and store no node.
Equal values and absent deletions write nothing. The returned root is the
only publication point; keep the prior root when this returns an error.
Auto Trait Implementations§
impl Freeze for SourceTargetMap
impl RefUnwindSafe for SourceTargetMap
impl Send for SourceTargetMap
impl Sync for SourceTargetMap
impl Unpin for SourceTargetMap
impl UnsafeUnpin for SourceTargetMap
impl UnwindSafe for SourceTargetMap
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more