Cargo Features
[dependencies]
pubnub = { version = "0.6.0", default-features = false, features = ["full", "publish", "access", "crypto", "parse_token", "serde", "reqwest", "tokio", "blocking", "std", "extra_platforms", "contract_test", "full_no_std", "full_no_std_platform_independent", "pubnub_only", "mock_getrandom", "subscribe", "presence"] }
- full = access, blocking, crypto, parse_token, presence, publish, reqwest, serde, std, subscribe, tokio
-
Enables all non-conflicting features
- default = blocking, publish, reqwest, serde, std, subscribe, tokio
-
Enables all default features
- publish default contract_test? full? full_no_std? full_no_std_platform_independent? pubnub_only?
-
[PubNub features]
Enables publish featureAffects
dx::publish
,utils::encoding
,utils::headers
… - access contract_test? full? full_no_std? full_no_std_platform_independent? pubnub_only?
-
Enables access manager feature
Affects
dx::access
,utils::encoding
,utils::headers
… - crypto contract_test? full? full_no_std? full_no_std_platform_independent? pubnub_only? = getrandom
-
Enables crypto module
Affects
providers::crypto
… - parse_token contract_test? full? full_no_std? full_no_std_platform_independent? pubnub_only?
-
Enables token parsing
Enables ciborium
Affects
dx::parse_token
… - serde default full? full_no_std? full_no_std_platform_independent?
-
[Implementation features]
Enables serde implementation for serialization and deserializationEnables serde and serde_json, serde of hashbrown ^0.14.0
Affects
deserializer::Deserializer.deserialize
,parse_token::parse_token
,result::GetStateInfo.state
,result::GetStateSuccessBody.channels
,result::HereNowUser.state
,providers::serialization_serde
,providers::deserialization_serde
,pubnub_client::PubNubClient
… - reqwest default full? full_no_std?
-
Enables reqwest implementation for transport layer
Enables bytes and reqwest ^0.11
Affects
transport::reqwest
,pubnub_client::PubNubClient
… - tokio default contract_test? full? full_no_std?
-
Enables tokio runtime for subscribe loop
Enables tokio
Affects
providers::futures_tokio
… - blocking default full? full_no_std? full_no_std_platform_independent? pubnub_only?
-
Enables blocking implementation for transport layer
Enables blocking of optional reqwest ^0.11
Affects
transport::blocking
,reqwest::blocking
… - std default contract_test? full?
-
Enables std library
Enables async-channel ^1.8, rand, std of sha2, snafu ^0.7, spin, time, uuid, optional serde, and optional serde_json and std of getrandom, hmac, and log
hmac:
signature
and async-await and std of optional futures
subscribe, presence
and std of base64 ^0.21, derive_builder ^0.12, optional bytes, and optional ciborium
ciborium:
parse_token
Affects
core::retry_policy
,transport_request::TransportRequest.timeout
,types::PresenceParameters
,pubnub_client::TransportConfiguration
,pubnub_client::PresenceConfiguration.heartbeat_interval
,pubnub_client::PubNubConfig.transport
,core::runtime
,providers::futures_tokio
,pubnub_client::PubNubClientRuntimeBuilder
… - extra_platforms
-
Enables very specific implementations for different platforms.
Use only if you know what you're doing.
Using the portable_atomic crate allows for supporting platforms without native atomic operations. This is unsafe and enabling it for multicore systems is unsound. See the
portable_atomic
andcritical_section
crates docs for more information. https://docs.rs/portable_atomic and https://docs.rs/critical-section/latest/critical_section/Enables portable-atomic, portable_atomic of spin
- contract_test = access, crypto, parse_token, presence, publish, std, subscribe, tokio
-
[Internal features] (not intended for use outside of the library)
- full_no_std = access, blocking, crypto, parse_token, presence, publish, reqwest, serde, subscribe, tokio
- full_no_std_platform_independent = access, blocking, crypto, parse_token, presence, publish, serde, subscribe
- pubnub_only = access, blocking, crypto, parse_token, presence, publish, subscribe
- mock_getrandom
- subscribe default contract_test? full? full_no_std? full_no_std_platform_independent? pubnub_only?
-
TODO: temporary treated as internal until we officially release it
Enables futures
Affects
dx::subscribe
,core::runtime
,pubnub_client::PresenceConfiguration
,pubnub_client::PubNubConfig.presence
,pubnub_client::PubNubClientRuntimeBuilder
,utils::encoding
,utils::headers
… - presence contract_test? full? full_no_std? full_no_std_platform_independent? pubnub_only?
-
Enables futures
Affects
dx::presence
,pubnub_client::PresenceConfiguration
,pubnub_client::PubNubConfig.presence
,pubnub_client::PubNubClientRuntimeBuilder
,utils::encoding
,utils::headers
…
Features from optional dependencies
In crates that don't use the dep:
syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.