Closed vilgotf closed 9 months ago
From what I could tell this code is indeed now cancellation safe, which is an awesome improvement. Thanks a lot for the PR!
Commit message and title should be updated to include a !
to indicate the breaking change. To make writing a changelog easier, I would also like the PR description to mention deserialize_wanted
with stream adapters as a replacement for next_event
.
The
Shard::stream
module was removed.
This should probably have been the stream
module.
Public API change log
Config
no longer storesEventTypeFlags
.stream::StartRecommendedError
was moved toerror::StartRecommendedError
and it gotkind
,into_source
, andinto_parts
methods.error::ProcessError
was removed.error::SendError
was renamed toChannelError
and its (singular) variant is now namedClosed
.error::ReceiveMessageErrorType
now has only four variants (down from 7):Compression
,Deserializing
,Reconnect
, andWebSocket
(previouslyIo
).parse
no longer errors on unknown events.create_
set of functions are now scoped under root.create_bucket
performs additional input validation and takes correct integer sizes.create_range
is nowcreate_iterator
and takes an iterator instead of a range.Message::is_close
andMessage::is_text
boolean helpers.ConnectionStatus
was renamed toShardState
and theConnected
variant toActive
. Additionally,CloseCode
is no longer stored and a few methods were removed.Shard::status
was renamed toShard::state
.Shard::command
,Shard::send
, andShard::close
now queue themselves likeMessageSender
and are therefore non-async functions returning()
.Shard::next_event
was replaced bystream::StreamExt::next_event
which takesEventTypeFlags
as an argument.Shard::next_message
was replaced bypoll_next
.