pub struct Include { /* private fields */ }Expand description
Builder for include specifications.
This is typically used by the generated code to provide a fluent API.
Implementations§
Source§impl Include
impl Include
Sourcepub fn with(self, spec: IncludeSpec) -> Self
pub fn with(self, spec: IncludeSpec) -> Self
Add a relation to include.
Sourcepub fn with_many(self, specs: impl IntoIterator<Item = IncludeSpec>) -> Self
pub fn with_many(self, specs: impl IntoIterator<Item = IncludeSpec>) -> Self
Add multiple relations to include.
Sourcepub fn get(&self, relation: &str) -> Option<&IncludeSpec>
pub fn get(&self, relation: &str) -> Option<&IncludeSpec>
Get an include spec by relation name.
Sourcepub fn specs(&self) -> impl Iterator<Item = &IncludeSpec>
pub fn specs(&self) -> impl Iterator<Item = &IncludeSpec>
Get all include specs.
Trait Implementations§
Source§impl From<IncludeSpec> for Include
impl From<IncludeSpec> for Include
Source§fn from(spec: IncludeSpec) -> Self
fn from(spec: IncludeSpec) -> Self
Converts to this type from the input type.
Source§impl FromIterator<IncludeSpec> for Include
impl FromIterator<IncludeSpec> for Include
Source§fn from_iter<T: IntoIterator<Item = IncludeSpec>>(iter: T) -> Self
fn from_iter<T: IntoIterator<Item = IncludeSpec>>(iter: T) -> Self
Creates a value from an iterator. Read more
Auto Trait Implementations§
impl Freeze for Include
impl RefUnwindSafe for Include
impl Send for Include
impl Sync for Include
impl Unpin for Include
impl UnwindSafe for Include
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