pub struct CollectionPageProperties {
pub part_of: Option<Value>,
pub next: Option<Value>,
pub prev: Option<Value>,
}Expand description
The CollectionPage type extends from the base Collection type and inherits all of it’s
properties.
Fields§
§part_of: Option<Value>Identifies the Collection to which a CollectionPage objects items belong.
Range: Collection | Link
Functional: true
next: Option<Value>In a paged Collection, indicates the next page of items.
- Range:
CollectionPage|Link - Functional: true
prev: Option<Value>In a paged Collection, identifies the previous page of items.
- Range:
CollectionPage|Link - Functional: true
Implementations§
Source§impl CollectionPageProperties
impl CollectionPageProperties
Sourcepub fn part_of_link<T: Link>(&self) -> Result<T>
pub fn part_of_link<T: Link>(&self) -> Result<T>
Retrieve a value of type T from the given struct
This method deserializes the item from JSON, so be wary of using this a lot.
Possible errors from this method are Error::NotFound and
Error::Deserialize
Sourcepub fn set_part_of_link<T: Link>(&mut self, item: T) -> Result<()>
pub fn set_part_of_link<T: Link>(&mut self, item: T) -> Result<()>
Set a value of type T in the given struct
This method serializes the item to JSON, so be wary of using this a lot.
Possible errors from this method are Error::Serialize
Sourcepub fn part_of_collection<T: Collection>(&self) -> Result<T>
pub fn part_of_collection<T: Collection>(&self) -> Result<T>
Retrieve a value of type T from the given struct
This method deserializes the item from JSON, so be wary of using this a lot.
Possible errors from this method are Error::NotFound and
Error::Deserialize
Sourcepub fn set_part_of_collection<T: Collection>(&mut self, item: T) -> Result<()>
pub fn set_part_of_collection<T: Collection>(&mut self, item: T) -> Result<()>
Set a value of type T in the given struct
This method serializes the item to JSON, so be wary of using this a lot.
Possible errors from this method are Error::Serialize
Sourcepub fn part_of_string(&self) -> Result<String>
pub fn part_of_string(&self) -> Result<String>
Retrieve a value from the given struct
This method deserializes the item from JSON, so be wary of using this a lot.
Possible errors from this method are Error::NotFound and
Error::Deserialize
Sourcepub fn set_part_of_string(&mut self, item: String) -> Result<()>
pub fn set_part_of_string(&mut self, item: String) -> Result<()>
Set a value in the given struct
This method serializes the item to JSON, so be wary of using this a lot.
Possible errors from this method are Error::Serialize
Sourcepub fn next_link<T: Link>(&self) -> Result<T>
pub fn next_link<T: Link>(&self) -> Result<T>
Retrieve a value of type T from the given struct
This method deserializes the item from JSON, so be wary of using this a lot.
Possible errors from this method are Error::NotFound and
Error::Deserialize
Sourcepub fn set_next_link<T: Link>(&mut self, item: T) -> Result<()>
pub fn set_next_link<T: Link>(&mut self, item: T) -> Result<()>
Set a value of type T in the given struct
This method serializes the item to JSON, so be wary of using this a lot.
Possible errors from this method are Error::Serialize
Sourcepub fn next_collectionpage<T: CollectionPage>(&self) -> Result<T>
pub fn next_collectionpage<T: CollectionPage>(&self) -> Result<T>
Retrieve a value of type T from the given struct
This method deserializes the item from JSON, so be wary of using this a lot.
Possible errors from this method are Error::NotFound and
Error::Deserialize
Sourcepub fn set_next_collectionpage<T: CollectionPage>(
&mut self,
item: T,
) -> Result<()>
pub fn set_next_collectionpage<T: CollectionPage>( &mut self, item: T, ) -> Result<()>
Set a value of type T in the given struct
This method serializes the item to JSON, so be wary of using this a lot.
Possible errors from this method are Error::Serialize
Sourcepub fn next_string(&self) -> Result<String>
pub fn next_string(&self) -> Result<String>
Retrieve a value from the given struct
This method deserializes the item from JSON, so be wary of using this a lot.
Possible errors from this method are Error::NotFound and
Error::Deserialize
Sourcepub fn set_next_string(&mut self, item: String) -> Result<()>
pub fn set_next_string(&mut self, item: String) -> Result<()>
Set a value in the given struct
This method serializes the item to JSON, so be wary of using this a lot.
Possible errors from this method are Error::Serialize
Sourcepub fn prev_link<T: Link>(&self) -> Result<T>
pub fn prev_link<T: Link>(&self) -> Result<T>
Retrieve a value of type T from the given struct
This method deserializes the item from JSON, so be wary of using this a lot.
Possible errors from this method are Error::NotFound and
Error::Deserialize
Sourcepub fn set_prev_link<T: Link>(&mut self, item: T) -> Result<()>
pub fn set_prev_link<T: Link>(&mut self, item: T) -> Result<()>
Set a value of type T in the given struct
This method serializes the item to JSON, so be wary of using this a lot.
Possible errors from this method are Error::Serialize
Sourcepub fn prev_collectionpage<T: CollectionPage>(&self) -> Result<T>
pub fn prev_collectionpage<T: CollectionPage>(&self) -> Result<T>
Retrieve a value of type T from the given struct
This method deserializes the item from JSON, so be wary of using this a lot.
Possible errors from this method are Error::NotFound and
Error::Deserialize
Sourcepub fn set_prev_collectionpage<T: CollectionPage>(
&mut self,
item: T,
) -> Result<()>
pub fn set_prev_collectionpage<T: CollectionPage>( &mut self, item: T, ) -> Result<()>
Set a value of type T in the given struct
This method serializes the item to JSON, so be wary of using this a lot.
Possible errors from this method are Error::Serialize
Sourcepub fn prev_string(&self) -> Result<String>
pub fn prev_string(&self) -> Result<String>
Retrieve a value from the given struct
This method deserializes the item from JSON, so be wary of using this a lot.
Possible errors from this method are Error::NotFound and
Error::Deserialize
Sourcepub fn set_prev_string(&mut self, item: String) -> Result<()>
pub fn set_prev_string(&mut self, item: String) -> Result<()>
Set a value in the given struct
This method serializes the item to JSON, so be wary of using this a lot.
Possible errors from this method are Error::Serialize
Trait Implementations§
Source§impl Clone for CollectionPageProperties
impl Clone for CollectionPageProperties
Source§fn clone(&self) -> CollectionPageProperties
fn clone(&self) -> CollectionPageProperties
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more