batman
This commit is contained in:
25
common/src/lib.rs
Normal file
25
common/src/lib.rs
Normal file
@@ -0,0 +1,25 @@
|
||||
use json::JsonValue;
|
||||
use prost::{
|
||||
alloc::{
|
||||
string::String,
|
||||
vec::Vec,
|
||||
}, *};
|
||||
|
||||
#[derive(Clone, PartialEq, Message)]
|
||||
pub struct Models(#[prost(message, repeated)] pub Vec<Model>);
|
||||
|
||||
#[derive(Clone, PartialEq, Message)]
|
||||
pub struct Model {
|
||||
#[prost(string)]
|
||||
pub modified_at: String,
|
||||
#[prost(string)]
|
||||
pub size: String,
|
||||
#[prost(string)]
|
||||
pub name: String,
|
||||
}
|
||||
|
||||
impl Into<Vec<u8>> for Models {
|
||||
fn into(self) -> Vec<u8> {
|
||||
self.encode_to_vec()
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user