pub trait Zone {
type CustomRetrieveError: Debug;
// Required methods
fn id(&self) -> &str;
fn domain(&self) -> &str;
fn list_records(
&self,
) -> impl Future<Output = Result<Vec<Record>, RetrieveRecordError<Self::CustomRetrieveError>>>;
fn get_record(
&self,
record_id: &str,
) -> impl Future<Output = Result<Record, RetrieveRecordError<Self::CustomRetrieveError>>>;
}
Expand description
Required Associated Types§
Sourcetype CustomRetrieveError: Debug
type CustomRetrieveError: Debug
The provider-specific custom record retrieval error type used for RetrieveRecordError::Custom
.
If no custom errors should be provided, use ()
.
Required Methods§
Sourcefn list_records(
&self,
) -> impl Future<Output = Result<Vec<Record>, RetrieveRecordError<Self::CustomRetrieveError>>>
fn list_records( &self, ) -> impl Future<Output = Result<Vec<Record>, RetrieveRecordError<Self::CustomRetrieveError>>>
Retrieves all available records.
When no record exists, an Ok
value with an empty Vec
will be returned, not RetrieveRecordError::NotFound
.
Sourcefn get_record(
&self,
record_id: &str,
) -> impl Future<Output = Result<Record, RetrieveRecordError<Self::CustomRetrieveError>>>
fn get_record( &self, record_id: &str, ) -> impl Future<Output = Result<Record, RetrieveRecordError<Self::CustomRetrieveError>>>
Retrieves a record by its provider-specific ID.
Refer to the provider’s documentation to figure out which value is used as the ID.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.