Struct wasmer_cli::config::MultiRegistry
source · pub struct MultiRegistry {
pub active_registry: String,
pub tokens: Vec<RegistryLogin>,
}
Expand description
Struct to store login tokens for multiple registry URLs inside of the wasmer.toml configuration file
Fields§
§active_registry: String
Currently active registry
tokens: Vec<RegistryLogin>
Map from “RegistryUrl” to “LoginToken”, in order to be able to be able to easily switch between registries
Implementations§
source§impl MultiRegistry
impl MultiRegistry
sourcepub fn remove_registry(&mut self, registry: &str)
pub fn remove_registry(&mut self, registry: &str)
Gets the current (active) registry URL
pub fn get_graphql_url(&self) -> String
sourcepub fn get_current_registry(&self) -> String
pub fn get_current_registry(&self) -> String
Gets the current (active) registry URL
sourcepub fn is_current_registry(&self, registry: &str) -> bool
pub fn is_current_registry(&self, registry: &str) -> bool
Checks if the current registry equals registry
.
pub fn current_login(&self) -> Option<&RegistryLogin>
sourcepub async fn set_current_registry(&mut self, registry: &str)
pub async fn set_current_registry(&mut self, registry: &str)
Sets the current (active) registry URL
sourcepub fn get_login_token_for_registry(&self, registry: &str) -> Option<String>
pub fn get_login_token_for_registry(&self, registry: &str) -> Option<String>
Returns the login token for the registry
sourcepub fn set_login_token_for_registry(
&mut self,
registry: &str,
token: &str,
update_current_registry: UpdateRegistry,
)
pub fn set_login_token_for_registry( &mut self, registry: &str, token: &str, update_current_registry: UpdateRegistry, )
Sets the login token for the registry URL
Trait Implementations§
source§impl Clone for MultiRegistry
impl Clone for MultiRegistry
source§fn clone(&self) -> MultiRegistry
fn clone(&self) -> MultiRegistry
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for MultiRegistry
impl Debug for MultiRegistry
source§impl Default for MultiRegistry
impl Default for MultiRegistry
source§impl<'de> Deserialize<'de> for MultiRegistry
impl<'de> Deserialize<'de> for MultiRegistry
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for MultiRegistry
impl PartialEq for MultiRegistry
source§fn eq(&self, other: &MultiRegistry) -> bool
fn eq(&self, other: &MultiRegistry) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for MultiRegistry
impl Serialize for MultiRegistry
impl Eq for MultiRegistry
impl StructuralPartialEq for MultiRegistry
Auto Trait Implementations§
impl Freeze for MultiRegistry
impl RefUnwindSafe for MultiRegistry
impl Send for MultiRegistry
impl Sync for MultiRegistry
impl Unpin for MultiRegistry
impl UnwindSafe for MultiRegistry
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Returns the layout of the type.
§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2where
T: SharedNiching<N1, N2>,
N1: Niching<T>,
N2: Niching<T>,
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2where
T: SharedNiching<N1, N2>,
N1: Niching<T>,
N2: Niching<T>,
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> Pointee for T
impl<T> Pointee for T
§impl<T> Upcastable for T
impl<T> Upcastable for T
§fn upcast_any_ref(&self) -> &(dyn Any + 'static)
fn upcast_any_ref(&self) -> &(dyn Any + 'static)
upcast ref
§fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
upcast mut ref
§fn upcast_any_box(self: Box<T>) -> Box<dyn Any>
fn upcast_any_box(self: Box<T>) -> Box<dyn Any>
upcast boxed dyn