Struct dittolive_ditto::identity::Manual
source · [−]pub struct Manual { /* private fields */ }
Expand description
An identity where devices are manually configured with a x509 certificate bundle
Implementations
sourceimpl Manual
impl Manual
sourcepub fn new(certificate_config_b64: &str) -> Result<Self, DittoError>
pub fn new(certificate_config_b64: &str) -> Result<Self, DittoError>
Contruct a Manual Identity
ditto_root
- DittoRoot instance indicating local storage directorycertificate_config_b64
- A valid configuration of a x509 PKI Client Certificate Chain, Private Key, and other Identity data which identifies this instance of this app to other peers and allows for a TLS session to be established. This bundle should be provided as a single Base64 encoded string
Trait Implementations
sourceimpl Identity for Manual
impl Identity for Manual
sourcefn auth_client(&self) -> Arc<BoxedAuthClient>
fn auth_client(&self) -> Arc<BoxedAuthClient>
Returns a shared reference to the underlying AuthClient
sourcefn is_web_valid(&self) -> bool
fn is_web_valid(&self) -> bool
Returns if the current web auth token is valid
sourcefn is_x509_valid(&self) -> bool
fn is_x509_valid(&self) -> bool
Returns if the configured x509 certificate is valid
sourcefn auth_url(&self) -> Result<String, DittoError>
fn auth_url(&self) -> Result<String, DittoError>
Returns the configured URL for Auth
sourcefn sync_url(&self) -> Result<String, DittoError>
fn sync_url(&self) -> Result<String, DittoError>
Returns the configured URL for websocket sync
sourcefn authenticator(&self) -> Option<DittoAuthenticator>
fn authenticator(&self) -> Option<DittoAuthenticator>
Returns the underlying DittoAuthenticator
if specified
sourcefn make_listener(
&self,
_transports: Weak<RwLock<TransportSync>>
) -> Option<Arc<ValidityListener>>
fn make_listener(
&self,
_transports: Weak<RwLock<TransportSync>>
) -> Option<Arc<ValidityListener>>
Constructs a ValidityListener
given a shared reference to the Ditto
Transports
Read more
sourcefn is_cloud_sync_enabled(&self) -> bool
fn is_cloud_sync_enabled(&self) -> bool
Indicates if cloud sync should be enabled by default
sourcefn requires_offline_only_license_token(&self) -> bool
fn requires_offline_only_license_token(&self) -> bool
Indicates whether the specific Identity type requires an offline only license token to be set. Read more
Auto Trait Implementations
impl !RefUnwindSafe for Manual
impl Send for Manual
impl Sync for Manual
impl Unpin for Manual
impl !UnwindSafe for Manual
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more