#[repr(C)]pub struct Node { /* private fields */ }Expand description
§Node
Container used within Mycelium to store/transport packets of data.
key: StewId of this item.
value: Byte[] of original data associated with [u8; 16].
size: Estimated size of node.
timestamp: When this version of this node was created.
Implementations§
Source§impl Node
impl Node
pub fn new(originator: [u8; 16], item: &[u8]) -> Node
pub fn create_update_node(&self, update_item: &[u8]) -> Node
pub fn get_id(&self) -> [u8; 16]
pub fn get_item(&self) -> Vec<u8> ⓘ
pub fn get_revision(&self) -> usize
pub fn get_size(&self) -> usize
pub fn get_timestamp(&self) -> DateTime<Utc>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Node
impl<'de> Deserialize<'de> for Node
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
Source§impl Ord for Node
impl Ord for Node
Source§impl PartialOrd for Node
impl PartialOrd for Node
impl Eq for Node
Auto Trait Implementations§
impl Freeze for Node
impl RefUnwindSafe for Node
impl Send for Node
impl Sync for Node
impl Unpin for Node
impl UnwindSafe for Node
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