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
sourceimpl 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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> CompatExt for T
impl<T> CompatExt for T
fn compat_ref(&self) -> Compat<&T>
fn compat_ref(&self) -> Compat<&T>
Applies the [
Compat
] adapter by shared reference. Read morefn compat_mut(&mut self) -> Compat<&mut T>
fn compat_mut(&mut self) -> Compat<&mut T>
Applies the [
Compat
] adapter by mutable reference. Read more