pub struct FeedSubscriptionMessage {
pub channel: u32,
pub message_type: String,
pub add: Option<Vec<FeedSubscription>>,
pub remove: Option<Vec<FeedSubscription>>,
pub reset: Option<bool>,
}Expand description
Represents a message for managing feed subscriptions.
This message is used to add, remove, or reset subscriptions to data feeds.
It is serialized and deserialized using the serde library,
with field names converted to camelCase. The channel field is used
to identify the specific connection or channel the message is associated with.
The type field indicates the type of message, which is always “FEED_SUBSCRIPTION”.
The add, remove, and reset fields are optional and mutually exclusive.
If add is present, it contains a vector of FeedSubscription objects to be added.
If remove is present, it contains a vector of FeedSubscription objects to be removed.
If reset is true, all existing subscriptions are removed.
Fields§
§channel: u32The channel ID.
message_type: StringThe message type. This should always be “FEED_SUBSCRIPTION”.
add: Option<Vec<FeedSubscription>>An optional vector of subscriptions to add.
remove: Option<Vec<FeedSubscription>>An optional vector of subscriptions to remove.
reset: Option<bool>An optional flag to reset all subscriptions.