Enum VersionedMessage

Source
pub enum VersionedMessage {
    Legacy(Message),
    V0(Message),
}
Expand description

Either a legacy message or a v0 message.

ยงSerialization

If the first bit is set, the remaining 7 bits will be used to determine which message version is serialized starting from version 0. If the first is bit is not set, all bytes are used to encode the legacy Message format.

Variantsยง

Implementationsยง

Sourceยง

impl VersionedMessage

Source

pub fn sanitize(&self) -> Result<(), SanitizeError>

Source

pub fn header(&self) -> &MessageHeader

Source

pub fn static_account_keys(&self) -> &[Pubkey]

Source

pub fn address_table_lookups(&self) -> Option<&[MessageAddressTableLookup]>

Source

pub fn is_signer(&self, index: usize) -> bool

Returns true if the account at the specified index signed this message.

Source

pub fn is_maybe_writable(&self, index: usize) -> bool

Returns true if the account at the specified index is writable by the instructions in this message. Since dynamically loaded addresses canโ€™t have write locks demoted without loading addresses, this shouldnโ€™t be used in the runtime.

Source

pub fn is_invoked(&self, key_index: usize) -> bool

Source

pub fn is_non_loader_key(&self, key_index: usize) -> bool

Returns true if the account at the specified index is not invoked as a program or, if invoked, is passed to a program.

Source

pub fn recent_blockhash(&self) -> &Hash

Source

pub fn set_recent_blockhash(&mut self, recent_blockhash: Hash)

Source

pub fn instructions(&self) -> &[CompiledInstruction]

Program instructions that will be executed in sequence and committed in one atomic transaction if all succeed.

Source

pub fn serialize(&self) -> Vec<u8> โ“˜

Source

pub fn hash(&self) -> Hash

Compute the blake3 hash of this transactionโ€™s message

Source

pub fn hash_raw_message(message_bytes: &[u8]) -> Hash

Compute the blake3 hash of a raw transaction message

Trait Implementationsยง

Sourceยง

impl AbiEnumVisitor for VersionedMessage

Sourceยง

impl AbiExample for VersionedMessage

Sourceยง

impl Clone for VersionedMessage

Sourceยง

fn clone(&self) -> VersionedMessage

Returns a duplicate of the value. Read more
1.0.0 ยท Sourceยง

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Sourceยง

impl Debug for VersionedMessage

Sourceยง

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Sourceยง

impl Default for VersionedMessage

Sourceยง

fn default() -> VersionedMessage

Returns the โ€œdefault valueโ€ for a type. Read more
Sourceยง

impl<'de> Deserialize<'de> for VersionedMessage

Sourceยง

fn deserialize<D>( deserializer: D, ) -> Result<VersionedMessage, <D as Deserializer<'de>>::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Sourceยง

impl PartialEq for VersionedMessage

Sourceยง

fn eq(&self, other: &VersionedMessage) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 ยท Sourceยง

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Sourceยง

impl Serialize for VersionedMessage

Sourceยง

fn serialize<S>( &self, serializer: S, ) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
Sourceยง

impl TryFrom<VersionedMessage> for SanitizedVersionedMessage

Sourceยง

type Error = SanitizeError

The type returned in the event of a conversion error.
Sourceยง

fn try_from( message: VersionedMessage, ) -> Result<SanitizedVersionedMessage, <SanitizedVersionedMessage as TryFrom<VersionedMessage>>::Error>

Performs the conversion.
Sourceยง

impl Eq for VersionedMessage

Sourceยง

impl StructuralPartialEq for VersionedMessage

Auto Trait Implementationsยง

Blanket Implementationsยง

Sourceยง

impl<T> AbiEnumVisitor for T
where T: Serialize + ?Sized,

Sourceยง

default fn visit_for_abi( &self, _digester: &mut AbiDigester, ) -> Result<AbiDigester, DigestError>

Sourceยง

impl<T> AbiEnumVisitor for T
where T: Serialize + AbiExample + ?Sized,

Sourceยง

default fn visit_for_abi( &self, digester: &mut AbiDigester, ) -> Result<AbiDigester, DigestError>

Sourceยง

impl<T> AbiExample for T

Sourceยง

default fn example() -> T

Sourceยง

impl<T> Any for T
where T: 'static + ?Sized,

Sourceยง

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Sourceยง

impl<T> Borrow<T> for T
where T: ?Sized,

Sourceยง

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Sourceยง

impl<T> BorrowMut<T> for T
where T: ?Sized,

Sourceยง

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Sourceยง

impl<T> CloneToUninit for T
where T: Clone,

Sourceยง

unsafe fn clone_to_uninit(&self, dest: *mut u8)

๐Ÿ”ฌThis is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Sourceยง

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Sourceยง

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Sourceยง

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Sourceยง

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Sourceยง

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Sourceยง

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Sourceยง

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Sourceยง

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Sourceยง

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Sourceยง

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Sourceยง

impl<T> From<T> for T

Sourceยง

fn from(t: T) -> T

Returns the argument unchanged.

Sourceยง

impl<CustErr, T, Request> FromReq<Cbor, Request, CustErr> for T
where Request: Req<CustErr> + Send + 'static, T: DeserializeOwned,

Sourceยง

async fn from_req(req: Request) -> Result<T, ServerFnError<CustErr>>

Attempts to deserialize the arguments from a request.
Sourceยง

impl<CustErr, T, Request> FromReq<GetUrl, Request, CustErr> for T
where Request: Req<CustErr> + Send + 'static, T: DeserializeOwned,

Sourceยง

async fn from_req(req: Request) -> Result<T, ServerFnError<CustErr>>

Attempts to deserialize the arguments from a request.
Sourceยง

impl<CustErr, T, Request> FromReq<Json, Request, CustErr> for T
where Request: Req<CustErr> + Send + 'static, T: DeserializeOwned,

Sourceยง

async fn from_req(req: Request) -> Result<T, ServerFnError<CustErr>>

Attempts to deserialize the arguments from a request.
Sourceยง

impl<CustErr, T, Request> FromReq<PostUrl, Request, CustErr> for T
where Request: Req<CustErr> + Send + 'static, T: DeserializeOwned,

Sourceยง

async fn from_req(req: Request) -> Result<T, ServerFnError<CustErr>>

Attempts to deserialize the arguments from a request.
Sourceยง

impl<CustErr, T, Response> FromRes<Cbor, Response, CustErr> for T
where Response: ClientRes<CustErr> + Send, T: DeserializeOwned + Send,

Sourceยง

async fn from_res(res: Response) -> Result<T, ServerFnError<CustErr>>

Attempts to deserialize the outputs from a response.
Sourceยง

impl<CustErr, T, Response> FromRes<Json, Response, CustErr> for T
where Response: ClientRes<CustErr> + Send, T: DeserializeOwned + Send,

Sourceยง

async fn from_res(res: Response) -> Result<T, ServerFnError<CustErr>>

Attempts to deserialize the outputs from a response.
Sourceยง

impl<T> Instrument for T

Sourceยง

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Sourceยง

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Sourceยง

impl<T, U> Into<U> for T
where U: From<T>,

Sourceยง

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Sourceยง

impl<T> IntoEither for T

Sourceยง

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Sourceยง

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Sourceยง

impl<T> IntoPropValue<Option<T>> for T

Sourceยง

fn into_prop_value(self) -> Option<T>

Convert self to a value of a Properties struct.
Sourceยง

impl<T> IntoPropValue<T> for T

Sourceยง

fn into_prop_value(self) -> T

Convert self to a value of a Properties struct.
Sourceยง

impl<CustErr, T, Request> IntoReq<Cbor, Request, CustErr> for T
where Request: ClientReq<CustErr>, T: Serialize + Send,

Sourceยง

fn into_req( self, path: &str, accepts: &str, ) -> Result<Request, ServerFnError<CustErr>>

Attempts to serialize the arguments into an HTTP request.
Sourceยง

impl<CustErr, T, Request> IntoReq<GetUrl, Request, CustErr> for T
where Request: ClientReq<CustErr>, T: Serialize + Send,

Sourceยง

fn into_req( self, path: &str, accepts: &str, ) -> Result<Request, ServerFnError<CustErr>>

Attempts to serialize the arguments into an HTTP request.
Sourceยง

impl<CustErr, T, Request> IntoReq<Json, Request, CustErr> for T
where Request: ClientReq<CustErr>, T: Serialize + Send,

Sourceยง

fn into_req( self, path: &str, accepts: &str, ) -> Result<Request, ServerFnError<CustErr>>

Attempts to serialize the arguments into an HTTP request.
Sourceยง

impl<CustErr, T, Request> IntoReq<PostUrl, Request, CustErr> for T
where Request: ClientReq<CustErr>, T: Serialize + Send,

Sourceยง

fn into_req( self, path: &str, accepts: &str, ) -> Result<Request, ServerFnError<CustErr>>

Attempts to serialize the arguments into an HTTP request.
Sourceยง

impl<CustErr, T, Response> IntoRes<Cbor, Response, CustErr> for T
where Response: Res<CustErr>, T: Serialize + Send,

Sourceยง

async fn into_res(self) -> Result<Response, ServerFnError<CustErr>>

Attempts to serialize the output into an HTTP response.
Sourceยง

impl<CustErr, T, Response> IntoRes<Json, Response, CustErr> for T
where Response: Res<CustErr>, T: Serialize + Send,

Sourceยง

async fn into_res(self) -> Result<Response, ServerFnError<CustErr>>

Attempts to serialize the output into an HTTP response.
Sourceยง

impl<T> Pointable for T

Sourceยง

const ALIGN: usize

The alignment of pointer.
Sourceยง

type Init = T

The type for initializers.
Sourceยง

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Sourceยง

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Sourceยง

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Sourceยง

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Sourceยง

impl<T> Same for T

Sourceยง

type Output = T

Should always be Self
Sourceยง

impl<T> Serializable for T

Sourceยง

fn ser(&self) -> Result<String, SerializationError>

Serializes the object to a string.
Sourceยง

fn de(json: &str) -> Result<T, SerializationError>

Deserializes the object from some bytes.
Sourceยง

impl<T, O> SuperFrom<T> for O
where O: From<T>,

Sourceยง

fn super_from(input: T) -> O

Convert from a type to another type.
Sourceยง

impl<T, O, M> SuperInto<O, M> for T
where O: SuperFrom<T, M>,

Sourceยง

fn super_into(self) -> O

Convert from a type to another type.
Sourceยง

impl<T> To for T
where T: ?Sized,

Sourceยง

fn to<T>(self) -> T
where Self: Into<T>,

Converts to T by calling Into<T>::into.
Sourceยง

fn try_to<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Tries to convert to T by calling TryInto<T>::try_into.
Sourceยง

impl<T> ToOwned for T
where T: Clone,

Sourceยง

type Owned = T

The resulting type after obtaining ownership.
Sourceยง

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Sourceยง

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Sourceยง

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Sourceยง

type Error = Infallible

The type returned in the event of a conversion error.
Sourceยง

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Sourceยง

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Sourceยง

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Sourceยง

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Sourceยง

impl<Cfg> TryIntoConfig for Cfg

Sourceยง

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Sourceยง

fn vzip(self) -> V

Sourceยง

impl<T> WithSubscriber for T

Sourceยง

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Sourceยง

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Sourceยง

impl<Token, Builder, How> AllPropsFor<Builder, How> for Token
where Builder: Buildable<Token>, <Builder as Buildable<Token>>::WrappedToken: HasAllProps<<Builder as Buildable<Token>>::Output, How>,

Sourceยง

impl<T> DependencyElement for T
where T: 'static + PartialEq + Clone,

Sourceยง

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Sourceยง

impl<El> ElementDescriptorBounds for El
where El: Debug,

Sourceยง

impl<T> ErasedDestructor for T
where T: 'static,

Sourceยง

impl<T> HasAllProps<(), T> for T