pub struct Updates { /* private fields */ }Expand description
Where an application finds its new versions, and the key that signs them.
App::updates takes it, and
App::run then hands the setup an Updater.
Implementations§
Source§impl Updates
impl Updates
Sourcepub const fn new(
version: &'static str,
endpoint: &'static str,
public_key: &'static str,
) -> Self
pub const fn new( version: &'static str, endpoint: &'static str, public_key: &'static str, ) -> Self
The versions after version that endpoint announces, signed by public_key.
version is the running one, env!("CARGO_PKG_VERSION") in the
application’s crate. endpoint may hold {{target}}, {{arch}},
and {{current_version}}. public_key is the one cargo packager signer generate writes.
§Panics
Panics when version is not a semantic version, when endpoint is
not https:// followed by a host, or http:// to 127.0.0.1 or
localhost for a test on this machine, and when public_key is not
a minisign public key in base64. In a const, each is a compile
error.
ⓘ
const UPDATES: Updates = Updates::new("1.0", "https://updates.example.com", "");Trait Implementations§
Auto Trait Implementations§
impl Freeze for Updates
impl RefUnwindSafe for Updates
impl Send for Updates
impl Sync for Updates
impl Unpin for Updates
impl UnsafeUnpin for Updates
impl UnwindSafe for Updates
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.