omaha_client::protocol::request

Struct Request

Source
pub struct Request {
    pub protocol_version: String,
    pub updater: String,
    pub updater_version: String,
    pub install_source: InstallSource,
    pub is_machine: bool,
    pub request_id: Option<GUID>,
    pub session_id: Option<GUID>,
    pub os: OS,
    pub apps: Vec<App>,
}
Expand description

An Omaha protocol request.

This holds the data for constructing a request to the Omaha service.

See https://github.com/google/omaha/blob/HEAD/doc/ServerProtocolV3.md#request

Fields§

§protocol_version: String

The current Omaha protocol version (which this is meant to be used with, is 3.0. This should always be set to “3.0”.

This is the ‘protocol’ attribute of the request object.

§updater: String

This is the string identifying the updater software itself (this client). e.g. “fuchsia”

§updater_version: String

The version of the updater itself (e.g. “Fuchsia/Rust-0.0.0.1”). This is the version of the updater implemented using this Crate.

This is the ‘updaterversion’ attribute of the request object.

§install_source: InstallSource

The install source trigger for this request.

§is_machine: bool

The system update is always done by “the machine” aka system-level or administrator privileges.

This is the ‘ismachine’ attribute of the request object.

§request_id: Option<GUID>

The randomly generated GUID for a single Omaha request.

This is the ‘requestid’ attribute of the request object.

§session_id: Option<GUID>

The randomly generated GUID for all Omaha requests in an update session.

This is the ‘sessionid’ attribute of the request object.

§os: OS

Information about the device operating system.

This is the ‘os’ child object of the request object.

§apps: Vec<App>

The applications to update.

These are the ‘app’ children objects of the request object

Trait Implementations§

Source§

impl Debug for Request

Source§

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

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

impl Default for Request

Source§

fn default() -> Request

Returns the “default value” for a type. Read more
Source§

impl Serialize for Request

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

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

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

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

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

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

Source§

type Output = T

Should always be Self
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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

Source§

fn unless(self, option: Option<T>) -> T

§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

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