[−][src]Struct cosmwasm_std::Binary
Binary is a wrapper around Vec
This is only needed as serde-json-{core,wasm} has a horrible encoding for Vec
Implementations
impl Binary[src]
pub fn from_base64(encoded: &str) -> StdResult<Self>[src]
take an (untrusted) string and decode it into bytes. fails if it is not valid base64
pub fn to_base64(&self) -> String[src]
encode to base64 string (guaranteed to be success as we control the data inside). this returns normalized form (with trailing = if needed)
pub fn as_slice(&self) -> &[u8][src]
pub fn len(&self) -> usize[src]
pub fn is_empty(&self) -> bool[src]
Trait Implementations
impl Clone for Binary[src]
impl Debug for Binary[src]
impl Default for Binary[src]
impl<'de> Deserialize<'de> for Binary[src]
Deserializes as a base64 string
fn deserialize<D>(deserializer: D) -> Result<Binary, D::Error> where
D: Deserializer<'de>, [src]
D: Deserializer<'de>,
impl Display for Binary[src]
impl<'_> From<&'_ [u8]> for Binary[src]
impl From<Vec<u8>> for Binary[src]
impl Into<Vec<u8>> for Binary[src]
impl JsonSchema for Binary[src]
fn schema_name() -> String[src]
fn json_schema(gen: &mut SchemaGenerator) -> Schema[src]
fn is_referenceable() -> bool[src]
impl PartialEq<Binary> for Binary[src]
impl Serialize for Binary[src]
Serializes as a base64 string
impl StructuralPartialEq for Binary[src]
Auto Trait Implementations
impl RefUnwindSafe for Binary
impl Send for Binary
impl Sync for Binary
impl Unpin for Binary
impl UnwindSafe for Binary
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,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>, [src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T> ToString for T where
T: Display + ?Sized, [src]
T: Display + ?Sized,
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.
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>,