pub enum SingleDiskFarmError {
Show 15 variants
FailedToOpenIdentity(IdentityError),
LikelyAlreadyInUse(Error),
Io(Error),
TokioJoinError(JoinError),
PieceCacheError(DiskPieceCacheError),
CantPreallocateMetadataFile(Error),
CantPreallocatePlotFile(Error),
WrongChain {
id: FarmId,
correct_chain: String,
wrong_chain: String,
},
IdentityMismatch {
id: FarmId,
correct_public_key: Ed25519PublicKey,
wrong_public_key: Ed25519PublicKey,
},
InvalidPiecesInSector {
id: FarmId,
max_supported: u16,
initialized_with: u16,
},
FailedToDecodeMetadataHeader(Error),
UnexpectedMetadataVersion(u8),
InsufficientAllocatedSpace {
min_space: u64,
allocated_space: u64,
},
FarmTooLarge {
allocated_space: u64,
allocated_sectors: u64,
max_space: u64,
max_sectors: u16,
},
FailedToCreateThreadPool(ThreadPoolBuildError),
}Expand description
Errors happening when trying to create/open single disk farm
Variants§
FailedToOpenIdentity(IdentityError)
Failed to open or create identity
LikelyAlreadyInUse(Error)
Farm is likely already in use, make sure no other farmer is using it
Io(Error)
I/O error occurred
TokioJoinError(JoinError)
Failed to spawn task for blocking thread
PieceCacheError(DiskPieceCacheError)
Piece cache error
CantPreallocateMetadataFile(Error)
Can’t preallocate metadata file, probably not enough space on disk
CantPreallocatePlotFile(Error)
Can’t preallocate plot file, probably not enough space on disk
WrongChain
Wrong chain (genesis hash)
Fields
IdentityMismatch
Public key in identity doesn’t match metadata
Fields
§
correct_public_key: Ed25519PublicKeyPublic key used during farm creation
§
wrong_public_key: Ed25519PublicKeyCurrent public key
InvalidPiecesInSector
Invalid number pieces in sector
Fields
FailedToDecodeMetadataHeader(Error)
Failed to decode metadata header
UnexpectedMetadataVersion(u8)
Unexpected metadata version
InsufficientAllocatedSpace
Allocated space is not enough for one sector
FarmTooLarge
Farm is too large
Fields
FailedToCreateThreadPool(ThreadPoolBuildError)
Failed to create thread pool
Trait Implementations§
Source§impl Debug for SingleDiskFarmError
impl Debug for SingleDiskFarmError
Source§impl Display for SingleDiskFarmError
impl Display for SingleDiskFarmError
Source§impl Error for SingleDiskFarmError
impl Error for SingleDiskFarmError
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 From<DiskPieceCacheError> for SingleDiskFarmError
impl From<DiskPieceCacheError> for SingleDiskFarmError
Source§fn from(source: DiskPieceCacheError) -> Self
fn from(source: DiskPieceCacheError) -> Self
Converts to this type from the input type.
Source§impl From<Error> for SingleDiskFarmError
impl From<Error> for SingleDiskFarmError
Source§impl From<IdentityError> for SingleDiskFarmError
impl From<IdentityError> for SingleDiskFarmError
Source§fn from(source: IdentityError) -> Self
fn from(source: IdentityError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for SingleDiskFarmError
impl !RefUnwindSafe for SingleDiskFarmError
impl Send for SingleDiskFarmError
impl Sync for SingleDiskFarmError
impl Unpin for SingleDiskFarmError
impl !UnwindSafe for SingleDiskFarmError
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more