pub(crate) trait ResourceAvailable {
// Required method
fn actor_name(&self) -> String;
// Provided methods
fn resource_array<T: Serialize, S: JsonPacketStream>(
&self,
resource: T,
resource_type: String,
array_type: ResourceArrayType,
stream: &mut S,
) { ... }
fn resources_array<T: Serialize, S: JsonPacketStream>(
&self,
resources: Vec<T>,
resource_type: String,
array_type: ResourceArrayType,
stream: &mut S,
) { ... }
}
Required Methods§
fn actor_name(&self) -> String
Provided Methods§
fn resource_array<T: Serialize, S: JsonPacketStream>( &self, resource: T, resource_type: String, array_type: ResourceArrayType, stream: &mut S, )
fn resources_array<T: Serialize, S: JsonPacketStream>( &self, resources: Vec<T>, resource_type: String, array_type: ResourceArrayType, stream: &mut S, )
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.