pub enum NavProperty<T: EntityTypeRef> {
Expanded(Expanded<T>),
Reference(Reference),
}Expand description
Navigation property variants. All navigation properties in generated code are wrapped with this type.
Variants§
Expanded(Expanded<T>)
Expanded property variant (content included in the response).
Reference(Reference)
Reference variant (only @odata.id is included in the
response).
Implementations§
Sourcepub const fn new_reference(odata_id: ODataId) -> Self
pub const fn new_reference(odata_id: ODataId) -> Self
Create a navigation property with a reference using the OData
identifier.
Sourcepub fn to_reference(self) -> Self
pub fn to_reference(self) -> Self
Convert property to reference regardless expanded it or not.
Sourcepub fn downcast<D: EntityTypeRef>(&self) -> NavProperty<D>
pub fn downcast<D: EntityTypeRef>(&self) -> NavProperty<D>
Downcast to descendant type D.
Trait Implementations§
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
Source§fn from(v: &NavProperty<T>) -> Self
fn from(v: &NavProperty<T>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
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