pub enum PublishResult {
StoredNew {
global_stream_id: String,
},
AlreadyExists {
global_stream_id: String,
},
Expired,
}Expand description
Result of publishing a message to the relay
Variants§
StoredNew
Message was newly stored with this global stream ID
AlreadyExists
Message already existed at this global stream ID
Expired
Message was expired and not stored
Implementations§
Source§impl PublishResult
impl PublishResult
Sourcepub fn global_stream_id(&self) -> Option<&str>
pub fn global_stream_id(&self) -> Option<&str>
Get the global stream ID if available (None for expired messages)
Sourcepub fn was_stored(&self) -> bool
pub fn was_stored(&self) -> bool
Check if the message was stored (either new or already existed)
Trait Implementations§
Source§impl Clone for PublishResult
impl Clone for PublishResult
Source§fn clone(&self) -> PublishResult
fn clone(&self) -> PublishResult
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PublishResult
impl Debug for PublishResult
Source§impl<'de> Deserialize<'de> for PublishResult
impl<'de> Deserialize<'de> for PublishResult
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for PublishResult
impl PartialEq for PublishResult
Source§impl Serialize for PublishResult
impl Serialize for PublishResult
impl Eq for PublishResult
impl StructuralPartialEq for PublishResult
Auto Trait Implementations§
impl Freeze for PublishResult
impl RefUnwindSafe for PublishResult
impl Send for PublishResult
impl Sync for PublishResult
impl Unpin for PublishResult
impl UnwindSafe for PublishResult
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> Classify for T
impl<T> Classify for T
type Classified = T
fn classify(self) -> T
§impl<T> Classify for T
impl<T> Classify for T
type Classified = T
fn classify(self) -> T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Declassify for T
impl<T> Declassify for T
type Declassified = T
fn declassify(self) -> T
§impl<T> Declassify for T
impl<T> Declassify for T
type Declassified = T
fn declassify(self) -> T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more