pub struct VipsTarget { /* private fields */ }Expand description
A unified interface for writing data to various output destinations
Implementations§
Source§impl VipsTarget
impl VipsTarget
Sourcepub fn new_to_writer<W: Writer>(output: W) -> Result<VipsTarget>
pub fn new_to_writer<W: Writer>(output: W) -> Result<VipsTarget>
Create a target from a writer.
Sourcepub fn new_to_descriptor(descriptor: i32) -> Result<VipsTarget>
pub fn new_to_descriptor(descriptor: i32) -> Result<VipsTarget>
Create a target attached to a file descriptor. descriptor is kept open until the target is finalized.
Sourcepub fn new_to_file<P: AsRef<Path>>(filename: P) -> Result<VipsTarget>
pub fn new_to_file<P: AsRef<Path>>(filename: P) -> Result<VipsTarget>
Create a target attached to a file.
Sourcepub fn new_to_memory() -> Result<VipsTarget>
pub fn new_to_memory() -> Result<VipsTarget>
Create a target which will write to a memory area. Read from blob to get memory.
Sourcepub fn write_amp(&mut self, text: &str) -> Result<()>
pub fn write_amp(&mut self, text: &str) -> Result<()>
Write str to target, but escape stuff that xml hates in text.
pub fn get_blob(&self) -> Vec<u8> ⓘ
pub fn filename(&self) -> Option<String>
pub fn nick(&self) -> Option<String>
Trait Implementations§
Auto Trait Implementations§
impl !Send for VipsTarget
impl !Sync for VipsTarget
impl Freeze for VipsTarget
impl RefUnwindSafe for VipsTarget
impl Unpin for VipsTarget
impl UnsafeUnpin for VipsTarget
impl UnwindSafe for VipsTarget
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