Trait ResourceAvailable

Source
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§

Provided Methods§

Source

fn resource_array<T: Serialize, S: JsonPacketStream>( &self, resource: T, resource_type: String, array_type: ResourceArrayType, stream: &mut S, )

Source

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.

Implementors§