pub enum StoreObjectResp {
PleaseRetry,
RetryWithNewAuthToken,
MissingHash,
NotFound,
HashDidNotMatch,
NoChanges,
QuotumReached(QuotumName),
Stored {
stored_objects: HashMap<Handle, UserObjectDetails>,
},
}Expand description
Returned by NewObjectEP and OverwriteObjectEP.
Variants§
PleaseRetry
Please retry the same request again. This may happen when another call changed the user’s state. The purpose of letting the client make the same call again (instead of letting the server retry) is that the client gets feedback about this.
RetryWithNewAuthToken
The auth provided is expired or otherwise invalid. Obtain a new one and retry.
MissingHash
Returned when using NewObjectEP, but there is already an object stored under that handle.
To make sure that you’re not overriding recent changes made by another global client,
you must pass the hash of the object you want to overwrite by using the
OverwriteObjectEP instead.
NotFound
Returned when OverwriteObjectEP is used, but there is no (longer) an object
stored under that handle. Use NewObjectEP to create a new one.
HashDidNotMatch
Returned when using OverwriteObjectEP but the object stored at that handle
has a different hash, presumably because it has been changed in the meantime by another
global client.
NoChanges
The object that you sent did not differ from the object already stored. Doing this should be avoided.
QuotumReached(QuotumName)
Cannot perform this request, because the user has (or would have) reached the named quotum.
This should only happen when the user is trying to abuse PubHubs central as object store, or when the global client is storing more than it should.
Stored
The object was stored succesfully. The user objects that are currently stored for this user are returned.
Fields
stored_objects: HashMap<Handle, UserObjectDetails>Trait Implementations§
Source§impl Clone for StoreObjectResp
impl Clone for StoreObjectResp
Source§fn clone(&self) -> StoreObjectResp
fn clone(&self) -> StoreObjectResp
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for StoreObjectResp
impl Debug for StoreObjectResp
Source§impl<'de> Deserialize<'de> for StoreObjectResp
impl<'de> Deserialize<'de> for StoreObjectResp
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for StoreObjectResp
impl RefUnwindSafe for StoreObjectResp
impl Send for StoreObjectResp
impl Sync for StoreObjectResp
impl Unpin for StoreObjectResp
impl UnsafeUnpin for StoreObjectResp
impl UnwindSafe for StoreObjectResp
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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>
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>
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