Struct staticmap::StaticMap [−][src]
Main type. Use StaticMapBuilder as an entrypoint.
Example
use staticmap::StaticMapBuilder; let mut map = StaticMapBuilder::default() .width(300) .height(300) .zoom(4) .lat_center(52.6) .lon_center(13.4) .build() .unwrap();
Implementations
impl StaticMap
[src]
pub fn add_line(&mut self, line: Line)
[src]
Add a Line instance. The map can contain several lines.
pub fn add_marker(&mut self, marker: impl Marker + 'static)
[src]
Add a type implementing Marker. The map can contain several markers.
pub fn encode_png(&mut self) -> Result<Vec<u8>, StaticMapError>
[src]
Render the map and encode as png.
May panic if any feature has invalid bounds.
pub fn save_png<P: AsRef<Path>>(
&mut self,
path: P
) -> Result<(), StaticMapError>
[src]
&mut self,
path: P
) -> Result<(), StaticMapError>
Render the map and save as png to a file.
May panic if any feature has invalid bounds.
Auto Trait Implementations
impl !RefUnwindSafe for StaticMap
impl !Send for StaticMap
impl !Sync for StaticMap
impl Unpin for StaticMap
impl !UnwindSafe for StaticMap
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,