Skip to main content

BeginArgsBuilder

Struct BeginArgsBuilder 

Source
pub struct BeginArgsBuilder<S: State = Empty> { /* private fields */ }
Expand description

Use builder syntax to set the inputs and finish with build().

Implementations§

Source§

impl<S: State> BeginArgsBuilder<S>

Source

pub fn build(self) -> BeginArgs
where S: IsComplete,

Finish building and return the requested object

Source

pub fn server_id(self, value: Uuid) -> BeginArgsBuilder<SetServerId<S>>
where S::ServerId: IsUnset,

Required.

ID of the machine to enroll against. Named server_id because that is the name fielded agents send; the value has always identified the box.

Source

pub fn spki(self, value: String) -> BeginArgsBuilder<SetSpki<S>>
where S::Spki: IsUnset,

Optional (Some / Option setters). Base64-standard-encoded DER SubjectPublicKeyInfo (SPKI) of the device’s public key. Only required when enrolling over a transport with no client certificate to read the key from (e.g. over Tailscale); omit it when enrolling over mTLS, where the key is taken from the presented client certificate. The returned challenge is bound to this key, so the same value must be supplied again when completing enrollment.

Source

pub fn maybe_spki(self, value: Option<String>) -> BeginArgsBuilder<SetSpki<S>>
where S::Spki: IsUnset,

Optional (Some / Option setters). Base64-standard-encoded DER SubjectPublicKeyInfo (SPKI) of the device’s public key. Only required when enrolling over a transport with no client certificate to read the key from (e.g. over Tailscale); omit it when enrolling over mTLS, where the key is taken from the presented client certificate. The returned challenge is bound to this key, so the same value must be supplied again when completing enrollment.

Source

pub fn token(self, value: String) -> BeginArgsBuilder<SetToken<S>>
where S::Token: IsUnset,

Required.

The enrollment token issued by an operator for this machine.

Auto Trait Implementations§

§

impl<S> Freeze for BeginArgsBuilder<S>
where PhantomData<(fn() -> S, fn() -> PhantomData<BeginArgs>)>: Freeze,

§

impl<S> RefUnwindSafe for BeginArgsBuilder<S>

§

impl<S> Send for BeginArgsBuilder<S>
where PhantomData<(fn() -> S, fn() -> PhantomData<BeginArgs>)>: Send,

§

impl<S> Sync for BeginArgsBuilder<S>
where PhantomData<(fn() -> S, fn() -> PhantomData<BeginArgs>)>: Sync,

§

impl<S> Unpin for BeginArgsBuilder<S>
where PhantomData<(fn() -> S, fn() -> PhantomData<BeginArgs>)>: Unpin,

§

impl<S> UnsafeUnpin for BeginArgsBuilder<S>

§

impl<S> UnwindSafe for BeginArgsBuilder<S>
where PhantomData<(fn() -> S, fn() -> PhantomData<BeginArgs>)>: UnwindSafe,

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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, 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.