Skip to main content

Device

Struct Device 

Source
pub struct Device {
Show 31 fields pub addresses: Option<Vec<String>>, pub id: Option<String>, pub node_id: Option<String>, pub user: Option<String>, pub name: Option<String>, pub hostname: Option<String>, pub client_version: Option<String>, pub update_available: Option<bool>, pub os: Option<String>, pub created: Option<String>, pub connected_to_control: Option<bool>, pub last_seen: Option<String>, pub key_expiry_disabled: Option<bool>, pub expires: Option<String>, pub authorized: Option<bool>, pub is_external: Option<bool>, pub multiple_connections: Option<bool>, pub machine_key: Option<String>, pub node_key: Option<String>, pub blocks_incoming_connections: Option<bool>, pub enabled_routes: Option<Vec<String>>, pub advertised_routes: Option<Vec<String>>, pub client_connectivity: Option<ClientConnectivity>, pub tags: Option<Vec<String>>, pub tailnet_lock_error: Option<String>, pub tailnet_lock_key: Option<String>, pub ssh_enabled: Option<bool>, pub posture_identity: Option<PostureIdentity>, pub is_ephemeral: Option<bool>, pub distro: Option<Distro>, pub unknown: Unknown,
}
Expand description

A machine in a tailnet.

nodeId is the identifier to use; id is the older numeric one, still accepted wherever a device is named and still sent back here.

Fields§

§addresses: Option<Vec<String>>

Both families: 100.x.y.z and fd7a:115c:….

§id: Option<String>§node_id: Option<String>§user: Option<String>

Who registered it. For an untagged device this is its owner; a tagged device is owned by its tags instead.

§name: Option<String>

The MagicDNS name.

§hostname: Option<String>

The machine name shown in the admin console.

§client_version: Option<String>

Empty for a device shared in from another tailnet.

§update_available: Option<bool>§os: Option<String>§created: Option<String>§connected_to_control: Option<bool>§last_seen: Option<String>

Omitted for a device that has never been online, and for one that is online now.

§key_expiry_disabled: Option<bool>§expires: Option<String>§authorized: Option<bool>§is_external: Option<bool>

true for a device shared into this tailnet rather than a member of it.

§multiple_connections: Option<bool>

Several devices using one node key, which usually means node state was copied between machines.

§machine_key: Option<String>

A public key, not a secret, and of no use to any call here.

§node_key: Option<String>

A public key, and the one a locked tailnet signs to admit a node.

§blocks_incoming_connections: Option<bool>§enabled_routes: Option<Vec<String>>

The advertised routes an admin has approved.

§advertised_routes: Option<Vec<String>>

The routes this device asks to expose, approved or not.

§client_connectivity: Option<ClientConnectivity>§tags: Option<Vec<String>>§tailnet_lock_error: Option<String>

Only populated where tailnet lock is on.

§tailnet_lock_key: Option<String>

Present whether or not tailnet lock is on: every node generates one.

§ssh_enabled: Option<bool>§posture_identity: Option<PostureIdentity>§is_ephemeral: Option<bool>§distro: Option<Distro>§unknown: Unknown

Everything the description did not mention, kept so that a control plane ahead of this build still answers usefully.

Implementations§

Source§

impl Device

Source

pub const SCHEMA: &'static str

The path the vendored description reaches this by.

Source

pub const FIELDS: &'static [&'static str]

The JSON names of the fields above, in declaration order. Not the Rust names.

Trait Implementations§

Source§

impl Clone for Device

Source§

fn clone(&self) -> Device

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Device

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Device

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for Device

Source§

fn eq(&self, other: &Device) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for Device

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Device

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more