Struct ironoxide::common::DeviceContext [−][src]
pub struct DeviceContext { /* fields omitted */ }
Expand description
Signing and encryption key pairs and metadata for a device.
Required to initialize the SDK with a set of device keys (see ironoxide::initialize).
Can be generated by calling generate_new_device and
passing the result to DeviceContext::from
.
Implementations
pub fn new(
account_id: UserId,
segment_id: usize,
device_private_key: PrivateKey,
signing_private_key: DeviceSigningKeyPair
) -> DeviceContext
pub fn new(
account_id: UserId,
segment_id: usize,
device_private_key: PrivateKey,
signing_private_key: DeviceSigningKeyPair
) -> DeviceContext
Constructs a DeviceContext
from its components.
To instead generate a new DeviceContext
for the user, call generate_new_device
and pass the result to DeviceContext::from
.
ID of the device’s owner
ID of the segment
Private signing key of the device
Private encryption key of the device
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Performs the conversion.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for DeviceContext
impl Send for DeviceContext
impl Sync for DeviceContext
impl Unpin for DeviceContext
impl UnwindSafe for DeviceContext
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
type Output = T
type Output = T
Should always be Self
pub fn vzip(self) -> V