Skip to main content

Answer

Enum Answer 

Source
pub enum Answer<'a> {
    Available {
        uri: &'a str,
        software_version: u32,
        software_version_string: &'a str,
        update_token: &'a [u8],
        user_consent_needed: bool,
    },
    Busy {
        delay_s: u32,
    },
    NotAvailable,
    ProtocolNotSupported,
}
Expand description

What the provider has for a requestor.

Variants§

§

Available

§11.20.6.4’s UpdateAvailable: here it is.

Fields

§uri: &'a str

Where to get it. bdx: names this provider and a file (§11.20.6.5).

§software_version: u32

The version the image carries.

§software_version_string: &'a str

Its human-readable form, 1 to 64 characters.

§update_token: &'a [u8]

§11.20.3.6.1’s UpdateToken, 8 to 32 octets — the provider’s handle on this particular update, which comes back in ApplyUpdateRequest.

§user_consent_needed: bool

Whether a person must confirm before the requestor applies it.

§

Busy

Busy: there may be one, but not yet. Come back after delay_s.

Fields

§delay_s: u32

Seconds to wait, which §11.20.6.5 makes mandatory for this status.

§

NotAvailable

NotAvailable: “there is definitely no update currently available”.

§

ProtocolNotSupported

DownloadProtocolNotSupported: there is an image, but not one this requestor can fetch.

Trait Implementations§

Source§

impl<'a> Clone for Answer<'a>

Source§

fn clone(&self) -> Self

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<'a> Copy for Answer<'a>

Source§

impl<'a> Debug for Answer<'a>

Source§

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

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

impl<'a> Eq for Answer<'a>

Source§

impl<'a> PartialEq for Answer<'a>

Source§

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

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

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

Inequality operator !=. Read more
Source§

impl<'a> StructuralPartialEq for Answer<'a>

Auto Trait Implementations§

§

impl<'a> Forget for Answer<'a>

§

impl<'a> Freeze for Answer<'a>

§

impl<'a> Move for Answer<'a>

§

impl<'a> RefUnwindSafe for Answer<'a>

§

impl<'a> Send for Answer<'a>

§

impl<'a> Sync for Answer<'a>

§

impl<'a> Unpin for Answer<'a>

§

impl<'a> UnsafeUnpin for Answer<'a>

§

impl<'a> UnwindSafe for Answer<'a>

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

Source§

type Output = T

Should always be Self
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.