MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / get

Method get

atomic-repository/src/remote.rs:399–401  ·  view source on GitHub ↗

Get a remote by name. # Arguments `name` - The name of the remote to look up # Example ```rust use atomic_repository::remote::{RemoteConfig, RemoteEntry}; let mut config = RemoteConfig::new(); config.add("origin", RemoteEntry::new("https://example.com/repo")).unwrap(); assert!(config.get("origin").is_some()); assert!(config.get("nonexistent").is_none()); ```

(&self, name: &str)

Source from the content-addressed store, hash-verified

397 /// assert!(config.get("nonexistent").is_none());
398 /// ```
399 pub fn get(&self, name: &str) -> Option<&RemoteEntry> {
400 self.remotes.get(name)
401 }
402
403 /// Get a mutable reference to a remote by name.
404 pub fn get_mut(&mut self, name: &str) -> Option<&mut RemoteEntry> {

Callers

nothing calls this directly

Calls 1

getMethod · 0.65

Tested by

no test coverage detected