Struct redis_sk::Msg[][src]

pub struct Msg { /* fields omitted */ }
Expand description

Represents a pubsub message.

Implementations

This holds the data that comes from listening to a pubsub connection. It only contains actual message data.

Tries to convert provided Value into Msg.

Returns the channel this message came on.

Convenience method to get a string version of the channel. Unless your channel contains non utf-8 bytes you can always use this method. If the channel is not a valid string (which really should not happen) then the return value is "?".

Returns the message’s payload in a specific format.

Returns the bytes that are the message’s payload. This can be used as an alternative to the get_payload function if you are interested in the raw bytes in it.

Returns true if the message was constructed from a pattern subscription.

If the message was constructed from a message pattern this can be used to find out which one. It’s recommended to match against an Option<String> so that you do not need to use from_pattern to figure out if a pattern was set.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.