pub struct RelationshipInference { /* private fields */ }Expand description
Relationship inference engine
Implementations§
Source§impl RelationshipInference
impl RelationshipInference
Sourcepub fn new() -> RelationshipInference
pub fn new() -> RelationshipInference
Create a new relationship inference engine
Sourcepub fn infer_relationships(
&mut self,
spec: &OpenApiSpec,
) -> Result<Vec<Relationship>, Error>
pub fn infer_relationships( &mut self, spec: &OpenApiSpec, ) -> Result<Vec<Relationship>, Error>
Infer relationships from an OpenAPI specification
Sourcepub fn get_relationships_for_parent(
&self,
parent_entity: &str,
) -> Vec<&Relationship>
pub fn get_relationships_for_parent( &self, parent_entity: &str, ) -> Vec<&Relationship>
Get relationships for a specific parent entity
Sourcepub fn get_all_relationships(&self) -> &[Relationship]
pub fn get_all_relationships(&self) -> &[Relationship]
Get all relationships
Trait Implementations§
Source§impl Default for RelationshipInference
impl Default for RelationshipInference
Source§fn default() -> RelationshipInference
fn default() -> RelationshipInference
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RelationshipInference
impl RefUnwindSafe for RelationshipInference
impl Send for RelationshipInference
impl Sync for RelationshipInference
impl Unpin for RelationshipInference
impl UnsafeUnpin for RelationshipInference
impl UnwindSafe for RelationshipInference
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more