[−][src]Struct acme2::Order
An order represents a subscribers's request for a certificate from the ACME server, and is used to track the progress of that order through to issuance.
This must be created through an OrderBuilder
.
Fields
status: OrderStatus
The status of this order.
expires: Option<String>
The timestamp after which the server will consider this order invalid.
identifiers: Vec<Identifier>
An array of identifier objects that the order pertains to.
not_before: Option<String>
The requested value of the notBefore field in the certificate.
not_after: Option<String>
The requested value of the notAfter field in the certificate.
error: Option<AcmeError>
The error that occurred while processing the order, if any.
Implementations
impl Order
[src]
pub async fn authorizations(&self) -> Result<Vec<Authorization>, Error>
[src]
Retrieve all of the Authorization
s needed for this order.
The authorization may already be in a Valid
state, if an
authorization for this identifier was already completed through
a seperate order.
impl Order
[src]
pub async fn finalize(&self, csr: CSR) -> Result<Order, Error>
[src]
Finalize an order (request the final certificate).
For finalization to complete, the state of the order must be in the
OrderStatus::Ready
state. You can use Order::wait_ready
to wait
until this is the case.
In most cases this will not complete immediately. You should always
call Order::wait_done
after this operation to wait until the
ACME server has finished finalization, and the certificate is ready
for download.
pub async fn certificate(&self) -> Result<Option<Vec<X509>>, Error>
[src]
Download the certificate. The order must be in the OrderStatus::Valid
state for this to complete.
pub async fn poll(&self) -> Result<Order, Error>
[src]
Update the order to match the current server state.
Most users should use Order::wait_ready
or Order::wait_done
.
pub async fn wait_ready(self, poll_interval: Duration) -> Result<Order, Error>
[src]
Wait for this order to go into a state other than OrderStatus::Pending
.
This happens when all crate::Authorization
s in this order have been completed
(have the crate::AuthorizationStatus::Valid
state).
Will complete immediately if the order is already in one of these states.
pub async fn wait_done(self, poll_interval: Duration) -> Result<Order, Error>
[src]
Wait for the order to go into the OrderStatus::Valid
or OrderStatus::Invalid
state.
This will happen after the order has gone into the OrderStatus::Ready
state, and the order has been requested to be finalized.
Will complete immediately if the order is already in one of these states.
Trait Implementations
impl Debug for Order
[src]
impl<'de> Deserialize<'de> for Order
[src]
pub fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
Auto Trait Implementations
impl !RefUnwindSafe for Order
[src]
impl Send for Order
[src]
impl Sync for Order
[src]
impl Unpin for Order
[src]
impl !UnwindSafe for Order
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> WithSubscriber for T
[src]
pub fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]
S: Into<Dispatch>,