pub struct RepositoryReference {
pub owner: String,
pub name: String,
pub path: Option<String>,
pub reference: Option<String>,
}
Expand description
RepositoryReference is a struct that holds the owner, name, path and reference of a repository
Fields§
§owner: String
Repository owner
name: String
Repository name
path: Option<String>
Repository path
reference: Option<String>
Repository reference / branch
Implementations§
Source§impl RepositoryReference
impl RepositoryReference
Sourcepub fn parse(reporef: &str) -> Result<RepositoryReference, ActionsError>
pub fn parse(reporef: &str) -> Result<RepositoryReference, ActionsError>
Parse a repository reference
Example:
use ghactions_core::RepositoryReference;
let reference = "geekmasher/ghaction@main";
let reporef = RepositoryReference::parse(reference)?;
println!("Owner: {}", reporef.owner);
println!("Name: {}", reporef.name);
println!("Reference (optional): {:#?}", reporef.reference);
println!("Path (optional): {:#?}", reporef.path);
Trait Implementations§
Source§impl Clone for RepositoryReference
impl Clone for RepositoryReference
Source§fn clone(&self) -> RepositoryReference
fn clone(&self) -> RepositoryReference
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 RepositoryReference
impl Debug for RepositoryReference
Source§impl Default for RepositoryReference
impl Default for RepositoryReference
Source§fn default() -> RepositoryReference
fn default() -> RepositoryReference
Returns the “default value” for a type. Read more
Source§impl Display for RepositoryReference
impl Display for RepositoryReference
Source§impl PartialEq for RepositoryReference
impl PartialEq for RepositoryReference
impl Eq for RepositoryReference
impl StructuralPartialEq for RepositoryReference
Auto Trait Implementations§
impl Freeze for RepositoryReference
impl RefUnwindSafe for RepositoryReference
impl Send for RepositoryReference
impl Sync for RepositoryReference
impl Unpin for RepositoryReference
impl UnwindSafe for RepositoryReference
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.