pub struct GitHubDraftTemplateV1 {
pub schema_version: u32,
pub owner: String,
pub repository: String,
pub title_prefix: String,
pub body: String,
pub prerelease: bool,
pub token_env: String,
pub request_timeout_secs: u64,
pub max_metadata_bytes: usize,
pub max_list_pages: u32,
}Expand description
Static reusable GitHub draft template (M003d section 4C).
Contains only identity-independent fields known before the future tag: owner/repository, fixed title prefix, bounded body/notes, prerelease flag, token environment, and transport bounds. It MUST NOT contain a release id, source revision, exact tag, GitHub release id, or digests. Runtime resolution appends the exact validated tag to the title prefix; no arbitrary string templating exists.
Fields§
§schema_version: u32Schema version, exactly 1.
owner: StringGitHub repository owner.
repository: StringGitHub repository name.
title_prefix: StringFixed title prefix; the exact tag is appended at resolve time.
body: StringBounded fixed release notes.
prerelease: boolPrerelease intent.
token_env: StringToken environment variable name, allowlisted to GITHUB_TOKEN.
request_timeout_secs: u64Per-request timeout in seconds.
max_metadata_bytes: usizeMaximum metadata response bytes.
max_list_pages: u32Maximum bounded release-list pages.
Implementations§
Source§impl GitHubDraftTemplateV1
impl GitHubDraftTemplateV1
Sourcepub fn from_json(text: &str) -> Result<Self, GithubError>
pub fn from_json(text: &str) -> Result<Self, GithubError>
Parse a strict bounded JSON template document.
Sourcepub fn to_json(&self) -> Result<String, GithubError>
pub fn to_json(&self) -> Result<String, GithubError>
Serialize deterministically after validation.
Sourcepub fn validate(&self) -> Result<(), GithubError>
pub fn validate(&self) -> Result<(), GithubError>
Validate all bounds and injection rules.
Sourcepub fn resolve(&self, tag: &str) -> Result<GitHubDraftPolicyV1, GithubError>
pub fn resolve(&self, tag: &str) -> Result<GitHubDraftPolicyV1, GithubError>
Resolve the static template against one exact validated tag.
Uses the exact tag as-is (no product-specific transformation) and
appends it to the fixed title prefix. The tag itself is validated
with the same rules as GitHubDraftPolicyV1.
Sourcepub fn resolve_with_identity(
&self,
tag: &str,
mode: ReleaseIdentityMode,
source_revision: &str,
) -> Result<GitHubDraftPolicyV1, GithubError>
pub fn resolve_with_identity( &self, tag: &str, mode: ReleaseIdentityMode, source_revision: &str, ) -> Result<GitHubDraftPolicyV1, GithubError>
Resolve the static template with a checked-in finite identity mode.
Trait Implementations§
Source§impl Clone for GitHubDraftTemplateV1
impl Clone for GitHubDraftTemplateV1
Source§impl Debug for GitHubDraftTemplateV1
impl Debug for GitHubDraftTemplateV1
Source§impl<'de> Deserialize<'de> for GitHubDraftTemplateV1
impl<'de> Deserialize<'de> for GitHubDraftTemplateV1
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>,
impl Eq for GitHubDraftTemplateV1
Source§impl PartialEq for GitHubDraftTemplateV1
impl PartialEq for GitHubDraftTemplateV1
Source§impl Serialize for GitHubDraftTemplateV1
impl Serialize for GitHubDraftTemplateV1
impl StructuralPartialEq for GitHubDraftTemplateV1
Auto Trait Implementations§
impl Forget for GitHubDraftTemplateV1
impl Freeze for GitHubDraftTemplateV1
impl Move for GitHubDraftTemplateV1
impl RefUnwindSafe for GitHubDraftTemplateV1
impl Send for GitHubDraftTemplateV1
impl Sync for GitHubDraftTemplateV1
impl Unpin for GitHubDraftTemplateV1
impl UnsafeUnpin for GitHubDraftTemplateV1
impl UnwindSafe for GitHubDraftTemplateV1
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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
key and return true if they are equal.