pub struct RemoteStarter {
pub github_username: String,
pub github_repo: String,
pub group: String,
pub name: String,
}Expand description
A string idenfitying a starter. Takes the form “[INSTANCE]/GROUP/NAME”, where INSTANCE, if unspecified, defaults to the default instance.
Fields§
§github_username: String§github_repo: String§group: String§name: StringImplementations§
Source§impl RemoteStarter
impl RemoteStarter
pub fn new( github_username: &str, github_repo: &str, group: &str, name: &str, ) -> Self
Sourcepub fn from_path(path: &str) -> Option<Self>
pub fn from_path(path: &str) -> Option<Self>
A string idenfitying a starter. Takes the following form: @GITHUB_USERNAME/[GITHUB_REPO]/GROUP/NAME
§Examples
When left unspecified, GITHUB_REPO defaults to “jump-start”
use jump_start::RemoteStarter;
let starter = RemoteStarter::from_path("@kevinschaul/react-d3/Chart").unwrap();
assert_eq!(starter.github_username, "kevinschaul");
assert_eq!(starter.github_repo, "jump-start");
assert_eq!(starter.group, "react-d3");
assert_eq!(starter.name, "Chart");use jump_start::RemoteStarter;
let starter = RemoteStarter::from_path("@kevinschaul/starters/react-d3/Chart").unwrap();
assert_eq!(starter.github_username, "kevinschaul");
assert_eq!(starter.github_repo, "starters");
assert_eq!(starter.group, "react-d3");
assert_eq!(starter.name, "Chart");ⓘ
use jump_start::RemoteStarter;
let starter = RemoteStarter::from_path("react-d3/Chart").unwrap();ⓘ
use jump_start::RemoteStarter;
let starter = RemoteStarter::from_path("@kevinschaul/Chart").unwrap();Trait Implementations§
Source§impl Clone for RemoteStarter
impl Clone for RemoteStarter
Source§fn clone(&self) -> RemoteStarter
fn clone(&self) -> RemoteStarter
Returns a duplicate 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 RemoteStarter
impl Debug for RemoteStarter
Source§impl<'de> Deserialize<'de> for RemoteStarter
impl<'de> Deserialize<'de> for RemoteStarter
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
Auto Trait Implementations§
impl Freeze for RemoteStarter
impl RefUnwindSafe for RemoteStarter
impl Send for RemoteStarter
impl Sync for RemoteStarter
impl Unpin for RemoteStarter
impl UnsafeUnpin for RemoteStarter
impl UnwindSafe for RemoteStarter
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