pub struct BindingDelta {
pub format_version: u8,
pub parent: Option<ContentHash>,
pub files: Vec<FileBindingDelta>,
}Expand description
Content-addressed state binding delta.
Fields§
§format_version: u8§parent: Option<ContentHash>Content address of the first parent’s binding delta.
files: Vec<FileBindingDelta>Replacement records for the invalidation frontier, sorted by path.
Implementations§
Source§impl BindingDelta
impl BindingDelta
pub const FORMAT_VERSION: u8 = 1
Sourcepub fn new(parent: Option<ContentHash>, files: Vec<FileBindingDelta>) -> Self
pub fn new(parent: Option<ContentHash>, files: Vec<FileBindingDelta>) -> Self
Construct a canonical binding delta.
Sourcepub fn encode(&self) -> Result<Vec<u8>, SemanticIndexError>
pub fn encode(&self) -> Result<Vec<u8>, SemanticIndexError>
Encode this delta as named MessagePack.
Sourcepub fn decode(bytes: &[u8]) -> Result<Self, SemanticIndexError>
pub fn decode(bytes: &[u8]) -> Result<Self, SemanticIndexError>
Decode and version-check a binding delta.
Trait Implementations§
Source§impl Clone for BindingDelta
impl Clone for BindingDelta
Source§fn clone(&self) -> BindingDelta
fn clone(&self) -> BindingDelta
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BindingDelta
impl Debug for BindingDelta
Source§impl<'de> Deserialize<'de> for BindingDelta
impl<'de> Deserialize<'de> for BindingDelta
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for BindingDelta
Source§impl PartialEq for BindingDelta
impl PartialEq for BindingDelta
Source§impl Serialize for BindingDelta
impl Serialize for BindingDelta
impl StructuralPartialEq for BindingDelta
Auto Trait Implementations§
impl Freeze for BindingDelta
impl RefUnwindSafe for BindingDelta
impl Send for BindingDelta
impl Sync for BindingDelta
impl Unpin for BindingDelta
impl UnsafeUnpin for BindingDelta
impl UnwindSafe for BindingDelta
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