added generic bounds
This commit is contained in:
parent
3faa26f43e
commit
1a00e6f5f9
1 changed files with 2 additions and 2 deletions
|
@ -63,7 +63,7 @@ impl From<u128> for Icechip<u128> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<T> Icechip<T> {
|
impl<T: Shl + Shr + Clone> Icechip<T> {
|
||||||
pub fn new(version: Version, epoch: Option<u64>) -> Icechip<T> {
|
pub fn new(version: Version, epoch: Option<u64>) -> Icechip<T> {
|
||||||
todo!();
|
todo!();
|
||||||
}
|
}
|
||||||
|
@ -73,7 +73,7 @@ impl<T> Icechip<T> {
|
||||||
self.epoch = Some(epoch);
|
self.epoch = Some(epoch);
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn tick(&self) -> Icechip<T> {
|
pub fn tick<T: Shl + Shr + Clone>(&self) -> Icechip<T> {
|
||||||
/*
|
/*
|
||||||
- if current timestamp in relation to self does not equal self, return an updated value, else increment the sequence
|
- if current timestamp in relation to self does not equal self, return an updated value, else increment the sequence
|
||||||
- if sequence is going to overflow, sleep 1 ms
|
- if sequence is going to overflow, sleep 1 ms
|
||||||
|
|
Loading…
Reference in a new issue