Struct stac_api::Root

source ·
pub struct Root {
    pub catalog: Catalog,
    pub conformance: Conformance,
}
Expand description

The root landing page of a STAC API.

In a STAC API, the root endpoint (Landing Page) has the following characteristics:

  • The returned JSON is a STAC Catalog, and provides any number of ‘child’ links to navigate to additional Catalog, Collection, and Item objects.
  • The links attribute is part of a STAC Catalog, and provides a list of relations to API endpoints. Some of these endpoints can exist on any path (e.g., sub-catalogs) and some have a specified path (e.g., /search), so the client must inspect the rel (relationship) to understand what capabilities are offered at each location.
  • The conformsTo section provides the capabilities of this service. This is the field that indicates to clients that this is a STAC API and how to access conformance classes, including this one. The relevant conformance URIs are listed in each part of the API specification. If a conformance URI is listed then the service must implement all of the required capabilities.

Fields§

§catalog: Catalog§conformance: Conformance

Provides the capabilities of this service.

This is the field that indicates to clients that this is a STAC API and how to access conformance classes, including this one. The relevant conformance URIs are listed in each part of the API specification. If a conformance URI is listed then the service must implement all of the required capabilities.

Note the conformsTo array follows the same structure of the OGC API - Features declaration of conformance classes, except it is part of the landing page instead of in the JSON response from the /conformance endpoint. This is different from how the OGC API advertises conformance, as STAC feels it is important for clients to understand conformance from a single request to the landing page. Implementers who implement the OGC API - Features and/or STAC API - Features conformance classes must also implement the /conformance endpoint.

The scope of the conformance classes declared in the conformsTo field and the /conformance endpoint are limited to the STAC API Catalog that declares them. A STAC API Catalog may link to sub-catalogs within it via child links that declare different conformance classes. This is useful when an entire catalog cannot be searched against to support the STAC API - Item Search conformance class, perhaps because it uses multiple databases to store items, but sub-catalogs whose items are all in one database can support search. #[serde(rename = “conformsTo”)]

Trait Implementations§

source§

impl Debug for Root

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for Root

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for Root

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl Freeze for Root

§

impl RefUnwindSafe for Root

§

impl Send for Root

§

impl Sync for Root

§

impl Unpin for Root

§

impl UnwindSafe for Root

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToJson for T
where T: Serialize,

source§

fn to_json_path( &self, path: impl AsRef<Path>, pretty: bool, ) -> Result<(), Error>

Writes a value to a path as JSON. Read more
source§

fn to_json_writer(&self, writer: impl Write, pretty: bool) -> Result<(), Error>

Writes a value as JSON. Read more
source§

fn to_json_vec(&self, pretty: bool) -> Result<Vec<u8>, Error>

Writes a value as JSON bytes. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,