pub trait DroneAccessStore {
// Required methods
fn access_get(&self, drone_id: &str) -> Result<DroneAccess, StoreError>;
fn access_set_owner(
&self,
drone_id: &str,
agent: &str,
now_ms: i64,
) -> Result<(), StoreError>;
fn access_set_agents(
&self,
drone_id: &str,
agents: &[String],
by: &str,
now_ms: i64,
) -> Result<(), StoreError>;
fn access_delete_for(&self, drone_id: &str) -> Result<usize, StoreError>;
}Required Methods§
Sourcefn access_get(&self, drone_id: &str) -> Result<DroneAccess, StoreError>
fn access_get(&self, drone_id: &str) -> Result<DroneAccess, StoreError>
The owner and the given agents of drone_id.
Sourcefn access_set_owner(
&self,
drone_id: &str,
agent: &str,
now_ms: i64,
) -> Result<(), StoreError>
fn access_set_owner( &self, drone_id: &str, agent: &str, now_ms: i64, ) -> Result<(), StoreError>
Make agent the owner of a drone that has none. Does nothing when it has one.
Sourcefn access_set_agents(
&self,
drone_id: &str,
agents: &[String],
by: &str,
now_ms: i64,
) -> Result<(), StoreError>
fn access_set_agents( &self, drone_id: &str, agents: &[String], by: &str, now_ms: i64, ) -> Result<(), StoreError>
Replace the agents the drone was given to with agents, recorded as set by by.
Sourcefn access_delete_for(&self, drone_id: &str) -> Result<usize, StoreError>
fn access_delete_for(&self, drone_id: &str) -> Result<usize, StoreError>
Forget everything about drone_id (it was deleted).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".