pub struct RepositoryScope { /* private fields */ }Expand description
Repository and revision scope encoded into a token.
Implementations§
Source§impl RepositoryScope
impl RepositoryScope
Sourcepub fn new(
provider: RepositoryProvider,
owner: &str,
name: &str,
revision: Option<&str>,
) -> Result<Self, TokenClaimsError>
pub fn new( provider: RepositoryProvider, owner: &str, name: &str, revision: Option<&str>, ) -> Result<Self, TokenClaimsError>
Creates a repository scope.
§Errors
Returns TokenClaimsError when the owner, name, or revision contain invalid
values.
Sourcepub const fn provider(&self) -> RepositoryProvider
pub const fn provider(&self) -> RepositoryProvider
Returns the scoped provider family.
Trait Implementations§
Source§impl Clone for RepositoryScope
impl Clone for RepositoryScope
Source§fn clone(&self) -> RepositoryScope
fn clone(&self) -> RepositoryScope
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 RepositoryScope
impl Debug for RepositoryScope
Source§impl<'de> Deserialize<'de> for RepositoryScope
impl<'de> Deserialize<'de> for RepositoryScope
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
impl Eq for RepositoryScope
Source§impl PartialEq for RepositoryScope
impl PartialEq for RepositoryScope
Source§fn eq(&self, other: &RepositoryScope) -> bool
fn eq(&self, other: &RepositoryScope) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for RepositoryScope
impl Serialize for RepositoryScope
impl StructuralPartialEq for RepositoryScope
Auto Trait Implementations§
impl Freeze for RepositoryScope
impl RefUnwindSafe for RepositoryScope
impl Send for RepositoryScope
impl Sync for RepositoryScope
impl Unpin for RepositoryScope
impl UnsafeUnpin for RepositoryScope
impl UnwindSafe for RepositoryScope
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