Struct tsid::TsidFactory
source · pub struct TsidFactory {
pub node_val: u64,
/* private fields */
}Fields§
§node_val: u64Implementations§
source§impl TsidFactory
impl TsidFactory
Example
use tsid::TsidFactory;
let factory = TsidFactory::with_node_bits(8,1);sourcepub fn new() -> Self
pub fn new() -> Self
Create a new TsidFactory with default settings
see TsidFactory::default
pub fn with_node_bits(node_bits: u8, node_id: u32) -> Self
pub fn create(&mut self) -> TSID
pub fn node_bits(&self) -> u8
pub fn counter_bits(&self) -> u8
pub fn node(&self) -> u32
Trait Implementations§
source§impl Debug for TsidFactory
impl Debug for TsidFactory
Auto Trait Implementations§
impl RefUnwindSafe for TsidFactory
impl Send for TsidFactory
impl Sync for TsidFactory
impl Unpin for TsidFactory
impl UnwindSafe for TsidFactory
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