pub struct RelationRecord { /* private fields */ }Expand description
Binary representation of a semantic relation.
Implementations§
Source§impl RelationRecord
impl RelationRecord
pub const SIZE: usize = RELATION_RECORD_SIZE
pub const fn new(id: u32, source: u32, target: u32, weight: f32) -> Self
pub const fn id(self) -> u32
pub const fn source(self) -> u32
pub const fn target(self) -> u32
pub const fn weight(self) -> f32
pub fn encode(self) -> [u8; 16]
pub fn decode(bytes: &[u8]) -> Result<Self, FormatError>
Trait Implementations§
Source§impl BinaryRecord for RelationRecord
impl BinaryRecord for RelationRecord
Source§impl Clone for RelationRecord
impl Clone for RelationRecord
Source§fn clone(&self) -> RelationRecord
fn clone(&self) -> RelationRecord
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 moreimpl Copy for RelationRecord
Source§impl Debug for RelationRecord
impl Debug for RelationRecord
Source§impl PartialEq for RelationRecord
impl PartialEq for RelationRecord
impl StructuralPartialEq for RelationRecord
Auto Trait Implementations§
impl Freeze for RelationRecord
impl RefUnwindSafe for RelationRecord
impl Send for RelationRecord
impl Sync for RelationRecord
impl Unpin for RelationRecord
impl UnsafeUnpin for RelationRecord
impl UnwindSafe for RelationRecord
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