pub enum Moved {
Missing,
Taken,
Unsupported,
Ok,
}Expand description
What a rename or a copy did.
Variants§
Missing
There was no source key, so there was nothing to move.
Taken
The destination was there and the caller said not to write over it.
Unsupported
The source holds something there is no way to copy.
A foreign body is owned by the engine above this crate and there is no generic way to ask one for a duplicate of itself. A graph could grow a deep copy and a vector index probably should not have one at all, so the decision belongs to whichever of them is under the key rather than here. Answered rather than panicked so the wire can say so in a sentence.
Ok
It happened.
Implementations§
Source§impl Moved
So that a caller can write ? on a rename without unpacking the enum.
impl Moved
So that a caller can write ? on a rename without unpacking the enum.
Moved::Taken is not an error here, because for RENAMENX it is the whole
answer and for RENAME it cannot happen.
Sourcepub fn found(self) -> Result<Moved>
pub fn found(self) -> Result<Moved>
The source was there, or the error RENAME gives when it was not.
§Errors
yo_common::Code::Invalid with Redis’s no such key for
Moved::Missing.