pub struct InputDocument {
pub filename: String,
pub media_type: String,
pub bytes: Bytes,
pub input_kind_override: Option<InputKind>,
}Fields§
§filename: String§media_type: String§bytes: Bytes§input_kind_override: Option<InputKind>Implementations§
Source§impl InputDocument
impl InputDocument
pub fn new( filename: impl Into<String>, media_type: impl Into<String>, bytes: impl Into<Bytes>, ) -> Self
pub fn with_input_kind(self, input_kind: InputKind) -> Self
pub fn from_path_and_bytes(path: &Path, bytes: impl Into<Bytes>) -> Result<Self>
pub fn from_path_and_bytes_with_kind( path: &Path, bytes: impl Into<Bytes>, input_kind: InputKind, ) -> Result<Self>
pub fn kind(&self) -> Result<InputKind>
Trait Implementations§
Source§impl Clone for InputDocument
impl Clone for InputDocument
Source§fn clone(&self) -> InputDocument
fn clone(&self) -> InputDocument
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 moreAuto Trait Implementations§
impl !Freeze for InputDocument
impl RefUnwindSafe for InputDocument
impl Send for InputDocument
impl Sync for InputDocument
impl Unpin for InputDocument
impl UnsafeUnpin for InputDocument
impl UnwindSafe for InputDocument
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