pub struct AssetInput {
pub filename: String,
pub data: Vec<u8>,
pub mime_type: Option<String>,
}Expand description
Input data for uploading a new asset.
This type is part of the public devboy_core::asset API and is
(de)serializable so it can cross crate and MCP tool boundaries. File
bytes go through serde’s default Vec<u8> encoding, which is a JSON
array of numbers — MCP tools typically base64-encode the payload in a
wrapper struct rather than serializing this type directly.
Fields§
§filename: StringFilename to use on the provider side.
data: Vec<u8>Raw file bytes.
mime_type: Option<String>Optional MIME type hint.
Implementations§
Trait Implementations§
Source§impl Clone for AssetInput
impl Clone for AssetInput
Source§fn clone(&self) -> AssetInput
fn clone(&self) -> AssetInput
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AssetInput
impl Debug for AssetInput
Source§impl<'de> Deserialize<'de> for AssetInput
impl<'de> Deserialize<'de> for AssetInput
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for AssetInput
impl RefUnwindSafe for AssetInput
impl Send for AssetInput
impl Sync for AssetInput
impl Unpin for AssetInput
impl UnsafeUnpin for AssetInput
impl UnwindSafe for AssetInput
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more