Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions crates/iota-rust-sdk/src/types/execution_status.rs
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,9 @@ pub enum CommandArgumentError {
/// Shared object operations such a wrapping, freezing, or converting to
/// owned are not allowed.
SharedObjectOperationNotAllowed,
/// Invalid argument arity. Expected a single argument but found a result
/// that expanded to multiple arguments.
InvalidArgumentArity,
}

#[derive(Eq, PartialEq, Clone, Debug)]
Expand Down Expand Up @@ -1083,6 +1086,7 @@ mod serialization {
InvalidObjectByValue,
InvalidObjectByMutRef,
SharedObjectOperationNotAllowed,
InvalidArgumentArity,
}

#[derive(serde_derive::Serialize, serde_derive::Deserialize)]
Expand All @@ -1099,6 +1103,7 @@ mod serialization {
InvalidObjectByValue,
InvalidObjectByMutRef,
SharedObjectOperationNotAllowed,
InvalidArgumentArity,
}

impl Serialize for CommandArgumentError {
Expand Down Expand Up @@ -1139,6 +1144,9 @@ mod serialization {
Self::SharedObjectOperationNotAllowed => {
ReadableCommandArgumentError::SharedObjectOperationNotAllowed
}
Self::InvalidArgumentArity => {
ReadableCommandArgumentError::InvalidArgumentArity
}
};
readable.serialize(serializer)
} else {
Expand Down Expand Up @@ -1169,6 +1177,7 @@ mod serialization {
Self::SharedObjectOperationNotAllowed => {
BinaryCommandArgumentError::SharedObjectOperationNotAllowed
}
Self::InvalidArgumentArity => BinaryCommandArgumentError::InvalidArgumentArity,
};
binary.serialize(serializer)
}
Expand Down Expand Up @@ -1214,6 +1223,9 @@ mod serialization {
ReadableCommandArgumentError::SharedObjectOperationNotAllowed => {
Self::SharedObjectOperationNotAllowed
}
ReadableCommandArgumentError::InvalidArgumentArity => {
Self::InvalidArgumentArity
}
}
})
} else {
Expand Down Expand Up @@ -1244,6 +1256,7 @@ mod serialization {
BinaryCommandArgumentError::SharedObjectOperationNotAllowed => {
Self::SharedObjectOperationNotAllowed
}
BinaryCommandArgumentError::InvalidArgumentArity => Self::InvalidArgumentArity,
})
}
}
Expand Down