pub struct WorldFile {
pub x_scale: f64,
pub y_scale: f64,
pub x_skew: f64,
pub y_skew: f64,
pub x_coord: f64,
pub y_coord: f64,
}
Expand description
A World File
See the module top level documention
Fields§
§x_scale: f64
§y_scale: f64
§x_skew: f64
§y_skew: f64
§x_coord: f64
§y_coord: f64
Implementations§
Source§impl WorldFile
impl WorldFile
Sourcepub fn from_reader(r: impl Read) -> Result<Self, ()>
pub fn from_reader(r: impl Read) -> Result<Self, ()>
Open a world file from something that can Read
Sourcepub fn from_string(s: impl AsRef<str>) -> Result<Self, ()>
pub fn from_string(s: impl AsRef<str>) -> Result<Self, ()>
Open a world file from a raw string file content
Sourcepub fn write_to_writer(&self, w: impl Write)
pub fn write_to_writer(&self, w: impl Write)
Write this world file to this Write
object
Sourcepub fn write_to_path(&self, p: impl AsRef<Path>)
pub fn write_to_path(&self, p: impl AsRef<Path>)
Write this world file to a path
Trait Implementations§
impl StructuralPartialEq for WorldFile
Auto Trait Implementations§
impl Freeze for WorldFile
impl RefUnwindSafe for WorldFile
impl Send for WorldFile
impl Sync for WorldFile
impl Unpin for WorldFile
impl UnwindSafe for WorldFile
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