pub trait Bmc: Send + Sync {
type Error: Error + Send + Sync;
// Required methods
fn expand<T>(
&self,
id: &ODataId,
query: ExpandQuery,
) -> impl Future<Output = Result<Arc<T>, Self::Error>> + Send
where T: Expandable + Send + Sync + 'static;
fn get<T>(
&self,
id: &ODataId,
) -> impl Future<Output = Result<Arc<T>, Self::Error>> + Send
where T: EntityTypeRef + for<'a> Deserialize<'a> + 'static + Send + Sync;
fn filter<T>(
&self,
id: &ODataId,
query: FilterQuery,
) -> impl Future<Output = Result<Arc<T>, Self::Error>> + Send
where T: EntityTypeRef + for<'a> Deserialize<'a> + 'static + Send + Sync;
fn create<V, R>(
&self,
id: &ODataId,
query: &V,
) -> impl Future<Output = Result<R, Self::Error>> + Send
where V: Sync + Send + Serialize,
R: Send + Sync + for<'a> Deserialize<'a>;
fn update<V, R>(
&self,
id: &ODataId,
etag: Option<&ODataETag>,
query: &V,
) -> impl Future<Output = Result<R, Self::Error>> + Send
where V: Sync + Send + Serialize,
R: Send + Sync + for<'a> Deserialize<'a>;
fn delete(
&self,
id: &ODataId,
) -> impl Future<Output = Result<Empty, Self::Error>> + Send;
fn action<T, R>(
&self,
action: &Action<T, R>,
params: &T,
) -> impl Future<Output = Result<R, Self::Error>> + Send
where T: Send + Sync + Serialize,
R: Send + Sync + for<'a> Deserialize<'a>;
}Expand description
BMC trait defines access to a Baseboard Management Controller using the Redfish protocol.
Required Associated Types§
Required Methods§
Sourcefn expand<T>(
&self,
id: &ODataId,
query: ExpandQuery,
) -> impl Future<Output = Result<Arc<T>, Self::Error>> + Send
fn expand<T>( &self, id: &ODataId, query: ExpandQuery, ) -> impl Future<Output = Result<Arc<T>, Self::Error>> + Send
Expand any expandable object (navigation property or entity).
T is structure that is used for return type.
Sourcefn get<T>(
&self,
id: &ODataId,
) -> impl Future<Output = Result<Arc<T>, Self::Error>> + Send
fn get<T>( &self, id: &ODataId, ) -> impl Future<Output = Result<Arc<T>, Self::Error>> + Send
Get data of the object (navigation property or entity).
T is structure that is used for return type.
Sourcefn filter<T>(
&self,
id: &ODataId,
query: FilterQuery,
) -> impl Future<Output = Result<Arc<T>, Self::Error>> + Send
fn filter<T>( &self, id: &ODataId, query: FilterQuery, ) -> impl Future<Output = Result<Arc<T>, Self::Error>> + Send
Get and filters data of the object (navigation property or entity).
T is structure that is used for return type.
Sourcefn create<V, R>(
&self,
id: &ODataId,
query: &V,
) -> impl Future<Output = Result<R, Self::Error>> + Send
fn create<V, R>( &self, id: &ODataId, query: &V, ) -> impl Future<Output = Result<R, Self::Error>> + Send
Creates element of the collection.
V is structure that is used for create.
R is structure that is used for return type.
Sourcefn update<V, R>(
&self,
id: &ODataId,
etag: Option<&ODataETag>,
query: &V,
) -> impl Future<Output = Result<R, Self::Error>> + Send
fn update<V, R>( &self, id: &ODataId, etag: Option<&ODataETag>, query: &V, ) -> impl Future<Output = Result<R, Self::Error>> + Send
Update entity.
V is structure that is used for update.
R is structure that is used for return type (updated entity).
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.