pub struct EdgeRecordOperations<'a> { /* private fields */ }Expand description
Edge record operations manager for CRUD operations
Implementations§
Source§impl<'a> EdgeRecordOperations<'a>
impl<'a> EdgeRecordOperations<'a>
Sourcepub fn new(graph_file: &'a mut GraphFile) -> Self
pub fn new(graph_file: &'a mut GraphFile) -> Self
Create a new edge record operations manager
§Arguments
graph_file- Mutable reference to the graph file
Sourcepub fn write_edge(&mut self, edge: &EdgeRecord) -> NativeResult<()>
pub fn write_edge(&mut self, edge: &EdgeRecord) -> NativeResult<()>
Sourcepub fn read_edge(&mut self, edge_id: NativeEdgeId) -> NativeResult<EdgeRecord>
pub fn read_edge(&mut self, edge_id: NativeEdgeId) -> NativeResult<EdgeRecord>
Read an edge record from the file
Reads and deserializes an edge record from the file by ID. Uses fixed-size slots and validates the record format.
§Arguments
edge_id- The ID of the edge to read
§Returns
The deserialized edge record if successful
§Errors
InvalidEdgeIdif the edge ID is out of rangeCorruptEdgeRecordif the record format is invalid
Sourcepub fn update_edge(&mut self, edge: &EdgeRecord) -> NativeResult<()>
pub fn update_edge(&mut self, edge: &EdgeRecord) -> NativeResult<()>
Sourcepub fn delete_edge(&mut self, edge_id: NativeEdgeId) -> NativeResult<()>
pub fn delete_edge(&mut self, edge_id: NativeEdgeId) -> NativeResult<()>
Sourcepub fn is_edge_deleted(&mut self, edge_id: NativeEdgeId) -> NativeResult<bool>
pub fn is_edge_deleted(&mut self, edge_id: NativeEdgeId) -> NativeResult<bool>
Auto Trait Implementations§
impl<'a> Freeze for EdgeRecordOperations<'a>
impl<'a> RefUnwindSafe for EdgeRecordOperations<'a>
impl<'a> Send for EdgeRecordOperations<'a>
impl<'a> Sync for EdgeRecordOperations<'a>
impl<'a> Unpin for EdgeRecordOperations<'a>
impl<'a> !UnwindSafe for EdgeRecordOperations<'a>
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more