UpdateChannel

Struct UpdateChannel 

Source
pub struct UpdateChannel {
    pub name: String,
    pub key: Rsa<Public>,
    pub update_path_prefix: String,
    pub scope: Option<String>,
    pub replaces_default_rulesets: bool,
}
Expand description

An UpdateChannel defines where to find ruleset updates, the key to verify them, the scope they are applied to (which should be a regular expression), and whether they replace the default rulesets included with the application.

Fields§

§name: String§key: Rsa<Public>§update_path_prefix: String§scope: Option<String>§replaces_default_rulesets: bool

Trait Implementations§

Source§

impl Debug for UpdateChannel

Source§

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

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

impl From<&String> for UpdateChannel

Source§

fn from(json_string: &String) -> UpdateChannel

Returns an update channel given a JSON string

§Arguments
§Panics

Panics if a name, update path prefix, or pem is not specified, if the pem file does not parse correctly into an RSA key, or it is not an object

Source§

impl From<&Value> for UpdateChannel

Source§

fn from(json_value: &Value) -> UpdateChannel

Returns an update channel given a serde_json::Value

See the implementation of From<&String> for more detail

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.

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