#[non_exhaustive]pub struct IssueRelations {
pub outgoing: Vec<IssueRelation>,
pub incoming: Vec<IssueRelation>,
}Expand description
Both directions of an issue’s relation edges, as returned by
RelationsService::of_issue.
outgoing mirrors Issue.relations (this issue is the source);
incoming mirrors Issue.inverseRelations (this issue is the target).
With type: blocks meaning source blocks target: the issues this one
blocks live in outgoing, and the issues blocking this one live in
incoming — use blocks / blocked_by
instead of filtering by hand.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.outgoing: Vec<IssueRelation>Edges where this issue is the source (Issue.relations).
incoming: Vec<IssueRelation>Edges where this issue is the target (Issue.inverseRelations).
Implementations§
Source§impl IssueRelations
impl IssueRelations
Sourcepub fn blocks(&self) -> Vec<&IssueStub>
pub fn blocks(&self) -> Vec<&IssueStub>
The issues this issue blocks: outgoing edges with
IssueRelationType::Blocks, yielding each edge’s target.
§Examples
let client = linear_api::LinearClient::from_env()?;
let relations = client
.relations()
.of_issue(linear_api::IssueRef::identifier("ENG-3"))
.await?;
for blocked in relations.blocks() {
println!("ENG-3 blocks {}", blocked.identifier);
}Sourcepub fn blocked_by(&self) -> Vec<&IssueStub>
pub fn blocked_by(&self) -> Vec<&IssueStub>
The issues this issue is blocked by: incoming edges with
IssueRelationType::Blocks, yielding each edge’s source.
§Examples
let client = linear_api::LinearClient::from_env()?;
let relations = client
.relations()
.of_issue(linear_api::IssueRef::identifier("ENG-3"))
.await?;
for blocker in relations.blocked_by() {
println!("ENG-3 is blocked by {}", blocker.identifier);
}Trait Implementations§
Source§impl Clone for IssueRelations
impl Clone for IssueRelations
Source§fn clone(&self) -> IssueRelations
fn clone(&self) -> IssueRelations
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 moreAuto Trait Implementations§
impl Freeze for IssueRelations
impl RefUnwindSafe for IssueRelations
impl Send for IssueRelations
impl Sync for IssueRelations
impl Unpin for IssueRelations
impl UnsafeUnpin for IssueRelations
impl UnwindSafe for IssueRelations
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