pub struct Repository(/* private fields */);Expand description
A repository identified by its normalized origin, without a URL scheme or .git suffix.
Implementations§
Source§impl Repository
impl Repository
Sourcepub const METADATA_KEY: &'static str = "onetaskgraph.repositories"
pub const METADATA_KEY: &'static str = "onetaskgraph.repositories"
The reserved metadata key a source reads these origins from when its backend has no notion of its own.
The key is spelled once, here, because every plugin has to agree on it: a source that invented its own spelling would hold work nothing else could read.
Sourcepub fn from_metadata(
metadata: &BTreeMap<String, Value>,
) -> Result<Vec<Self>, String>
pub fn from_metadata( metadata: &BTreeMap<String, Value>, ) -> Result<Vec<Self>, String>
The origins a source records under Self::METADATA_KEY, or none.
§Errors
Returns a message when the key holds something other than a duplicate-free list of normalized origins.
Trait Implementations§
Source§impl Clone for Repository
impl Clone for Repository
Source§fn clone(&self) -> Repository
fn clone(&self) -> Repository
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 Repository
impl Debug for Repository
Source§impl<'de> Deserialize<'de> for Repository
impl<'de> Deserialize<'de> for Repository
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 Repository
Source§impl From<Repository> for String
impl From<Repository> for String
Source§fn from(repository: Repository) -> Self
fn from(repository: Repository) -> Self
Converts to this type from the input type.
Source§impl Hash for Repository
impl Hash for Repository
Source§impl JsonSchema for Repository
impl JsonSchema for Repository
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for Repository
impl PartialEq for Repository
Source§impl Serialize for Repository
impl Serialize for Repository
impl StructuralPartialEq for Repository
Auto Trait Implementations§
impl Freeze for Repository
impl RefUnwindSafe for Repository
impl Send for Repository
impl Sync for Repository
impl Unpin for Repository
impl UnsafeUnpin for Repository
impl UnwindSafe for Repository
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