Struct dittolive_ditto::identity::OnlinePlayground
source · pub struct OnlinePlayground { /* private fields */ }
Expand description
Test a Ditto Cloud app with a simple shared token (“Playground mode”). This
mode offers no security and must only be used for development. Other
behavior mirrors the OnlineWithAuthentication
identity.
Implementations§
source§impl OnlinePlayground
impl OnlinePlayground
sourcepub fn new(
_ditto_root: Arc<dyn DittoRoot>,
app_id: AppId,
shared_token: String,
enable_cloud_sync: bool,
custom_auth_url: Option<&str>
) -> Result<Self, DittoError>
pub fn new( _ditto_root: Arc<dyn DittoRoot>, app_id: AppId, shared_token: String, enable_cloud_sync: bool, custom_auth_url: Option<&str> ) -> Result<Self, DittoError>
Construct a new OnlinePlayground
identity.
ditto_root
: Instance of DittoRoot indicating local storage directoryapp_id
: A unique AppId which must be a valid UUIDv4shared_token
: A shared token used to set up theOnlinePlayground
session. This token is provided by the portal when setting up the application.enable_cloud_sync
: Should WebSocket sync withwss://<app_id>.cloud.ditto.live
be enabled by default. Do not enable this if you want to provide a custom sync URL latercustom_auth_url
: An optional alternative URL for authentication requests. Defaults tohttps://<app_id>.cloud.ditto.live/
Auto Trait Implementations§
impl !RefUnwindSafe for OnlinePlayground
impl Send for OnlinePlayground
impl Sync for OnlinePlayground
impl Unpin for OnlinePlayground
impl !UnwindSafe for OnlinePlayground
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more