pub struct Device {
pub version: u32,
pub cert: Vec<u8>,
pub key: Vec<u8>,
pub ca: Vec<u8>,
pub rune: String,
}
Expand description
The Device
credentials store the device’s certificate, the device’s
private key, the certificate authority and the device’s rune.
Fields§
§version: u32
§cert: Vec<u8>
§key: Vec<u8>
§ca: Vec<u8>
§rune: String
Implementations§
Source§impl Device
impl Device
Sourcepub fn from_bytes(data: impl AsRef<[u8]>) -> Self
pub fn from_bytes(data: impl AsRef<[u8]>) -> Self
Creates a new set of Device
credentials from the given
credentials data blob. It defaults to the nobody credentials set.
Sourcepub fn from_path(path: impl AsRef<Path>) -> Self
pub fn from_path(path: impl AsRef<Path>) -> Self
Creates a new set of Device
credentials from a path that
contains a credentials data blob. Defaults to the nobody
credentials set.
Sourcepub fn with<V, S>(cert: V, key: V, rune: S) -> Self
pub fn with<V, S>(cert: V, key: V, rune: S) -> Self
Creates a new set of Device
credentials from a complete set of
credentials.
pub fn with_ca<V>(self, ca: V) -> Self
Trait Implementations§
Source§impl TlsConfigProvider for Device
impl TlsConfigProvider for Device
fn tls_config(&self) -> TlsConfig
Auto Trait Implementations§
impl Freeze for Device
impl RefUnwindSafe for Device
impl Send for Device
impl Sync for Device
impl Unpin for Device
impl UnwindSafe for Device
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for T
impl<T> Downcast for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request