diff --git a/socketio/src/asynchronous/client/client.rs b/socketio/src/asynchronous/client/client.rs index 5fa56978..8c3d0b2e 100644 --- a/socketio/src/asynchronous/client/client.rs +++ b/socketio/src/asynchronous/client/client.rs @@ -97,7 +97,7 @@ impl Client { /// Attempts to fetch data given by [`ClientBuilder::data`] /// /// None is returned if data was not given or data does not match [`ClientBuilder::data`] - pub fn try_data(&self) -> Option> { + pub fn custom_data(&self) -> Option> { Arc::clone(&self.data).downcast().ok() } diff --git a/socketio/src/client/raw_client.rs b/socketio/src/client/raw_client.rs index 8de29b48..a3e84011 100644 --- a/socketio/src/client/raw_client.rs +++ b/socketio/src/client/raw_client.rs @@ -72,7 +72,7 @@ impl RawClient { /// Attempts to fetch data given by [`ClientBuilder::data`] /// /// None is returned if data was not given or data does not match [`ClientBuilder::data`] - pub fn try_data(&self) -> Option> { + pub fn custom_data(&self) -> Option> { Arc::clone(&self.data).downcast().ok() }