Merge pull request #853 from nuttycom/doc/zip321_errors
doc-only: Document ZIP 321 error variants.
This commit is contained in:
commit
d2c58180b4
|
@ -26,12 +26,22 @@ use crate::address::RecipientAddress;
|
||||||
/// Errors that may be produced in decoding of payment requests.
|
/// Errors that may be produced in decoding of payment requests.
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub enum Zip321Error {
|
pub enum Zip321Error {
|
||||||
|
/// A memo field in the ZIP 321 URI was not properly base-64 encoded
|
||||||
InvalidBase64(base64::DecodeError),
|
InvalidBase64(base64::DecodeError),
|
||||||
|
/// A memo value exceeded 512 bytes in length or could not be interpreted as a UTF-8 string
|
||||||
|
/// when using a valid UTF-8 lead byte.
|
||||||
MemoBytesError(memo::Error),
|
MemoBytesError(memo::Error),
|
||||||
|
/// The ZIP 321 request included more payments than can be created within a single Zcash
|
||||||
|
/// transaction. The wrapped value is the number of payments in the request.
|
||||||
TooManyPayments(usize),
|
TooManyPayments(usize),
|
||||||
|
/// Parsing encountered a duplicate ZIP 321 URI parameter for the returned payment index.
|
||||||
DuplicateParameter(parse::Param, usize),
|
DuplicateParameter(parse::Param, usize),
|
||||||
|
/// The payment at the wrapped index attempted to include a memo when sending to a
|
||||||
|
/// transparent recipient address, which is not supported by the protocol.
|
||||||
TransparentMemo(usize),
|
TransparentMemo(usize),
|
||||||
|
/// The payment at the wrapped index did not include a recipient address.
|
||||||
RecipientMissing(usize),
|
RecipientMissing(usize),
|
||||||
|
/// The ZIP 321 URI was malformed and failed to parse.
|
||||||
ParseError(String),
|
ParseError(String),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue