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<ModificationResponse<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>,
update: &V,
) -> impl Future<Output = Result<ModificationResponse<R>, Self::Error>> + Send
where V: Sync + Send + Serialize,
R: Send + Sync + for<'a> Deserialize<'a>;
fn delete<R>(
&self,
id: &ODataId,
) -> impl Future<Output = Result<ModificationResponse<R>, Self::Error>> + Send
where R: EntityTypeRef + Sync + Send + for<'de> Deserialize<'de>;
fn action<T, R>(
&self,
action: &Action<T, R>,
params: &T,
) -> impl Future<Output = Result<ModificationResponse<R>, Self::Error>> + Send
where T: Send + Sync + Serialize,
R: Send + Sync + for<'a> Deserialize<'a>;
fn stream<T>(
&self,
uri: &str,
) -> impl Future<Output = Result<Pin<Box<dyn TryStream<Ok = T, Error = Self::Error, Item = Result<T, Self::Error>> + Send>>, Self::Error>> + Send
where T: for<'a> Deserialize<'a> + Send + 'static;
}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<ModificationResponse<R>, Self::Error>> + Send
fn create<V, R>( &self, id: &ODataId, query: &V, ) -> impl Future<Output = Result<ModificationResponse<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>,
update: &V,
) -> impl Future<Output = Result<ModificationResponse<R>, Self::Error>> + Send
fn update<V, R>( &self, id: &ODataId, etag: Option<&ODataETag>, update: &V, ) -> impl Future<Output = Result<ModificationResponse<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).
Sourcefn delete<R>(
&self,
id: &ODataId,
) -> impl Future<Output = Result<ModificationResponse<R>, Self::Error>> + Send
fn delete<R>( &self, id: &ODataId, ) -> impl Future<Output = Result<ModificationResponse<R>, Self::Error>> + Send
Delete entity.
Sourcefn action<T, R>(
&self,
action: &Action<T, R>,
params: &T,
) -> impl Future<Output = Result<ModificationResponse<R>, Self::Error>> + Send
fn action<T, R>( &self, action: &Action<T, R>, params: &T, ) -> impl Future<Output = Result<ModificationResponse<R>, Self::Error>> + Send
Run action.
T is structure that contains action parameters.
R is structure with return type.
Sourcefn stream<T>(
&self,
uri: &str,
) -> impl Future<Output = Result<Pin<Box<dyn TryStream<Ok = T, Error = Self::Error, Item = Result<T, Self::Error>> + Send>>, Self::Error>> + Sendwhere
T: for<'a> Deserialize<'a> + Send + 'static,
fn stream<T>(
&self,
uri: &str,
) -> impl Future<Output = Result<Pin<Box<dyn TryStream<Ok = T, Error = Self::Error, Item = Result<T, Self::Error>> + Send>>, Self::Error>> + Sendwhere
T: for<'a> Deserialize<'a> + Send + 'static,
Stream data for the URI.
T is structure that is used for the stream return type.
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.