pub struct WorkerIdError {
pub worker: u64,
pub max: u64,
}Expand description
Error returned when a worker ID exceeds the maximum for a generator’s layout.
Produced by Snowflake::try_new. The panicking Snowflake::new
constructor turns this into a panic instead.
Fields§
§worker: u64The worker ID that was supplied.
max: u64Maximum valid worker ID for this generator’s WK bit width.
Trait Implementations§
Source§impl Clone for WorkerIdError
impl Clone for WorkerIdError
Source§fn clone(&self) -> WorkerIdError
fn clone(&self) -> WorkerIdError
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 WorkerIdError
Source§impl Debug for WorkerIdError
impl Debug for WorkerIdError
Source§impl Display for WorkerIdError
impl Display for WorkerIdError
impl Eq for WorkerIdError
Source§impl Error for WorkerIdError
Available on crate feature std only.
impl Error for WorkerIdError
Available on crate feature
std only.1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl PartialEq for WorkerIdError
impl PartialEq for WorkerIdError
impl StructuralPartialEq for WorkerIdError
Auto Trait Implementations§
impl Freeze for WorkerIdError
impl RefUnwindSafe for WorkerIdError
impl Send for WorkerIdError
impl Sync for WorkerIdError
impl Unpin for WorkerIdError
impl UnsafeUnpin for WorkerIdError
impl UnwindSafe for WorkerIdError
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